Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2457

Graphs loaded through nvd3 do not display UTF8 characters correctly

    Details

    • Type: Story
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0-b1
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      Wherever nvd3 is used (I think in the System Overview and Billing Overview plugins), we build data via JSON and pass it to the graph. Where we pass a name for graph element we HTML-encode it (via Html::_), which prevents it from being displayed correctly, particularly when it contains UTF-8 characters.

      Instead, we should consider displaying the UTF-8 characters as-is, but we must avoid XSS. For inserting data into JSON, consider passing the unencoded text through php's addslashes to escape quotes and backslashes required by JSON. Test to confirm no issues with XSS for unicode and utf-8 characters, single quotes, double quotes, slashes, etc.

      See https://www.blesta.com/forums/index.php?/topic/10035-graph-caption-doesnt-support-unicode-letters/

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Description Wherever nvd3 is used (I think in the System Overview and Billing Overview plugins), we build data via JSON and pass it to the graph. Where we pass a name for graph element we HTML-encode it (via Html::_), which prevents it from being displayed correctly, particularly when it contains UTF-8 characters.

        Instead, we should consider displaying the UTF-8 characters as-is, but we must avoid XSS. For inserting data into JSON, consider passing the unencoded text through php's _addslashes_ to escape quotes and backslashes [required by JSON|http://www.json.org/]. Test to confirm no issues with XSS for unicode and utf-8 characters, single quotes, double quotes, slashes, etc.
        Wherever nvd3 is used (I think in the System Overview and Billing Overview plugins), we build data via JSON and pass it to the graph. Where we pass a name for graph element we HTML-encode it (via Html::_), which prevents it from being displayed correctly, particularly when it contains UTF-8 characters.

        Instead, we should consider displaying the UTF-8 characters as-is, but we must avoid XSS. For inserting data into JSON, consider passing the unencoded text through php's _addslashes_ to escape quotes and backslashes [required by JSON|http://www.json.org/]. Test to confirm no issues with XSS for unicode and utf-8 characters, single quotes, double quotes, slashes, etc.

        See https://www.blesta.com/forums/index.php?/topic/10035-graph-caption-doesnt-support-unicode-letters/
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.2.0-b1 [ 11014 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.2.0 Sprint 3 [ 48 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Issue Type Bug [ 1 ] Story [ 7 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 40 minutes [ 2400 ]
        Worklog Id 10503 [ 10503 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Dec/17

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 10 minutes
              1h 10m

                Agile