Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions xml/System.Web.Security.AntiXss/AntiXssEncoder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert\000028\000027XSS\000020Attack\000021\000027\000029\00003B`|
|`user@contoso.com`|`user\000040contoso\00002Ecom`|
Expand Down Expand Up @@ -180,11 +180,11 @@

|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert('XSS Attack!');`|
|`alert('XSS Attack!');`|`alert('XSS Attack!');`|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the space character listed as a safe character in the table that starts on line 142. Does it need to be added?

|`<script>alert('XSS Attack!');</script>`|`&lt;script&gt;alert(&#39;XSS Attack!&#39;);&lt;/script&gt;`|
|`alert('XSSあAttack!');`|`alert(&#39;XSS&#12354;Attack!&#39;);`|
|`user@contoso.com`|`user@contoso.com`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross&#32;Site&#32;Scripting&#32;Namespace&quot;`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross Site Scripting Namespace&quot;`|

To customize the safe list, call the <xref:System.Web.Security.AntiXss.AntiXssEncoder.MarkAsSafe%2A> method.

Expand Down Expand Up @@ -277,13 +277,13 @@

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert(&#39;XSS&#32;Attack!&#39;);`|
|`alert('XSS Attack!');`|`alert(&#39;XSS Attack!&#39;);`|
|`<script>alert('XSS Attack!');</script>`|`&lt;script&gt;alert(&#39;XSS Attack!&#39;);&lt;/script&gt;`|
|`alert('XSSあAttack!');`|`alert(&#39;XSS&#12354;Attack!&#39;);`|
|`user@contoso.com`|`user@contoso.com`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross&#32;Site&#32;Scripting&#32;Namespace&quot;`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross Site Scripting Namespace&quot;`|

To customize the safe list, call the <xref:System.Web.Security.AntiXss.AntiXssEncoder.MarkAsSafe%2A> method.

Expand Down Expand Up @@ -365,13 +365,13 @@

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert(&#39;XSS&#32;Attack!&#39;);`|
|`alert('XSS Attack!');`|`alert(&#39;XSS Attack!&#39;);`|
|`<script>alert('XSS Attack!');</script>`|`&lt;script&gt;alert(&#39;XSS Attack!&#39;);&lt;/script&gt;`|
|`alert('XSSあAttack!');`|`alert(&#39;XSS&#12354;Attack!&#39;);`|
|`user@contoso.com`|`user@contoso.com`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross&#32;Site&#32;Scripting&#32;Namespace&quot;`|
|`"Anti-Cross Site Scripting Namespace"`|`&quot;Anti-Cross Site Scripting Namespace&quot;`|

To customize the safe list, call the <xref:System.Web.Security.AntiXss.AntiXssEncoder.MarkAsSafe%2A> method.

Expand Down Expand Up @@ -433,7 +433,7 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS+Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS+Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -492,7 +492,7 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS+Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS+Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -551,7 +551,7 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS+Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS+Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -678,7 +678,7 @@ MarkAsSafe(

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS%20Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS%20Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -735,7 +735,7 @@ MarkAsSafe(

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS%20Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS%20Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -792,7 +792,7 @@ MarkAsSafe(

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS%20Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS%20Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -851,7 +851,7 @@ MarkAsSafe(

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert%28%27XSS%20Attack%21%27%29%3b`|
|`<script>alert('XSS Attack!');</script>`|`%3cscript%3ealert%28%27XSS%20Attack%21%27%29%3b%3c%2fscript%3e`|
Expand Down Expand Up @@ -912,7 +912,7 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`http://www.contoso.com:8080/<en-us>/[page].htm?v={value1}#x=[amount]`|`http://www.contoso.com:8080/%3cen-us%3e/%5bpage%5d.htm?v={value1}#x=[amount]`|
|`alert('XSS Attack!');`|`alert(%27XSS%20Attack%21%27)%3b`|
Expand Down Expand Up @@ -1002,7 +1002,7 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert(&apos;XSS&#32;Attack!&apos;);`|
|`<script>alert('XSS Attack!');</script>`|`&lt;script&gt;alert(&apos;XSS&#32;Attack!&apos;);&lt;/script&gt;`|
Expand Down Expand Up @@ -1089,9 +1089,9 @@ The following table lists the default safe characters. All characters are from t

The following table lists examples of inputs and the corresponding encoded outputs.

|||
|Input examples| Encoded outputs|
|-|-|
|`alert('XSS Attack!');`|`alert(&#39;XSS&#32;Attack!&#39;);`|
|`alert('XSS Attack!');`|`alert(&#39;XSS Attack!&#39;);`|
|`<script>alert('XSS Attack!');</script>`|`&lt;script&gt;alert(&apos;XSS Attack!&apos;);&lt;/script&gt;`|
|`alert('XSSあAttack!');`|`alert(&apos;XSS&#12354;Attack!&apos;);`|
|`user@contoso.com`|`user@contoso.com`|
Expand Down