SAPO::Utility.String->stripTags
This method will remove HTML tags of the string.
This is static method.
Syntax
SAPO.Utility.String.stripTags(string, string)
Compatibility
| All browsers | Yes |
Depends
Input Parameters
- (string) string : Input string
- (string) string : Optional string with list of allowed tag names.
Sample
http://js.sapo.pt/SAPO/Utility/String/sample/
Example
alert(SAPO.Utility.String.stripTags('hello <b>HERE</b> I aM'));
or
alert(SAPO.Utility.String.stripTags('<p>hello <b>HERE</b> I<br /> aM</p>', 'b,u,i,a'));
//
// will be removed "<p>, <br />, </p>" tags
//
Community feedback