DisplayArticleFilter out spaces (& nbsp;/R/N) and HTML tags
<% # Iwebsitelib. Tools. interceptcharacter (RegEx. Replace (eval ("productcontent"). tostring (), "<. +?> | & Nbsp; | (\ r \ n) | \ s "," "), 60) %>
Iwebsitelib. Tools. interceptcharacter is a string truncation method.
{
This. style. display = 'none'; document. getelementbyid ('Code _ closed_text_095059 '). style. display = 'none'; document. getelementbyid ('Code _ open_image_095059 '). style. display = 'inline'; document. getelementbyid ('Code _ open_text_095059 '). style. display = 'inline ';
} "Id =" code_closed_image_095059 "style =" display: none "> {
This. style. display = 'none'; document. getelementbyid ('Code _ open_text_095059 '). style. display = 'none'; getelementbyid ('Code _ closed_image_095059 '). style. display = 'inline'; getelementbyid ('Code _ closed_text_095059 '). style. display = 'inline ';
} "Id =" code_open_image_095059 "> Code
Public Static String Interceptcharacter ( String Character, Int Extent)
{
String Tempstring = "" ;
If (System. Text. encoding. Default. getbytecount (character) > Extent)
{
Int Icount = Character. length;
While ( True )
{
Icount -- ;
Tempstring = Character. substring ( 0 , Icount );
If (System. Text. encoding. Default. getbytecount (tempstring) <= Extent)
{
Break ;
}
}
Return Tempstring + "" ;
}
Else
{
Return Character;
}
}