Is there a way to Encode/Decode HTML Entities?
Greetings
Ezequiel
How to Encode/Decode HTML Entities?
Re: How to Encode/Decode HTML Entities?
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>")
Greetings ... Peter
Re: How to Encode/Decode HTML Entities?
Thank you Peter.
It works great.
Ezequiel
It works great.
Ezequiel