WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
117764
Serializer doesn't handling inconsistent prefixes properly
https://bugs.webkit.org/show_bug.cgi?id=117764
Summary
Serializer doesn't handling inconsistent prefixes properly
Alex Milowski
Reported
2013-06-18 17:10:28 PDT
When constructing an XML document programmatically, the namespaces in use and prefixes may be inconsistent. For example, the results of merging cloned nodes from different sources may end up with conflicting prefix to namespace mappings. These conflicts must be detected and the prefixes adjusted. The current implementation allows multiple namespace attributes for the same prefix which results in an XML parsing error for any receiving application.
Attachments
An example of inconsistent handling of namespaces for attributes
(989 bytes, application/xhtml+xml)
2013-06-19 11:11 PDT
,
Alex Milowski
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2013-06-19 10:33:15 PDT
Could you please attach a test case fixing which would be the purpose of this bug? We have quite a few bugs about namespace serialization already, and it's difficult to track them without explicitly distinct test cases.
Alex Milowski
Comment 2
2013-06-19 11:11:09 PDT
Created
attachment 205019
[details]
An example of inconsistent handling of namespaces for attributes Here is the missing attachment that I thought I filed with the original bug. The test does: 1. Creates two attributes with different namespaces but the same prefix. 2. Redefined a common prefix (xlink). The outcome right now is: 1. The "p" prefix is declared twice with to different namespace URIs. 2. A extra xmlns:xlink attribute that maps the the XLink namespace URI is added. Of course, that won't parser properly on the way back in.
Rob Buis
Comment 3
2013-07-01 18:49:50 PDT
Bug 19121
has a patch up that fixes this bug too. I incorporated the testcase in it.
Rob Buis
Comment 4
2013-08-29 06:49:43 PDT
Committed
r154779
: <
http://trac.webkit.org/changeset/154779
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug