summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pedersen <chripede@gmail.com>2015-11-20 15:48:35 +0100
committerChristian Pedersen <chripede@gmail.com>2015-11-20 15:48:35 +0100
commitc35549338445a579e81cd658027baefa72723c49 (patch)
treee2d2b95cd8789223e9a131e4aa53c8d3654fe5cc
parent12b93e23e8447a03ab592b30406ae85406d150c3 (diff)
downloadpython-lxml-c35549338445a579e81cd658027baefa72723c49.tar.gz
Fix tests for inline_style
-rw-r--r--src/lxml/html/tests/test_clean.txt23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/lxml/html/tests/test_clean.txt b/src/lxml/html/tests/test_clean.txt
index 4431c980..c78ab4f1 100644
--- a/src/lxml/html/tests/test_clean.txt
+++ b/src/lxml/html/tests/test_clean.txt
@@ -122,7 +122,7 @@
</body>
</html>
->>> print(Cleaner(style=True, links=True, add_nofollow=True, page_structure=False, safe_attrs_only=False).clean_html(doc))
+>>> print(Cleaner(style=True, inline_style=True, links=True, add_nofollow=True, page_structure=False, safe_attrs_only=False).clean_html(doc))
<html>
<head>
</head>
@@ -142,6 +142,26 @@
</body>
</html>
+>>> print(Cleaner(style=True, inline_style=False, links=True, add_nofollow=True, page_structure=False, safe_attrs_only=False).clean_html(doc))
+<html>
+ <head>
+ </head>
+ <body>
+ <a href="">a link</a>
+ <a href="">a control char link</a>
+ <a href="">data</a>
+ <a href="#">another link</a>
+ <p>a paragraph</p>
+ <div style="display: none">secret EVIL!</div>
+ of EVIL!
+ Password:
+ <a href="evil-site" rel="nofollow">spam spam SPAM!</a>
+ <a href="http://example.com" rel="author nofollow">Author</a>
+ <a href="http://example.com" rel="nofollow">Text</a>
+ <img src="evil!">
+ </body>
+</html>
+
>>> print(Cleaner(links=False, page_structure=False, javascript=True, host_whitelist=['example.com'], whitelist_tags=None).clean_html(doc))
<html>
<head>
@@ -165,4 +185,3 @@
<img src="evil!">
</body>
</html>
-