The string value to be converted into a HTML safe form
The converted string as HTML
encodeAsHtml("HelloDarkness"); // "HelloDarkness"
encodeAsHtml("Hello Darkness"); // "Hello Darkness"
encodeAsHtml("hello.Darkness"); // "hello.Darkness"
encodeAsHtml("hello-Darkness"); // "hello-Darkness"
encodeAsHtml("hello_Darkness"); // "hello_Darkness"
encodeAsHtml("abc-123"); // "abc-123"
encodeAsHtml("0abc0"); // "0abc0"
encodeAsHtml("\"HelloDarkness\""); // ""HelloDarkness""
encodeAsHtml("\"Hello Darkness\""); // ""Hello Darkness""
encodeAsHtml("\"hello Darkness\""); // ""hello Darkness""
encodeAsHtml("\"hello Darkness\""); // ""hello Darkness""
encodeAsHtml("\"hello .,#<[]>Darkness\""); // ""hello .,#<[]>Darkness""
encodeAsHtml("<script src=\"javascript:alert('Hello');\"></script>"); // "<script src="javascript:alert('Hello');"></script>"
Encode the provided string to a safe HTML form, converting the base
&
,<
,>
,\"
and'
characters into their HTML encoded representations