framework
framework copied to clipboard
Backslashes aren’t unescaped within PRE elements
Consider the following HTML:
<pre>${test}</pre>
The ${test} is interpreted as a live expression, so if test is not defined, you’ll see an error:
RuntimeError: test is not defined
You can prevent the live expression using a backslash:
<pre>$\{test}</pre>
However, the resulting backslash is still rendered in the output, producing:
$\{test}
A workaround is to use $ instead:
<pre>${test}</pre>
This is probably something we should fix in #597.
There is also <pre>$‍{test}</pre> (I know, not a very helpful comment!)