Skip to content

Commit 036933c

Browse files
authored
Merge pull request #563 from poppastring/remove-double-decode
Rolling back the option to double decode.
2 parents 7d38b48 + 2d0a1b4 commit 036933c

File tree

11 files changed

+4
-29
lines changed

11 files changed

+4
-29
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pool:
1010

1111
variables:
1212
buildConfiguration: 'Release'
13-
version: 2.41
13+
version: 2.42
1414

1515
steps:
1616
- task: UseDotNet@2

source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ public interface ISiteConfig
350350

351351
bool CookieConsentEnabled { get; set; }
352352

353-
bool EnableDoubleDecode { get; set; }
354-
355353
[XmlAnyElement]
356354
XmlElement[] anyElements { get; set; }
357355

source/DasBlog.Services/ConfigFile/SiteConfig.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,5 @@ public SiteConfig() { }
217217
public string SecurityStyleSources { get; set; }
218218

219219
public string DefaultSources { get; set; }
220-
221-
public bool EnableDoubleDecode { get; set; }
222220
}
223221
}

source/DasBlog.Services/DasBlog.Services.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<Version>3.0.0</Version>
5+
<Version>3.1.0</Version>
66
</PropertyGroup>
77
<ItemGroup>
88
<ProjectReference Include="..\DasBlog.Web.Core\DasBlog.Core.csproj" />

source/DasBlog.Tests/UnitTests/SiteConfigTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ public class SiteConfigTest : ISiteConfig
165165
public string SecurityScriptSources { get; set; }
166166

167167
public string SecurityStyleSources { get; set; }
168-
public bool EnableDoubleDecode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
169168
public string DefaultSources { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
170169
}
171170
}

source/DasBlog.Web.UI/Config/site.Development.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@
113113
<SecurityStyleSources>cloud.tinymce.com;cdn.tiny.cloud;cdn.jsdelivr.net;js.nicedit.com;www.google.com;platform.twitter.com;cdn.syndication.twimg.com;fonts.googleapis.com;maxcdn.bootstrapcdn.com</SecurityStyleSources>
114114
<SecurityScriptSources>cloud.tinymce.com;cdn.tiny.cloud;cdn.jsdelivr.net;js.nicedit.com;www.google.com;cse.google.com;cdn.syndication.twimg.com;platform.twitter.com;apis.google.com;www.google-analytics.com;www.googletagservices.com;adservice.google.com;securepubads.g.doubleclick.net;ajax.aspnetcdn.com;ssl.google-analytics.com</SecurityScriptSources>
115115

116-
<EnableDoubleDecode>false</EnableDoubleDecode>
117-
118116
<!-- Settings below this line are not currently in use -->
119117
<!-- _________________________________________________ -->
120118
<CommentsAllowHtml>true</CommentsAllowHtml>

source/DasBlog.Web.UI/Config/site.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@
116116
<SecurityStyleSources>cloud.tinymce.com;cdn.tiny.cloud;cdn.jsdelivr.net;js.nicedit.com;www.google.com;platform.twitter.com;cdn.syndication.twimg.com;fonts.googleapis.com;maxcdn.bootstrapcdn.com</SecurityStyleSources>
117117
<SecurityScriptSources>cloud.tinymce.com;cdn.tiny.cloud;cdn.jsdelivr.net;js.nicedit.com;www.google.com;cse.google.com;cdn.syndication.twimg.com;platform.twitter.com;apis.google.com;www.google-analytics.com;www.googletagservices.com;adservice.google.com;securepubads.g.doubleclick.net;ajax.aspnetcdn.com;ssl.google-analytics.com</SecurityScriptSources>
118118

119-
<EnableDoubleDecode>false</EnableDoubleDecode>
120-
121119
<!-- Settings below this line are not currently in use -->
122120
<!-- _________________________________________________ -->
123121
<CommentsAllowHtml>true</CommentsAllowHtml>

source/DasBlog.Web.UI/DasBlog.Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
1515
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
1616
<UserSecretsId>d3583964-0aca-4de4-9521-c74cdf42f990</UserSecretsId>
17-
<Version>2.41.0</Version>
17+
<Version>2.42.0</Version>
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<PackageReference Include="AutoMapper" Version="9.0.0" />

source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ public class SiteViewModel
282282
[Description("Help meet some of the EU General Data Protection Regulation (GDPR) requirements")]
283283
public bool CookieConsentEnabled { get; set; }
284284

285-
[DisplayName("Double decode")]
286-
[Description("")]
287-
public bool EnableDoubleDecode { get; set; }
288-
289285
[DisplayName("Default Sources (seperated by semi colon")]
290286
[Description("")]
291287
[StringLength(50, MinimumLength = 1, ErrorMessage = "{0} should be between 1 to 50 characters")]

source/DasBlog.Web.UI/TagHelpers/Post/PostContentTagHelper.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@ public PostContentTagHelper(IDasBlogSettings dasBlogSettings)
2424

2525
public override void Process(TagHelperContext context, TagHelperOutput output)
2626
{
27-
var content = Post.Content;
28-
29-
if(dasBlogSettings.SiteConfiguration.EnableDoubleDecode)
30-
{
31-
content = HttpUtility.HtmlDecode(Post.Content);
32-
}
27+
var content = HttpUtility.HtmlDecode(Post.Content);
3328

3429
output.TagName = "div";
3530
output.TagMode = TagMode.StartTagAndEndTag;

0 commit comments

Comments
 (0)