The strictness of JSON was one improvement (for security) in recent
versions, but another improvement that was also imposed is the more
rigorous encoding of HTML in cases where HTML is not allowed. It should
still be the case that HTML in tooltips is allowed, but as the
documentation says:
you must do two things:
1. Specify tooltip.isHtml: true in the chart options. This tells the
chart to draw the tooltips in HTML (as opposed to SVG).
2. Mark an entire column, or a specific cell, in the data table with the
html custom property. A datatable column with the tooltip role and HTML
property would be:
dataTable.addColumn({'type': 'string', 'role': 'tooltip', 'p': {'html':
true}})
If there is some HTML that is not being rendered as HTML, please be
specific about what it is. It is possible that not all HTML is allowed to
be used in this way.
On Wed, Sep 9, 2020 at 3:06 AM Martin Husted Hartvig <[email protected]>
wrote:
> Hi,
> In version 46 JSON validation had a brush up and became more strick - I
> had some tooltips that was javascripts, like the createCustomHTMLContent
> example
> shown in the docs:
>
> https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#customizing-html-content
>
> As version 46, and up to 49, html data sent in JSON without quoting
> fails... at least for me. Is this a bug, or is there a workaround? Adding
> quoting makes the JSON valid, but the tooltip is shown with the javascript
> as content.
>
> Regards,
> Martin Husted Hartvig
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/074c882e-a6f8-4237-946e-35288fb83cban%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/074c882e-a6f8-4237-946e-35288fb83cban%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]> Cambridge MA
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOMaunoqVjexGd9iX9rADi1E7Xi46LDRd2LU4sOt1v4yg%40mail.gmail.com.