Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-30244

HTML Character encoding of non-standard ASCII Characters in Chart Plugin

      Steps to Reproduce:

      1. Have a browser in French language
      2. Create a page in Confluence
      3. Use a Chart Macro
      4. Have a HTML macro inside the chart Macro
      5. You can have a HTML table, plus a foreign language character inside your table. I have a sample code below.
        {html}
        <table border="1">
        <tr>
        <td>ABC</td>
        <td>50</td>
        </tr>
        <tr>
        <td>&eacute;</td>
        <td>39</td>
        </tr>
        </table>
        {html}
        

        Note the existence of &eacute ; in the table.

        Expected Results:

      Characters should be encoded. and table should be displayed.

      Actual Results:

      Characters will not be encoded, and instead there will be an error asn you can see below.

      • Error:
        Erreur du rendu de la macro 'chart' : org.dom4j.DocumentException: Error on line 2 of document : The reference to entity "eacute" must end with the ';' delimiter. Nested exception: The reference to entity "eacute" must end with the ';' delimiter.
      • Translation of Error:
        Error rendering macro 'chart': org.dom4j.DocumentException: Error on line 2 of document: The reference to entity "eacute" must end with the ';' delimiter. Nested exception: The reference to entity "eacute" must end with the ';' delimiter.

      Findings:

      This issue does not happen in English browsers.

      Workaround:

      1. Go to marketplace.atlassian.com and download version 2.0.1 of Chart Plugin.
      2. Go to your Universal Plugin Manager.
      3. Go to Manage Add-ons.
      4. Find Chart Plugin and click Uninstall button.
      5. Click Upload Plugin.
      6. Choose the downloaded .jar file for version 2.0.1, upload.

            [CONFSERVER-30244] HTML Character encoding of non-standard ASCII Characters in Chart Plugin

            Minh Tran added a comment -
            Atlassian update

            Thank you for taking the time to raise, comment or vote on this Bug. Currently this bug indicates that it only impacts a version of Confluence which is no longer in support, therefore we are closing this issue as Timed Out.
            If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue.
            Thanks again.
            Regards,
            Confluence Development

            Minh Tran added a comment - Atlassian update Thank you for taking the time to raise, comment or vote on this Bug. Currently this bug indicates that it only impacts a version of Confluence which is no longer in support, therefore we are closing this issue as Timed Out. If this issue is still impacting you on a recent version please feel free to comment with the affected version. Any further details you may be able to provide regarding reproduction or impact of this issue may help us better address this issue. Thanks again. Regards, Confluence Development

            With the current version 5.5.6 there is no way to downgrade the plugin.

            Deleted Account (Inactive) added a comment - With the current version 5.5.6 there is no way to downgrade the plugin.

            Hi Lam

            Thanks for the update. This should indeed help us with our investigation

            Regards

            Steve Haffenden (Inactive) added a comment - Hi Lam Thanks for the update. This should indeed help us with our investigation Regards

            Lam added a comment - - edited

            Hi Steve,
            We have found a workaround from the following link by using XHTML as escape mode instead of HTML http://stackoverflow.com/questions/12243866/jsoup-escape-utf-8-characters-into-eacute-etc-not-in-script-tags
            Please find following our original and modified code with the workaround:
            Original code:
            Element htmlBody = Jsoup.parseBodyFragment(body).body();
            Code with workaround that it is working fine:
            Document doc = Jsoup.parseBodyFragment(body);
            doc.outputSettings().escapeMode(EscapeMode.xhtml);
            Element htmlBody = doc.body();

            Hope this will help you in your future investigation.

            Regards,
            JC.

            Lam added a comment - - edited Hi Steve, We have found a workaround from the following link by using XHTML as escape mode instead of HTML http://stackoverflow.com/questions/12243866/jsoup-escape-utf-8-characters-into-eacute-etc-not-in-script-tags Please find following our original and modified code with the workaround: Original code: Element htmlBody = Jsoup.parseBodyFragment(body).body(); Code with workaround that it is working fine: Document doc = Jsoup.parseBodyFragment(body); doc.outputSettings().escapeMode(EscapeMode.xhtml); Element htmlBody = doc.body(); Hope this will help you in your future investigation. Regards, JC.

              Unassigned Unassigned
              htoussi HosseinA
              Affected customers:
              9 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: