Skip to content

Commit 792e0dc

Browse files
donkerbdukes
authored andcommitted
Remove web encoding from CDF output writer as it can mangle the developer's code
1 parent 7083890 commit 792e0dc

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

DNN Platform/DotNetNuke.Web.Client.ResourceManager/Models/FontResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public override void Register()
3232
public override string Render(int crmVersion, bool useCdn, string applicationPath)
3333
{
3434
var htmlString = new StringBuilder("<link");
35-
htmlString.Append($" href=\"{WebUtility.HtmlEncode(this.GetVersionedPath(crmVersion, useCdn, applicationPath))}\"");
35+
htmlString.Append($" href=\"{this.GetVersionedPath(crmVersion, useCdn, applicationPath)}\"");
3636
if (this.Preload && !this.Attributes.ContainsKey("rel") && !this.Attributes.ContainsKey("as"))
3737
{
3838
htmlString.Append($" rel=\"preload\" as=\"font\"");

DNN Platform/DotNetNuke.Web.Client.ResourceManager/Models/LinkResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected void RenderMedia(StringBuilder htmlString)
2828
{
2929
if (!string.IsNullOrEmpty(this.Media) && !this.Attributes.ContainsKey("media"))
3030
{
31-
htmlString.Append($" media=\"{WebUtility.HtmlEncode(this.Media)}\"");
31+
htmlString.Append($" media=\"{this.Media}\"");
3232
}
3333
}
3434
}

DNN Platform/DotNetNuke.Web.Client.ResourceManager/Models/ResourceBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected void RenderIntegrity(StringBuilder htmlString)
177177
{
178178
if (!string.IsNullOrEmpty(this.Integrity) && !this.Attributes.ContainsKey("integrity"))
179179
{
180-
htmlString.Append($" integrity=\"{WebUtility.HtmlEncode(this.Integrity)}\"");
180+
htmlString.Append($" integrity=\"{this.Integrity}\"");
181181
}
182182
}
183183

@@ -229,7 +229,7 @@ protected void RenderType(StringBuilder htmlString)
229229
{
230230
if (!string.IsNullOrEmpty(this.Type) && !this.Attributes.ContainsKey("type"))
231231
{
232-
htmlString.Append($" type=\"{WebUtility.HtmlEncode(this.Type)}\"");
232+
htmlString.Append($" type=\"{this.Type}\"");
233233
}
234234
}
235235

@@ -245,7 +245,7 @@ protected void RenderAttributes(StringBuilder htmlString)
245245
}
246246
else
247247
{
248-
htmlString.Append($" {attribute.Key}=\"{WebUtility.HtmlEncode(attribute.Value)}\"");
248+
htmlString.Append($" {attribute.Key}=\"{attribute.Value}\"");
249249
}
250250
}
251251
}

DNN Platform/DotNetNuke.Web.Client.ResourceManager/Models/ScriptResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public override void Register()
4343
public override string Render(int crmVersion, bool useCdn, string applicationPath)
4444
{
4545
var htmlString = new StringBuilder("<script");
46-
htmlString.Append($" src=\"{WebUtility.HtmlEncode(this.GetVersionedPath(crmVersion, useCdn, applicationPath))}\"");
46+
htmlString.Append($" src=\"{this.GetVersionedPath(crmVersion, useCdn, applicationPath)}\"");
4747
if (this.Async && !this.Attributes.ContainsKey("async"))
4848
{
4949
htmlString.Append(" async");

DNN Platform/DotNetNuke.Web.Client.ResourceManager/Models/StylesheetResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public override void Register()
3636
public override string Render(int crmVersion, bool useCdn, string applicationPath)
3737
{
3838
var htmlString = new StringBuilder("<link");
39-
htmlString.Append($" href=\"{WebUtility.HtmlEncode(this.GetVersionedPath(crmVersion, useCdn, applicationPath))}\"");
39+
htmlString.Append($" href=\"{this.GetVersionedPath(crmVersion, useCdn, applicationPath)}\"");
4040
if (this.Preload && !this.Attributes.ContainsKey("rel") && !this.Attributes.ContainsKey("as"))
4141
{
4242
htmlString.Append($" rel=\"preload\" as=\"style\"");

0 commit comments

Comments
 (0)