Copy Code code as follows:
function HTMLEncode (fstring)
Fstring=replace (fstring, ";", ";")
Fstring=replace (fstring, "<", "<")
Fstring=replace (fstring, ">", ">")
Fstring=replace (fstring, "\", "\")
Fstring=replace (Fstring, "--", "--")
Fstring=replace (FSTRING,CHR (9), "")
Fstring=replace (FSTRING,CHR), "<br>"
Fstring=replace (FSTRING,CHR (13), "")
Fstring=replace (FSTRING,CHR (22), "")
Fstring=replace (FSTRING,CHR (32), "")
Fstring=replace (FSTRING,CHR (34), "" ") ' double quote
Fstring=replace (FSTRING,CHR (39), "'") ' single quote
Fstring=replacetext (fstring, "&#" ([0-9]*); "," &#$1; ") ' Resolve Korean character problems
If Issqldatabase=0 then ' filter Katakana (Japanese characters) [\U30A0-\U30FF] by Yuzi Initiative
Fstring=escape (fstring)
Fstring=replacetext (Fstring, "%u30 ([a-f][0-f])", "0$1;"
Fstring=unescape (fstring)
End If
Htmlencode=fstring
End Function