Uploaded image for project: 'Maven Doxia'
  1. Maven Doxia
  2. DOXIA-362

Entities in attribute values are not escaped

    XMLWordPrintableJSON

Details

    Description

      xdoc source:

      <a href="http://example.com/example.html?version=latest&amp;login=example">link</a>
      <img src="http://example.com/example.jpg?version=latest&amp;login=example" alt="image"/>
      <script type="text/javascript" src="http://example.com/example.js?version=latest&amp;login=example"></script>
      

      result:

      <a href="http://example.com/example.html?version=latest&amp;login=example" class="externalLink">link</a>
      <img src="http://example.com/example.jpg?version=latest&login=example" alt="image" />
      <script type="text/javascript" src="http://example.com/example.js?version=latest&login=example"></script>
      

      ie for the <script> and <img> src attribute, the ampersand gets un-escaped. The reason is that the plexus MXParser (correctly) normalizes attribute values, but the XhtmlBaseSink doesn't re-escape them.

      Attachments

        Activity

          People

            ltheussl Lukas Theussl
            ltheussl Lukas Theussl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: