Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4:Update
python-feedparser.import4630
feedparser-issue195.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File feedparser-issue195.patch of Package python-feedparser.import4630
Index: feedparser-4.1/tests/wellformed/sanitize/item_content_encoded_script_nested_cdata.xml =================================================================== --- /dev/null +++ feedparser-4.1/tests/wellformed/sanitize/item_content_encoded_script_nested_cdata.xml @@ -0,0 +1,11 @@ +<!-- +Description: ensure nested CDATA sections are sanitized properly +Expect: not bozo and entries[0]['content'][0]['value'] == u'<![CDATA[]]>' +--> +<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"> +<channel> + <item> + <content:encoded><![CDATA[<![CDATA[<script></script>]]>]]></content:encoded> + </item> +</channel> +</rss> Index: feedparser-4.1/tests/illformed/sanitize/item_content_encoded_script_nested_cdata.xml =================================================================== --- /dev/null +++ feedparser-4.1/tests/illformed/sanitize/item_content_encoded_script_nested_cdata.xml @@ -0,0 +1,11 @@ +<!-- +Description: ensure nested CDATA sections are sanitized properly +Expect: bozo and entries[0]['content'][0]['value'] == u'<![CDATA[]]>' +--> +<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"> +<channel> + <item> + <content:encoded><![CDATA[<![CDATA[<script></script>]]>]]></content:encoded> + </item> +</channel> +</rss Index: feedparser-4.1/feedparser.py =================================================================== --- feedparser-4.1.orig/feedparser.py +++ feedparser-4.1/feedparser.py @@ -1649,6 +1649,7 @@ class _HTMLSanitizer(_BaseHTMLProcessor) def _sanitizeHTML(htmlSource, encoding): p = _HTMLSanitizer(encoding) + htmlSource = htmlSource.replace('<![CDATA[', '<![CDATA[') p.feed(htmlSource) data = p.output() if TIDY_MARKUP:
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