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/