-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing "meta" tag with encoding attribute
When parsing a <meta encoding=""> tag, the parser calls charEncoding and changeEncoding in the input stream, but the InputStreamWithMemory wrapper didn't have those methods. This fixes that. This also creates a new test set for BleachHTMLParser functionality. Fixes #431
- Loading branch information
Showing
5 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,17 +69,6 @@ def ft(attrs, new=False): | |
) | ||
|
||
|
||
def test_invalid_attribute_names(): | ||
"""Test that "invalid-character-in-attribute-name" errors in tokenizing | ||
result in attributes with invalid names get dropped. | ||
""" | ||
assert ( | ||
linkify('<a href="http://example.com/"">') == | ||
'<a href="http://example.com/" rel="nofollow"></a>' | ||
) | ||
|
||
|
||
@pytest.mark.parametrize('data,parse_email,expected', [ | ||
( | ||
'a [email protected] mailto', | ||
|