Iâm developing a wordpress plugin using qtip2.
Line breaking are not working.
When trying to create an in-memory div via a JS code following
HTML-encoding lost when attribute read from input field
The JS file should add the htmlDecode function code:
function htmlDecode(value){
return JQuery('<div/>').html(value).text();
}
But unfortunately I’m getting “Unexpected token ILLEGAL” since WP adds a superfluous
</p>
and the post’s code breaks (from chrome DevTools):
return jQuery(("</p>
<div/>").html(value)).text(); } });
Please advice
Solved by using the Javascript version of htmlDecode