tooltip_html() html()

Tooltip text as safe HTML: the text of tooltip() under a Tailwind CSS driver goes through it.

html()->tooltip_html($text)

Options

OptionMeaning
$textText; <b>, <i>, <code> and <br> without attributes stay (balanced), other tags, attributes, comments and script / style content are dropped, the rest is escaped; a line break becomes <br>.

Example

Use tip(), bold

Code

return html()->tooltip_html('Use <code>tip()</code>, <b onclick="x()">bold</b><img src=x onerror=alert(1)>');

See also: html/tooltip