static HtmlEncoder()
{
// Following list are the basic html tags that force new lines
// List may be extended as we discover them
NEWLINETAGS[HtmlTags.P] = null;
NEWLINETAGS[HtmlTags.BLOCKQUOTE] = null;
NEWLINETAGS[HtmlTags.BR] = null;
for (int i = 0; i < 10; i++) {
HTML_CODE[i] = "�" + i + ";";
}
for (int i = 10; i < 32; i++) {
HTML_CODE[i] = "�" + i + ";";
}
for (int i = 32; i < 128; i++) {
HTML_CODE[i] = ((char)i).ToString();
}
// Special characters
HTML_CODE['\t'] = "\t";
HTML_CODE['\n'] = "<br />\n";
HTML_CODE['\"'] = """; // double quote
HTML_CODE['&'] = "&"; // ampersand
HTML_CODE['<'] = "<"; // lower than
HTML_CODE['>'] = ">"; // greater than
for (int i = 128; i < 256; i++) {
HTML_CODE[i] = "&#" + i + ";";
}
}