Al Grant
Al Grant

Reputation: 2354

Adding Escaped Quotes to Highcharts label

I want to add the clickable telephone numbers to a High Charts Organizational Chart.

The data for each text box looks like:

nodes: [{
       id: 'CEO',
       title: 'The Boss',
       name: '<a href="tel: 123456">Jo Bloggs</a>',
       },{

I tried to escape the " marks with &#39 but that did not help, i.e.:

nodes: [{
       id: 'CEO',
       title: 'The Boss',
       name: '<a href=&#39tel: 123456&#39>Jo Bloggs</a>',
       },{

Upvotes: 0

Views: 111

Answers (1)

Consider use the Unicode Character 'QUOTATION MARK' (U+0022) \u0022.

Example:

nodes: [{
       id: 'CEO',
       title: 'The Boss',
       name: '<a href=\u0022tel: 123456\u0022>Jo Bloggs</a>',
       },{

See working jsfiddle and check the value Employee - Torstein Hønsi:

Example:

{
    id: 'CPO',
    title: 'CPO',
    name: '<a href=\u0022#\u0022>Employee - Torstein Hønsi</a>',
    image: 'https://wp-assets.highcharts.com/www-highcharts-com/blog/wp-content/uploads/2020/03/17131213/Highsoft_03998_.jpg'
}

Upvotes: 1

Related Questions