diff --git a/rules/S5131/common/fix/data_encoding.adoc b/rules/S5131/common/fix/data_encoding.adoc index 8f7c5cb58a..1ad5da7a8c 100644 --- a/rules/S5131/common/fix/data_encoding.adoc +++ b/rules/S5131/common/fix/data_encoding.adoc @@ -6,7 +6,7 @@ The goal is to leave the data intact from the end user's point of view but makes XSS exploitation techniques vary depending on the HTML context where malicious inputs are injected. For each HTML context, there is a specific encoding to prevent JavaScript code from being interpreted. The following table summarizes the encoding to apply for each HTML context. -[cols="a,a,a,a"] +[options="header",cols="a,a,a,a"] |=== | Context | Code example diff --git a/rules/S5131/csharp/how-to-fix-it/asp.net.adoc b/rules/S5131/csharp/how-to-fix-it/asp.net.adoc index f8726e979e..8d1a40d49b 100644 --- a/rules/S5131/csharp/how-to-fix-it/asp.net.adoc +++ b/rules/S5131/csharp/how-to-fix-it/asp.net.adoc @@ -1,7 +1,8 @@ === How to fix it in ASP.NET -[cols="a,a"] +[cols="a"] |=== +h| Non-compliant code example | [source,csharp] ---- @@ -18,6 +19,7 @@ public class HelloController : Controller } } ---- +h| Compliant solution | [source,csharp] ---- diff --git a/rules/S5131/csharp/how-to-fix-it/razor.adoc b/rules/S5131/csharp/how-to-fix-it/razor.adoc index 2fc0622560..65528e9b6d 100644 --- a/rules/S5131/csharp/how-to-fix-it/razor.adoc +++ b/rules/S5131/csharp/how-to-fix-it/razor.adoc @@ -5,7 +5,7 @@ The recommended way to fix this code is to move the HTML content to the template [cols="a"] |=== -| ==== Noncompliant Code Example +h| Non-compliant code example | [source,csharp] ---- @@ -20,12 +20,12 @@ public class HelloController : Controller } } ---- -| + [source,html] ---- @Html.Raw(ViewData["Hello"]) ---- -| ==== Compliant Solution +h| Compliant solution | [source,csharp] ---- @@ -40,7 +40,7 @@ public class HelloController : Controller } } ---- -| + [source,html] ----