File tree Expand file tree Collapse file tree 5 files changed +30
-22
lines changed
Expand file tree Collapse file tree 5 files changed +30
-22
lines changed Original file line number Diff line number Diff line change 1414def build_preprocessors (md_instance , ** kwargs ):
1515 """ Build the default set of preprocessors used by Markdown. """
1616 preprocessors = odict .OrderedDict ()
17- preprocessors ["html_block" ] = HtmlBlockPreprocessor (md_instance )
17+ if md_instance .safeMode != 'escape' :
18+ preprocessors ["html_block" ] = HtmlBlockPreprocessor (md_instance )
1819 preprocessors ["reference" ] = ReferencePreprocessor (md_instance )
1920 return preprocessors
2021
Original file line number Diff line number Diff line change 1+ < p > to:</ p >
2+ < p > <td /><td style="text-align: center; white-space: nowrap;"><br /></ p >
3+ < blockquote >
4+ < p > 3) You don't need to alter all localization files.
5+ Adding the new labels to the en_US files will do it.</ p >
6+ </ blockquote >
Original file line number Diff line number Diff line change 1+ to:
2+
3+ <td /><td style="text-align: center; white-space: nowrap;"><br />
4+
5+ > 3) You don't need to alter all localization files.
6+ > Adding the new labels to the en_US files will do it.
Original file line number Diff line number Diff line change 2929< pre > < code > <!-- Comment -->
3030</ code > </ pre >
3131< p > Just plain comment, with trailing spaces on the line:</ p >
32- < p > <!-- foo --></ p >
32+ < p > <!-- foo --> < br />
33+ </ p >
3334< p > Code:</ p >
3435< pre > < code > <hr />
3536</ code > </ pre >
3637< p > Hr's:</ p >
3738< p > <hr></ p >
3839< p > <hr/></ p >
3940< p > <hr /></ p >
40- < p > <hr></ p >
41- < p > <hr/></ p >
42- < p > <hr /></ p >
41+ < p > <hr> < br />
42+ </ p >
43+ < p > <hr/>< br />
44+ </ p >
45+ < p > <hr /> </ p >
4346< p > <hr class="foo" id="bar" /></ p >
4447< p > <hr class="foo" id="bar"/></ p >
4548< p > <hr class="foo" id="bar" ></ p >
Original file line number Diff line number Diff line change 11< p > This should be stripped/escaped in safe_mode.</ p >
22< p > <script>
3- alert(" Hello world!" )
3+ alert(" Hello world!" )
44</script></ p >
55< p > With blank lines.</ p >
6- < p > <script>
7-
8- alert("Hello world!")
9-
10- </script></ p >
6+ < p > <script></ p >
7+ < p > alert("Hello world!")</ p >
8+ < p > </script></ p >
119< p > Now with some weirdness</ p >
1210< p > < code > <script <!--
1311alert("Hello world!")
1412</script <></ code > `</ p >
1513< p > Try another way.</ p >
1614< p > <script <!--
1715alert("Hello world!")
18- </script <>
19-
20- This time with blank lines.
21-
22- <script <!--
23-
24- alert("Hello world!")
25-
26- </script <>
27-
28- </ p >
16+ </script <></ p >
17+ < p > This time with blank lines.</ p >
18+ < p > <script <!--</ p >
19+ < p > alert("Hello world!")</ p >
20+ < p > </script <></ p >
You can’t perform that action at this time.
0 commit comments