/// <Summary>
/// Replace special characters in HTML
/// </Summary>
/// <Param name = "thestring"> the text to be replaced. </Param>
/// <Returns> the replaced text. </Returns>
Public String htmlencode (string thestring)
{
Thestring = thestring. Replace (">", "> ");
Thestring = thestring. Replace ("<", "<");
Thestring = thestring. Replace ("","");
Thestring = thestring. Replace ("","");
Thestring = thestring. Replace ("\"",""");
Thestring = thestring. Replace ("\'","'");
Thestring = thestring. Replace ("\ n", "<br/> ");
Return thestring;
}
/// <Summary>
/// Restore special characters in HTML
/// </Summary>
/// <Param name = "thestring"> the text to be restored. </Param>
/// <Returns> restored text. </Returns>
Public String htmldiscode (string thestring)
{
Thestring = thestring. Replace (">", "> ");
Thestring = thestring. Replace ("<", "<");
Thestring = thestring. Replace ("","");
Thestring = thestring. Replace ("","");
Thestring = thestring. Replace (""","\"");
Thestring = thestring. Replace ("'","\'");
Thestring = thestring. Replace ("<br/>", "\ n ");
Return thestring;
}