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 2.x and 3.x Site Plugin
  • MSITE-257

Double quote character rendered as entity, which breaks JavaScript

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-5
  • Fix Version/s: 2.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.0.7, Maven Site Plugin 2.0-beta-5

Description

When a simple script is included in xdoc source, the double characters get rendered as the html entity " and the script does not execute.

For example, this in xdoc
alert("Hello!");

produces this in the rendered html:
alert("Hello!");

Sample project attached. Execute 'mvn site:run', visit http://localhost:8080/index.html, and view the source of the page.

(Brian Fox discovered this while adding the Google search box to the Maven site.)

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    mysite.zip
    29/Sep/07 11:56 AM
    1 kB
    Wendy Smoak
    1. XML File
      mysite/pom.xml 0.4 kB
    2. XML File
      mysite/src/site/xdoc/index.xml 0.3 kB
    Download Zip
    Show
    Zip Archive
    mysite.zip
    29/Sep/07 11:56 AM
    1 kB
    Wendy Smoak

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. DOXIA-154 Xdoc parser should recognize <script> tag

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Task - A task that needs to be done. MSITE-298 Update to Doxia 1.1.1

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 30/Sep/07 1:25 AM

That's excactly the problem that made me get involved in maven development [1] We never solved it in m1, so I just gave it a whirl this afternoon and got it working. However, Doxia's xml parser needs to support CDATA sections and comments, which it currently doesn't, so I'm afraid you'll have to wait for the beta-1 release of doxia. If that's done, you will be able to do what you want with the following snippet:

<script type="text/javascript">
        <![CDATA[alert("Hello!");]]>
      </script>

[1] http://www.mail-archive.com/users@maven.apache.org/msg11561.html

Show
Lukas Theussl added a comment - 30/Sep/07 1:25 AM That's excactly the problem that made me get involved in maven development [1] We never solved it in m1, so I just gave it a whirl this afternoon and got it working. However, Doxia's xml parser needs to support CDATA sections and comments, which it currently doesn't, so I'm afraid you'll have to wait for the beta-1 release of doxia. If that's done, you will be able to do what you want with the following snippet:
<script type="text/javascript">
        <![CDATA[alert("Hello!");]]>
      </script>
[1] http://www.mail-archive.com/users@maven.apache.org/msg11561.html
Hide
Permalink
Wendy Smoak added a comment - 30/Sep/07 9:19 AM

Thanks Lukas. I should have mentioned that we also tried wrapping it in CDATA, but got the same output. No problem to wait for it to be fixed in Doxia.

Show
Wendy Smoak added a comment - 30/Sep/07 9:19 AM Thanks Lukas. I should have mentioned that we also tried wrapping it in CDATA, but got the same output. No problem to wait for it to be fixed in Doxia.
Hide
Permalink
Lukas Theussl added a comment - 17/Jul/09 1:53 AM

Fixed with MSITE-298.

Show
Lukas Theussl added a comment - 17/Jul/09 1:53 AM Fixed with MSITE-298.

People

  • Assignee:
    Lukas Theussl
    Reporter:
    Wendy Smoak
Vote (0)
Watch (0)

Dates

  • Created:
    29/Sep/07 11:56 AM
    Updated:
    17/Jul/09 1:53 AM
    Resolved:
    17/Jul/09 1:53 AM
  • 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.