Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 820 Bytes

multi-line-aspnet-textbox-spacing-changed-when-using-antixssencoder.md

File metadata and controls

15 lines (10 loc) · 820 Bytes

Multi-line ASP.NET TextBox spacing changed when using AntiXSSEncoder

Details

In .NET Framework 4.0, extra lines were inserted between lines of a multi-line text box on postback, if using the xref:System.Web.Security.AntiXss.AntiXssEncoder?displayProperty=fullName. In .NET Framework 4.5, those extra line breaks are not included, but only if the web app is targeting .NET Framework 4.5

Suggestion

Be aware that 4.0 web apps retargeted to .NET Framework 4.5 may have multi-line text boxes improved to no longer insert extra line breaks. If this is not desirable, the app can have the old behavior when running on .NET Framework 4.5 by targeting the .NET Framework 4.0.

Name Value
Scope Minor
Version 4.5
Type Retargeting