emoticons icon indicating copy to clipboard operation
emoticons copied to clipboard

Html escape issue

Open Sylwekqaz opened this issue 8 years ago • 1 comments

In demo html output is not escaped. for example if you type <img src="https://www.google.pl/images/nav_logo242.png" /> in textbox then demo shows Google logo instead of text

Sylwekqaz avatar Jun 16 '16 07:06 Sylwekqaz

I don't think it's important for demo here but if you need to do that, simply replace
$text.html($.emoticons.replace($in.val())); with $text.html($.emoticons.replace($in.val().replace("<","&lt").replace(">","&gt"))); and you solved your problem :)

And you may need to redifine emoticons code for emoticon codes containing ["<",">"] , you replace those chars with ["&lt","&gt"]

MarkoMackic avatar Jun 16 '16 08:06 MarkoMackic