Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5717

Report viewer shows literal HTML entities in parameter controls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Incomplete
    • Affects Version/s: 6.0.1 GA
    • Fix Version/s: Backlog
    • Component/s: Report Generation
    • Labels:
      None
    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Browser:
      Google Chrome 48.x
    • Steps to Reproduce:
      Hide

      Create a simple report and add one parameter with a JDBC as the datasource. The data to fill that parameter should have at least one row with non-ascii characters (like "áéíóú"). When you upload the report to biserver and try to see it on the browser, the dropdown to select the parameter will show the HTML entities for the special characters instead of the actual characters.

      Show
      Create a simple report and add one parameter with a JDBC as the datasource. The data to fill that parameter should have at least one row with non-ascii characters (like "áéíóú"). When you upload the report to biserver and try to see it on the browser, the dropdown to select the parameter will show the HTML entities for the special characters instead of the actual characters.

      Description

      As stated above, reports with parameters that fetch data with non-ascii characters show these characters with the HTML entities rendered literally, instead of the expected literally.

      Say one possible value of the character is "Árbol", the shown text is "&Actute;rbol" and so on. Here's a capture: http://i.imgur.com/0lxEjhA.png

      Further inspection shows that the parameters are loaded in the browser using AJAX in XML format (in the /parameter endpoint of the report), and that XML already has the escaped characters. The code involved in this process seems to be this: https://github.com/pentaho/pentaho-platform-plugin-reporting/blob/master/src/org/pentaho/reporting/platform/plugin/ParameterXmlContentHandler.java#L619

      The problem is that the JavaScript in the front-end re-escapes all the parameters (the offending code is in biserver-ce/pentaho-solutions/system/reporting/reportviewer/compressed/reportviewer-app.js).

      A possible solution is to remove the call to the escaping function from the JavaScript, so that the label appears properly, but the problem is actually in the server, as the XML returned by older versions of Pentaho (namely 5.x) is correct, but the one returned by 6.0.1 is not.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            JoseTomasTocino José Tomás Tocino
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: