summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2019-07-07 21:46:36 -0400
committerLeonard Richardson <leonardr@segfault.org>2019-07-07 21:46:36 -0400
commit2fcaeb6e916a09fa87b4b2ab57167c39db6cef8c (patch)
tree06f7f47a4c6adaa6e33e24c91a5dee61162fd441 /bs4/testing.py
parentfd040bfacc6caa2d0b92edbeed5f32582ad55d83 (diff)
&apos; (which is valid in XML and XHTML, but not HTML 4) is now
recognized as a named entity and converted to a single quote. [bug=1818721]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index e144e7e..9f12e8d 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -491,6 +491,12 @@ Hello, world!
u"<p>\u2022 AT&amp;T is in the s&amp;p 500</p>"
)
+ def test_apos_entity(self):
+ self.assertSoupEquals(
+ u"<p>Bob&apos;s Bar</p>",
+ u"<p>Bob's Bar</p>",
+ )
+
def test_entities_in_foreign_document_encoding(self):
# &#147; and &#148; are invalid numeric entities referencing
# Windows-1252 characters. &#45; references a character common