Convert special characters to html entities in c#
The regex is a standard strip-all-html regex which I have been using in other parts of the application. I use it to identify the HTML tags instead of stripping them out. Then I take the non-HTML parts and process it through the encoding method (I've called it ReplaceHtmlWithSymbols()), and I take the tags and stuff them in without processing.
This is because AppendFormat has to search through the format string for the placeholder(s) before concatenating them.
The results varied some on each run, but would typically be like this:
A: 1.50 (worst time)
D: 1.00 (best time, reference index)
-- modified at 18:15 Tuesday 4th September, 2007
Web01 | 2.8.171207.1 | Last Updated 28 Aug 2007
Everything else Copyright © CodeProject, 1999-2017