3 files changed
+14
-1
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
4 | 13 |
| |
5 | 14 |
| |
6 | 15 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
211 |
| - | |
| 211 | + | |
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
|
Lines changed: 4 additions & 0 deletions
@@ -40,6 +40,10 @@ def test_should_handle_astral_plane_characters():
40
40
assert '<html:p xmlns:html="http://www.w3.org/1999/xhtml">\U0001d4b5 \U0001d538</html:p>' == sanitize_html("<p>𝒵 𝔸</p>")
41
41
42
42
43
+def test_should_allow_relative_uris():
44
+ assert '<html:p xmlns:html="http://www.w3.org/1999/xhtml"><html:a href="/example.com" /></html:p>' == sanitize_html('<p><a href="/example.com"></a></p>')
45
+
46
+
43
47
def test_sanitizer():
44
48
toxml = toxmlFactory()
45
49
for tag_name in sanitizer.HTMLSanitizer.allowed_elements:
0 commit comments