summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2013-05-31 09:51:21 -0400
committerLeonard Richardson <leonardr@segfault.org>2013-05-31 09:51:21 -0400
commit866841210602fcf3a428f490c97cee32561b3485 (patch)
tree202e9844b1bb8e92654ba8a3c4ce65050449bb70 /bs4/testing.py
parent1ff0871c158cfe8c734bf8d614a7d5f6309a8cd4 (diff)
downloadbeautifulsoup4-866841210602fcf3a428f490c97cee32561b3485.tar.gz
The html.parser treebuilder can now handle numeric attributes in
text when the hexidecimal name of the attribute starts with a capital X.
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index d8ff6b7..23b26f1 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -228,12 +228,14 @@ class HTMLTreeBuilderSmokeTest(object):
expect = u'<p id="pi\N{LATIN SMALL LETTER N WITH TILDE}ata"></p>'
self.assertSoupEquals('<p id="pi&#241;ata"></p>', expect)
self.assertSoupEquals('<p id="pi&#xf1;ata"></p>', expect)
+ self.assertSoupEquals('<p id="pi&#Xf1;ata"></p>', expect)
self.assertSoupEquals('<p id="pi&ntilde;ata"></p>', expect)
def test_entities_in_text_converted_to_unicode(self):
expect = u'<p>pi\N{LATIN SMALL LETTER N WITH TILDE}ata</p>'
self.assertSoupEquals("<p>pi&#241;ata</p>", expect)
self.assertSoupEquals("<p>pi&#xf1;ata</p>", expect)
+ self.assertSoupEquals("<p>pi&#Xf1;ata</p>", expect)
self.assertSoupEquals("<p>pi&ntilde;ata</p>", expect)
def test_quot_entity_converted_to_quotation_mark(self):