BS4 drops '?' from processing instructions
Bug #1504383 reported by
Andrew Mercer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running the following script:
import bs4
xml = '<?xml version="1.0" encoding=
soup = bs4.BeautifulSo
str(soup)
Produces the following output:
'<?xml version="1.0" encoding=
The closing ? has been stripped from the <?dtall ... ?> tags.
OS: Windows 7
Python 3.4.3
Parser lxml 3.4.4
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I believe the following needs to be changed in element.py"
class ProcessingInstr uction( PreformattedStr ing):
PREFIX = '<?'
SUFFIX = '>'
should be
class ProcessingInstr uction( PreformattedStr ing):
PREFIX = '<?'
SUFFIX = '?>'