I am using the tinymce editor in my web page. When I try to post some comment, it posts in the following format:
<p><p>Hi</p><br /><p>Lauren how are you?</p></p>
instead of:
<p>Hi</p>
<p>Lauren how are you?</p>
I have tried to sort this out but nothing helped.
您也可以使用html_entity_decode()
。
echo html_entity_decode('<p>Hi</p><br /><p>Lauren how are you?</p>');
Try with decodeURIComponent Method.
str = "<p><p>Hi</p><br /><p>Lauren how are you?</p></p>";
document.write(decodeURIComponent(str.replace(/\+/g, ' ')));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.