First of all, I am very grateful to Mu yehu for discovering this bug. It has been around for so long and I have not found it!
BUG:
When inserting Code If the Code contains code in the form of a ["B"], the Asp.net process will occupy 100% of the CPU. If it is IIS 6, it will cause IIS to restart the process, the error "Service unavailable" is displayed. The previous "Service unavailable" in the blog may be caused by this bug.
Cause:
It is caused by a regular expression that converts spaces to "& nbsp. The Regular Expression Code is as follows:
Public Static String Replacespace ( String Content)
{
String Findstr = " (? <Fore> (? :(? : [^ <]) * (? : <(? :! --(? :(? : [^-]) * (? :(? = -->) |-) * -- | (? : [^>]) +)> )?) *) [] (? <Back> (? :(? : [^ <]) * (? : <(? :! --(? :(? : [^-]) * (? :(? = -->) |-) * -- | (? : [^>]) +)> )?) *) " ;
String Replacestr = " $ {Fore} & nbsp; $ {back} " ;
String Targetstr = System. Text. regularexpressions. RegEx. Replace (content, findstr, replacestr, system. Text. regularexpressions. regexoptions. ignorecase );
Return Targetstr;
}
This regular expression is provided by a friend. The main function is to convert spaces in the non-htmt mark of the string into "& nbsp;". Currently, I have not found any problems in this regular expression, please familiarize yourself with regular expressions.
Temporary solution: disable this regular expression. This will affect the space display before the code line.
In addition, two options are added to the Code coloring function: 1. Whether to display the row number. 2. whether to use code folding.
Note: please pay attention to this issue when using cnblogs dottext 1.0 Beta 2.