html.neuterTags
| Syntax |
html.neuterTags (s, adrTable)
|
| Params |
s is a string. adrTable is the address of a table defining which HTML tags should not be neutered.
|
| Action |
Neuters all HTML tags in s with the exception of those specified in the table pointed to by adrTable. Also, optionally make sure that legal tags are properly balanced, add closing tags at the end of s as neccessary.
|
| Returns |
The modified string.
|
| Examples |
html.neuterTags ("<b>Beep</b>, <i>Beep!", @config.mainResponder.prefs.legalTags) » "<b>Beep</b>, <i>Beep!</i>"
|
| Notes |
Neutering a tag means replacing the leading "<" with the corresponding entity "<". If html.neuterTags identifies a tag in the input string, it checks the table pointed to by adrTable for an object with the same name as the tag. If there is no corresponding object in the table the tag is neutered. If there is a corresponding object and it is a table, then it must contain two items: flLegal, a boolean specifying whether the tag is legal, and flClose, a boolean specifying whether an appropriate number of closing tags should be emitted to keep this tag balanced in the target string. If there is a corresponding object and it is not a table, it is coerced to a boolean. If the result is true, the tag is assumed to be legal, but an appropriate number of closing tags will be emitted. If the result is false, the tag is neutered. This verb is new in Frontier 6.1.
|
| See Also |
html.neuterMacros
|