Using   in the title/tooltip for ajax responses

6 views
Skip to first unread message

grimm...@gmail.com

unread,
Jun 13, 2017, 5:17:53 AM6/13/17
to select2
Hi

I am trying to format the tooltips for the selections in select2. I am using an Ajax data source and generate responses with:

{
"id": "x",
"text": "<b>Some text</b>",
"title": "Some&nbsp;tooltip where&nbsp;breaks&nbsp;are&nbsp;important",
}

It looks like the markup is escaped and if I edit HTML in the chrome development mode I see that "&nbsp;" => "&amp;nbsp;" so I have no control of the new lines.

Is there a way to avoid the escaping of the titles? I have the escapeMarkup setting but it only handles the regular data.

/Magnus

Reply all
Reply to author
Forward
0 new messages