+ In Go, the html/template package has a few special types
+ (HTML, HTMLAttr, JS, JSStr, CSS,
+ Srcset, URL)
+ that allow values to be rendered as-is in the template, avoiding the escaping that all the other strings go
+ through.
+
Using them on user-provided values will result in an XSS.
++ Make sure to never use those types on untrusted content. +
++ In the first example you can see the special types and how they are used in a template: +
++ To avoid XSS, all user input should be a normal string type. +
+