Purpose
Leaves special HTML characters uninterpreted.
Syntax
string strMask (in string string)
Parameters
string |
String to be evaluated for presence of special HTML characters. |
Return Value
This function returns the equivalent encoded characters of special HTML characters passed in the input string.
HTML provides escape symbols for many characters. The format of these symbols is &<string>; where <string> represents the relevant HTML character.
The escape symbol for < (less than sign) is <
Therefore, if you pass the string <test to strMask, the return value is <test
The Web browser displays <test because the < character remains uninterpreted.
The escape symbol for > (greater than sign) is >
Therefore, if you pass the string >test to strMask, the return value is >test
The Web browser displays >test because the > character remains uninterpreted.
This is summarized in the following table:
Character |
Escape symbol |
Input string |
Return value |
Web browser |
< |
< |
<test |
<test |
<test |
> |
> |
>test |
>test |
>test |
`mystring="<test"` `strMask (mystring)` `write(mystring)`