Debian Codegraph @

tests/testit/test-utils.md

raw symbols SCIP
1 # escape_latex() sanitizes backslashes and {}
2
3 ```{r}
4 escape_latex('\\')
5 escape_latex('\\{}')
6 escape_latex('{\\}')
7 escape_latex('~!@#$%^&*()')
8 ```
9 ```
10 \textbackslash{}
11 \textbackslash{}\{\}
12 \{\textbackslash{}\}
13 ~!@#$%^&*()
14 ```
15
16 # escape_html() escapes HTML chars
17
18 ```{r}
19 escape_html('&"<>')
20 escape_html('~!@#$%^&*()')
21 ```
22 ```
23 &amp;&quot;&lt;&gt;
24 ~!@#$%^&amp;*()
25 ```