Escapes a string converting HTML special characters.
htmlEscape( string, [output] )
string | The string to be converted. |
output | A stream where to place the output. |
Return | A converted string, or nil if writing to a string. |
This function converts special HTML characters to HTML sequences:
If an output stream is specified, then the output is sent there instead being returned in a new string. If the output of this function must be sent directly to output, a true value can be passed to send data directly to the VM output stream (usually linked with web server data stream). This will spare memory and CPU.