Skip to content

Commit 8cb66f2

Browse files
committed
Merge pull request #110 from gsnedders/sanitizer-fixes-72
Move the sanitizer to purely be a filter; r=nobody!
2 parents f6741ea + 57dfcae commit 8cb66f2

12 files changed

+1449
-397
lines changed

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ Released on XXX
4040
and the new default), and "spec" (the old False value, and the old
4141
default).**
4242

43+
* **Fix #72 by rewriting the sanitizer to apply only to treewalkers
44+
(instead of the tokenizer); as such, this will require amending all
45+
callers of it to use it via the treewalker API.**
46+
4347

4448
0.9999999/1.0b8
4549
~~~~~~~~~~~~~~~

html5lib/filters/optionaltags.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def slider(self):
1111
yield previous2, previous1, token
1212
previous2 = previous1
1313
previous1 = token
14-
yield previous2, previous1, None
14+
if previous1 is not None:
15+
yield previous2, previous1, None
1516

1617
def __iter__(self):
1718
for previous, token, next in self.slider():

0 commit comments

Comments
 (0)