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

site with FAQ plugin strips XML entities

    Details

    • Type: Bug Bug
    • Status: Closed 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
    • Number of attachments :
      0

      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

          Hide
          Vincent Siveton 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
          Vincent Siveton 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
          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
          Vincent Siveton 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
          Vincent Siveton added a comment - Thanks Ted for your test case! Thus, we need to handle XmlPullParser.ENTITY_REF in the FmlParser class. I will do.
          Hide
          Vincent Siveton added a comment -

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

          Show
          Vincent Siveton added a comment - Fixed. Added XmlPullParser.ENTITY_REF in the FmlParser class thus handling XML entities in the question and the answer.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: