Templating

PyHtml

The html module. html.escape() is the canonical XSS sanitizer for writing user input into HTML text content. html.unescape() does the inverse and should NOT be used on output paths.

1 sanitizer

Sanitizers

.escape()Sanitizer
#
Signature
html.escape(s: str, quote: bool = True) -> str

Escapes &, <, > and optionally " and ' for HTML text. XSS sanitizer.

tracks:return

Other Methods

.unescape()Neutral
#
Signature
html.unescape(s: str) -> str

Converts HTML entities back to chars. Inverse of escape(). Not a sanitizer.

Fully-Qualified Names

FQNField
htmlfqns[0]
html.parserfqns[1]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
from codepathfinder.go_rule import PyHtml