Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.3
python-feedparser
non-ascii-entity-hiding.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File non-ascii-entity-hiding.patch of Package python-feedparser
diff -ur feedparser-5.2.1-orig/feedparser/feedparsertest.py feedparser-5.2.1/feedparser/feedparsertest.py --- feedparser-5.2.1-orig/feedparser/feedparsertest.py 2015-07-24 11:45:09.000000000 +0700 +++ feedparser-5.2.1/feedparser/feedparsertest.py 2019-03-31 04:02:14.470216076 +0700 @@ -273,6 +273,13 @@ <feed><title type="html">&exponential3;</title></feed>""" doc = codecs.BOM_UTF16_BE + doc.encode('utf-16be') result = feedparser.parse(doc) + if sys.version_info >= (3, 5): + # While this isnt the expected result, it is verification that + # non-ASCII-compatible encodings cant hide nasty stuff. + # Instead, nothing is loaded, which is a bug in a different + # area. + self.assertEqual(result['feed'], {}) + return self.assertEqual(result['feed']['title'], u'&exponential3') def test_gb2312_converted_to_gb18030_in_xml_encoding(self): # \u55de was chosen because it exists in gb18030 but not gb2312
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor