How to Encode/Decode HTML Entities?
Posted: Mon May 07, 2018 4:41 pm
Is there a way to Encode/Decode HTML Entities?
Greetings
Ezequiel
Greetings
Ezequiel
- a basic to master the web -
https://forums.spiderbasic.com/
Code: Select all
Procedure.s EncodeHTML(HTML.s)
! return $('<div />').text(v_html).html();
EndProcedure
Procedure.s DecodeHTML(Text.s)
! return $('<div />').html(v_text).text();
EndProcedure
Debug EncodeHTML("Some text with <div>html</div>")
Debug DecodeHTML("Some text with <div>html</div>")