Superfluous XML namespace declarations when serializing
Reported by
sgij...@opentext.com,
Sep 28 2017
|
|||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce the problem:
1. testDoc = new DOMParser().parseFromString('<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure>cc</failure></outer></xhtml:head></xhtml:html>',"text/xml")
2. new XMLSerializer().serializeToString(testDoc)
What is the expected behavior?
Following result:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure>cc</failure></outer></xhtml:head></xhtml:html>
What went wrong?
Following result, note the superfluous xmlns declaration on the failure element:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure xmlns="">cc</failure></outer></xhtml:head></xhtml:html>"
Did this work before? Yes Chrome 60
Does this work in other browsers? Yes
Chrome version: 61.0.3163.100 Channel: stable
OS Version: Linux Mint Debian Edition
Flash Version: None
,
Sep 29 2017
Unable to reproduce this issue on Ubuntu 14.04 ,Mac 10.12.6 and Windows 10 using chrome stable 61.0.3169.100 and latest dev 63.0.3227.0 with steps mentioned in comment#0. 1.Downloaded and opened attached xml file in browser. 2.In console of devtools no output is seen. 3.In elements tab and sources tab <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xhtml:head> <outer xmlns=""><failure>cc</failure></outer> </xhtml:head> </xhtml:html> is seen. Attaching video for reference. @Reporter: Could you please check and the screen cast and let us know whether we are missing any steps? and could you tell us where to check the output?
,
Sep 29 2017
Based on the posted report, it seems the steps to reproduce were not followed. I deleted the attached file, as it only contained the same XML as in the steps to reproduce and was apparently misleading with regards to testing this issue. Executing the steps to reproduce in the Console should show the issue.
,
Sep 29 2017
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 3 2017
Able to reproduce this issue with steps mentioned in comment#0 on reported version 61.0.3163.100 , on latest stable 61.0.3163.100 and on latest canary 63.0.3225.0 using Mac 10.12.6, Ubuntu 14.04 and Windows 10. Manual Bisect Info: =============== Good Build: 61.0.3136.0 Bad Build: 61.0.3137.0 You are probably looking for a change made after 480789 (known good), but no later than 480790 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/14f53c5be474c4492cbbe36b8fe816013124ab86..758742204e186ac83e73b4a393bdfaa660e2ca15 From above CL suspecting the below change https://chromium.googlesource.com/chromium/src/+/758742204e186ac83e73b4a393bdfaa660e2ca15 tkent@ : Please confirm the bug and help in re-assigning to correct owner if it is not related to your change. Thanks!!
,
Oct 3 2017
,
Oct 3 2017
Looks like tkent@ is unavailable currently, hence re-assigning to yosin@ as the reviewer of CL for inputs.
,
Oct 3 2017
,
Oct 4 2017
Mark Available since I'm not familiar with libxml/libxslt. I've just reviewed some trivial things. Please see third_party/libxml/OWNERS
,
Oct 4 2017
,
Oct 4 2017
As per comment #9 cc'ing few file owner for more updates on this issue and changing priority to P1. Thanks!
,
Oct 4 2017
cc'ing shruthi to help us find the write owner for this issue.
,
Oct 5 2017
cc dcheng@, looks like you are the right POC for Blink>XML now. Could you please help find an owner for this issue?
,
Oct 5 2017
Looks like scottmg@ and dcheng@ would be the POCs for Blink>XML, so cc-ing scottmg@ as well
,
Oct 6 2017
This issue isn't related to libxml and libxslt. The code is in core/editing/serializers/. Priority isn't hight. Superfluous xmlns="" is harmless.
,
Oct 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4f839ffc0c3887ce9df2eb58517437fcff2f2026 commit 4f839ffc0c3887ce9df2eb58517437fcff2f2026 Author: Kent Tamura <tkent@chromium.org> Date: Fri Oct 06 06:22:28 2017 XMLSerializer: Fix existence check of xmlns="". The URI value for xmlns="" stored in |Namespace| is an empty string because it's based on attribute value, and |namespace_uri| argument of AppendNamespace() is a null string because it's based on QualifiedName::NamespaceURI(). AppendNamespace() needs to care of this difference. Bug: 769626 Change-Id: Ib38bbacd7652f359e526c26f180c6a9ef78da109 Reviewed-on: https://chromium-review.googlesource.com/704274 Commit-Queue: Kent Tamura <tkent@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#506993} [modify] https://crrev.com/4f839ffc0c3887ce9df2eb58517437fcff2f2026/third_party/WebKit/LayoutTests/external/wpt/domparsing/XMLSerializer-serializeToString.html [modify] https://crrev.com/4f839ffc0c3887ce9df2eb58517437fcff2f2026/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
,
Oct 6 2017
|
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by ligim...@chromium.org
, Sep 28 2017