<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24174</bug_id>
          
          <creation_ts>2013-12-28 21:58:53 +0000</creation_ts>
          <short_desc>&lt; should be quoted in attribute values</short_desc>
          <delta_ts>2014-10-13 23:45:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM Parsing and Serialization</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>24795</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Victor Costan">costan</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97879</commentid>
    <comment_count>0</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2013-12-28 21:58:53 +0000</bug_when>
    <thetext>The XML specification forbids &lt; in attribute values.

Source 1: see the grammar for AttValue below.
http://www.w3.org/TR/REC-xml/#sec-common-syn

Source 2: http://www.w3.org/TR/REC-xml/#CleanAttrVals


The XML serialization algorithm in the DOM Parsing and Serialization specification can produce &lt; in XML attribute values.

https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.html#dfn-concept-serialize-xml-attributes

Specifically, step 2 substep 4 only quotes &quot; and &amp;. It should also quote &lt; as &amp;lt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97994</commentid>
    <comment_count>1</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2014-01-04 19:29:33 +0000</bug_when>
    <thetext>One more note -- all browsers currently quote both &lt; (as ^&amp;lt;) and &gt; (as &amp;gt;) in XML attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99665</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-02-04 17:48:54 +0000</bug_when>
    <thetext>How about we just spec the behavior that all browsers have, then?  Quoting &apos;&lt;&apos; but not &apos;&gt;&apos; makes for pretty bizarre behavior when things try to paren-match and whatnot, so while it&apos;s valid XML to leave the &apos;&gt;&apos; as is, it&apos;s less confusing to just escape it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99693</commentid>
    <comment_count>3</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2014-02-04 21:54:26 +0000</bug_when>
    <thetext>I completely agree with quoting both &apos;&lt;&apos; and &apos;&gt;&apos; in XML attributes.

It&apos;d be nice if the spec included a non-normative reference to the XML grammar, so other poor confused souls will easily understand why &apos;&lt;&apos; and &apos;&gt;&apos; are unescaped in HMTL attrs, but escaped in XML attrs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101301</commentid>
    <comment_count>4</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-02-25 01:14:07 +0000</bug_when>
    <thetext>Sounds good. I&apos;ve made this change to the XML attributes serializing section, including a note referencing XML.

https://dvcs.w3.org/hg/innerhtml/rev/bfa43ce953aa</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101318</commentid>
    <comment_count>5</comment_count>
    <who name="Victor Costan">costan</who>
    <bug_when>2014-02-25 08:38:45 +0000</bug_when>
    <thetext>Thank you very much!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113055</commentid>
    <comment_count>6</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-10-13 23:44:29 +0000</bug_when>
    <thetext>*** Bug 24795 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113057</commentid>
    <comment_count>7</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-10-13 23:45:48 +0000</bug_when>
    <thetext>*** Bug 24211 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>