Declaration
public static string HtmlEscape(
this string input,
bool leaveSingleQuotesAlone = false,
bool leaveDoubleQuotesAlone = false
)
Summary
Escapes all necessary characters in the specified string so as to make it usable safely in an HTML or XML
context.
Parameters
this string | input |
The string to apply HTML or XML escaping to. |
bool | leaveSingleQuotesAlone |
If true , does not escape single quotes (' , U+0027). |
bool | leaveDoubleQuotesAlone |
If true , does not escape single quotes (" , U+0022). |
Returns
The specified string with the necessary HTML or XML escaping applied.