Maven Site Plugin
  1. Maven Site Plugin
  2. MSITE-156

site with FAQ plugin strips XML entities

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-5
    • Fix Version/s: 2.0-beta-5
    • Component/s: None
    • Labels:
      None
    • Environment:
      WinXP

      Description

      When using the FAQ plugin with site, entities lke < and > are stripped out, and the corresponding character is not injected.

      <a href="http://struts.apache.org">Apache Struts</a>

      renders as

      a href="http://struts.apache.org"Apache Struts/a

      instead of

      <a href="http://struts.apache.org">Apache Struts</a>

        Issue Links

          Activity

          Ted Husted created issue -
          Hide
          Siveton Vincent added a comment -

          I tried with a small faq and I cant reproduce it. Here is my test:

           
          <faqs id="FAQ" title="Frequently Asked Questions">
            <part id="General">
              <faq id="blabla">
                <question>blabla?</question>
                <answer>
                  <a href="http://struts.apache.org">Apache Struts</a>
                  <p>
                  Download <a href="http://struts.apache.org">Apache Struts</a>
                  </p>
                </answer>
              </faq>
            </part>
          </faqs>
          

          Feel free to reopen it if it doesnt fix.

          Tips: try mvn -up or -U to update pulgins

          Show
          Siveton Vincent added a comment - I tried with a small faq and I cant reproduce it. Here is my test: <faqs id= "FAQ" title= "Frequently Asked Questions" > <part id= "General" > <faq id= "blabla" > <question> blabla? </question> <answer> <a href= "http://struts.apache.org" > Apache Struts </a> <p> Download <a href= "http://struts.apache.org" > Apache Struts </a> </p> </answer> </faq> </part> </faqs> Feel free to reopen it if it doesnt fix. Tips: try mvn -up or -U to update pulgins
          Siveton Vincent made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Cannot Reproduce [ 5 ]
          Assignee Vincent Siveton [ siveton ]
          Hide
          Ted Husted added a comment -

          JIRA is resolving the XML entities, and I can't tell if your test inculdes them or not.

          The test should include & l t ; (without the spaces) and other XML entities.

          So a FAQ with a hyperlink doesn't seem like a test. The test would be a FAQ like

          <faqs id="FAQ" title="Frequently Asked Questions">
            <part id="General">
              <faq id="a">
                <question>How do I create a hyperlink?</question>
                <answer>
                   <p>
                   Use the &lt;a&gt; tag. 
                  </p>
                </answer>
              </faq>
            </part>
          </faqs>
          

          -Ted.

          Show
          Ted Husted added a comment - JIRA is resolving the XML entities, and I can't tell if your test inculdes them or not. The test should include & l t ; (without the spaces) and other XML entities. So a FAQ with a hyperlink doesn't seem like a test. The test would be a FAQ like <faqs id= "FAQ" title= "Frequently Asked Questions" > <part id= "General" > <faq id= "a" > <question>How do I create a hyperlink?</question> <answer> <p> Use the &lt;a&gt; tag. </p> </answer> </faq> </part> </faqs> -Ted.
          Hide
          Siveton Vincent added a comment -

          Thanks Ted for your test case!

          Thus, we need to handle XmlPullParser.ENTITY_REF in the FmlParser class. I will do.

          Show
          Siveton Vincent added a comment - Thanks Ted for your test case! Thus, we need to handle XmlPullParser.ENTITY_REF in the FmlParser class. I will do.
          Siveton Vincent made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          Siveton Vincent added a comment -

          Fixed.
          Added XmlPullParser.ENTITY_REF in the FmlParser class thus handling XML entities in the question and the answer.

          Show
          Siveton Vincent added a comment - Fixed. Added XmlPullParser.ENTITY_REF in the FmlParser class thus handling XML entities in the question and the answer.
          Siveton Vincent made changes -
          Resolution Fixed [ 1 ]
          Fix Version/s 2.0-beta-5 [ 12541 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          Dennis Lundberg made changes -
          Link This issue is depended upon by MNG-2475 [ MNG-2475 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:16:22 UTC 2015 [ 1428239782088 ]
          Mark Thomas made changes -
          Workflow jira [ 12726545 ] Default workflow, editable Closed status [ 12757260 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 01:19:02 UTC 2015 [ 1428283142430 ]
          Mark Thomas made changes -
          Workflow jira [ 12964282 ] Default workflow, editable Closed status [ 13001196 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          20d 18m 1 Siveton Vincent 27/Jul/06 16:33
          Closed Closed Reopened Reopened
          7d 31m 1 Siveton Vincent 03/Aug/06 17:04
          Reopened Reopened Closed Closed
          17h 43m 1 Siveton Vincent 04/Aug/06 10:47

            People

            • Assignee:
              Siveton Vincent
              Reporter:
              Ted Husted
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development