Apply suggestions from code review

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Max Schaefer
2023-12-19 15:09:42 +00:00
committed by GitHub
parent 71dbd1a059
commit dc8be7bbf0

View File

@@ -13,7 +13,7 @@ without properly sanitizing the input first, allows for a cross-site scripting v
<p>
To guard against cross-site scripting, consider using a library providing suitable encoding
functionality, such as the <code>System.Net.WebUtility</code> class or the AntiXSS library,
functionality, such as the <code>System.Net.WebUtility</code> class or the <code>AntiXSS</code> NuGet package,
to sanitize the untrusted input before writing it to the page.
The references also mention other possible solutions.
</p>
@@ -31,13 +31,9 @@ Sanitizing the user-controlled data using <code>WebUtility.HtmlEncode</code> met
</p>
<sample src="XSSGood.cs" />
<p>
Alternatively, the AntiXSS library can be used to sanitize the user-controlled data:
Alternatively, the <code>AntiXSS</code> NuGet package can be used to sanitize the user-controlled data:
</p>
<sample src="XSSGood2.cs" />
<p>
Recall that this solution requires the AntiXSS library to be installed, for example by
adding a package reference to the AntiXSS NuGet package to the project file.
</p>
</example>
<references>