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
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
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/ |
Fix Version/s | 4.2.0-b1 [ 11014 ] |
Sprint | 4.2.0 Sprint 3 [ 48 ] |
Rank | Ranked higher |
Issue Type | Bug [ 1 ] | Story [ 7 ] |
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 40 minutes [ 2400 ] | |
Worklog Id | 10503 [ 10503 ] |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |