i have a long string dat can contain html tags
applying htmlencode will encode all the tags
but i want this method to leave some specific tags intact
how is it possible
i have a long string dat can contain html tags applying htmlencode will encode
Share
Encode the entire string, then decode the specific tags that you don’t want encoded.
If you are allowing only simple tags without any attributes (like for example
<b>and<u>), then you can decode them using a simpleReplace.