Subject: [xml2rfc] #182: reference target that contains '&' causes an error

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 24 Jun 2013 22:00:26 -0000

#182: reference target that contains '&' causes an error

 The reference's target is a URL that contains ampersands; it seems to get
 misinterpreted as an entity. (v1 did not do that.)

 Example: (1) http://www.ietf.org/id/draft-cardenas-dff-14.xml and the (2)
 attached XML file.

 (1) had the URL in seriesInfo's value, but the same error appears in (2)
 when the URL is in the reference's target attribute.

 {{{
 <reference anchor="KCEC_press_release"
 target="http://www.kitcarson.com/index.php?option=com_content&view=article&id=45&Itemid=1">

 ...

 <reference anchor="DFS_wikipedia"
 target="http://en.wikipedia.org/w/index.php?title=Depth-
 first_search&oldid=549733112">
 }}}

 Yields

 {{{
 ERROR: Unable to parse the XML document: test/draft-cardenas-dff-14.xml
  test/draft-cardenas-dff-14.xml: Line 1612: EntityRef: expecting ';'
  test/draft-cardenas-dff-14.xml: Line 1612: EntityRef: expecting ';'
  test/draft-cardenas-dff-14.xml: Line 1612: EntityRef: expecting ';'
  test/draft-cardenas-dff-14.xml: Line 1670: EntityRef: expecting ';'
 }}}

-- 
-----------------------------+----------------------------------
 Reporter:  [email-masked]  |      Owner:  [email-masked]
     Type:  defect           |     Status:  new
 Priority:  medium           |  Milestone:
Component:  Version 2 cli    |    Version:  2.4.x
 Keywords:                   |
-----------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/182>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Mon, 24 Jun 2013 22:27:22 -0000

Comment (by [email-masked]):

 This is an example of where the old version's lax XML parser allowed you
 to write invalid XML.  Ampersands begin entities in this context, so the
 only way to have valid XML is to replace them with &amp; .

 http://www.fenron.com/~fenner/ietf/xml2rfc-valid/ is meant to help find
 issues like this.

-- 
------------------------------+----------------------------------
Resolution:                   |   Keywords:
------------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/182#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Tue, 25 Jun 2013 05:37:42 -0000

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => invalid

Comment:

 That's broken XML. The ampersand needs to be escaped as "&amp;".

-- 
------------------------------+----------------------------------
  Reporter:  [email-masked]  |      Owner:  [email-masked]
      Type:  defect           |     Status:  closed
  Priority:  medium           |  Milestone:
 Component:  Version 2 cli    |    Version:  2.4.x
Resolution:  invalid          |   Keywords:
------------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/182#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>