jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x XDoc Plugin
  • MPXDOC-66

XML entities in project description cause xdoc to complain

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    Windows XP

Description

In my project.xml, I have a description that includes a URL; the URL contains ampersands, so I encode the & as &, like this: http://mysite.com/x.jsp?a=1&b=2.

By the time this data makes it to target/generated-xdocs/navigation.xml, it's been unescaped, so the data in there is simply: http://mysite.com/x.jsp?a=1&b=2. Of course, this is no longer valid XML, so the xdoc plugin fails:
BUILD FAILED
File...... file:/d:/maven/plugins/maven-xdoc-plugin-1.4/
Element... x:parse
Line...... 328
Column.... 43
Error on line 12 of document file:/D:/maven/target/generated-xdocs/index.xml : The reference to entity "nodeId" must end
with the ';' delimiter. Nested exception: The reference to entity "nodeId" must end with the ';' delimiter.

I tried double-escaping, so that the original has & for the original ampersand. The plugin runs to completion, but the resulting HTML file has spaces before and after the ampersand.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 07/Apr/04 9:28 PM

I think this is unavoidable. You should wrap the description in the POM with a <![CDATA[...]]> tag. Tested and confirmed this works.

Show
Brett Porter added a comment - 07/Apr/04 9:28 PM I think this is unavoidable. You should wrap the description in the POM with a <![CDATA[...]]> tag. Tested and confirmed this works.

People

  • Assignee:
    Brett Porter
    Reporter:
    Daniel Rabe
Vote (0)
Watch (1)

Dates

  • Created:
    06/Oct/03 12:52 PM
    Updated:
    07/Apr/04 9:28 PM
    Resolved:
    07/Apr/04 9:28 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.