From 5017c168482c49f877e715642630f3bdb222776f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 29 Aug 2012 21:15:30 -0700 Subject: [PATCH] Damnit IE, you suck Fixed: IE trying to save/open json result in settings Empty allowed release group can be saved --- NzbDrone.Web/Models/JsonNotificationResult.cs | 4 ++-- NzbDrone.Web/Models/MiscSettingsModel.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Web/Models/JsonNotificationResult.cs b/NzbDrone.Web/Models/JsonNotificationResult.cs index 00cb3f90d..df0cbb670 100644 --- a/NzbDrone.Web/Models/JsonNotificationResult.cs +++ b/NzbDrone.Web/Models/JsonNotificationResult.cs @@ -45,8 +45,8 @@ namespace NzbDrone.Web.Models return new JsonResult { Data = new JsonNotificationResult { NotificationType = notificationType, Title = title, Text = text }, - ContentType = null, - ContentEncoding = null, + ContentType = "application/json; charset=UTF-8", + ContentEncoding = System.Text.Encoding.UTF8, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } diff --git a/NzbDrone.Web/Models/MiscSettingsModel.cs b/NzbDrone.Web/Models/MiscSettingsModel.cs index 79e5de2cb..7957f70a8 100644 --- a/NzbDrone.Web/Models/MiscSettingsModel.cs +++ b/NzbDrone.Web/Models/MiscSettingsModel.cs @@ -18,6 +18,7 @@ namespace NzbDrone.Web.Models [DisplayName("Specified Release Groups")] [Description("Comma separated list of release groups to download episodes (leave empty for all groups)")] + [DisplayFormat(ConvertEmptyStringToNull = false)] public string AllowedReleaseGroups { get; set; } } } \ No newline at end of file