Starting with the .NET Framework 4.5, xref:System.Web.HttpUtility.JavaScriptStringEncode(System.String)?displayProperty=fullName escapes the ampersand (&) character.
If your app depends on the previous behavior of this method, you can add an aspnet:JavaScriptDoNotEncodeAmpersand setting to the ASP.NET appSettings element in your configuration file.
Name | Value |
---|---|
Scope | Minor |
Version | 4.5 |
Type | Runtime |
- xref:System.Web.HttpUtility.JavaScriptStringEncode(System.String)?displayProperty=nameWithType
- xref:System.Web.HttpUtility.JavaScriptStringEncode(System.String,System.Boolean)?displayProperty=nameWithType