1
How to make a function that cleans HTML? I have a field that comes from a WS and needs, before displaying on the page, to clear HTML.
They sent me this:
String result = Regex.Replace(htmlDocument, @"<[^>]*>", String.Empty);
I need to put this code in a jquery function, right here and the this.ShortDescription
is the guy I want to clean up. How I do?
str += '<p>' + this.ShortDescription + '</p>';
The above code is part of a jQuery function.
How to clear html?
– Silvio Andorinha
@pnet, for example your input is
<p><strong>algum texto.....</strong></p>
and you want some function to just returnalgum texto
that’s it?– rray