Issue #55 resolved

Escape strings

Anonymous avatarAnonymous created an issue

I have a pie chart and one of the labels has a & in it. I could escape it on my end but I can't really think of a useful situation where I would want to use HTML in the labels so I guess it would be best to escape them on the library side.

In case anyone does need it, maybe add an option to treat any strings as HTML.

Comments (3)

  1. Anonymous

    Yes. The strings in the legend if I put ["Foo & Bar",10],["Foo > Bar",7] into a pie chart. It's probably the same for the title option and the series labels though. As I said I would make escaping the default and an option to disable it but I can live with it either way. :)

    Note that I'm working with application/xhtml+xml. For "normal" html the & will probably only give an invisble warning but for "real" xml it renders the whole page useless. Well, actually it just stops all JavaScript execution when jqPlot attempts to add the label to the page.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.