-
Couldn't load subscription status.
- Fork 0
ProtoString cleanHTML() Method
Seth Clydesdale edited this page Jun 9, 2015
·
1 revision
Clean the HTML tags and entities from a text string.
'<p>Coffee & Cookies</p>'.cleanHTML(); // returns 'Coffee Cookies'Passing true as the parameter will ignore entities.
'<p>Coffee & Cookies</p>'.cleanHTML(true); // returns 'Coffee & Cookies'The cleanHTML method can be used to clean a text string of HTML tags and entities. You can choose whether or not you want to remove entities by passing a boolean value as the parameter.
String.cleanHTML(ignore);| Parameter | Description |
|---|---|
| ignore | Takes a boolean value which specifies if HTML entities should be ignored. Passing true as the parameter will keep HTML entities. Defaults to removing entities and tags. |
Home • History • ProtoString • Created by Seth Clydesdale