| The following is the code fragment: <% '======================================= 'Decoding the string for HTML, replace the server.htmlencode 'Remove HTML format for display output '======================================= Function Outhtml (STR) Dim stemp STEMP = STR outHtml = "" " If isnull (step) = true then Exit function End if STEMP = Replace (step, "&", "& amp;") STEMP = Replace (STEMP, "<", "" & LT; ") STEMP = Replace (step, ">", "& gt;") STEMP = Replace (STEMP, Chr (34), "& Quot;") step = replace (step, chr (10), "<br>") outHtml = STEMP End function '======================================= 'Remove the HTML format and use it to fill in the input box from the database 'Note: Value = "?" You must use double quotes here '======================================= Function Inhtml (STR) Dim stemp STEMP = STR inhtml = "" If isnull (step) = true then Exit function End if STEMP = Replace (step, "&", "& amp;") STEMP = Replace (STEMP, "<", "" & LT; ") STEMP = Replace (step, ">", "& gt;") STEMP = Replace (STEMP, Chr (34), "& Quot;") inhtml = STEMP End function %> |