A literal string type for Python
A literal string type for Python
Posted Apr 14, 2022 8:39 UTC (Thu) by NRArnot (subscriber, #3033)Parent article: A literal string type for Python
Django has something similar. When ordinary strings are rendered into an HTML template, the HTML special characters are escaped ("<" into "<" etc.). The programmer can create "safe" strings (type Safestring) which behave like ordinary strings in most ways, but which do not get HTML-escaped. They remain safe until they are combined with ordinary strings by concatenation etc.
