parent
1a41622696
commit
6e6df92c05
2 changed files with 3 additions and 3 deletions
1
THANKS
1
THANKS
|
|
@ -20,6 +20,7 @@ Mathias Hasselmann <mathias@openismus.com>
|
|||
Timo Kluck <tkluck@infty.nl>
|
||||
Charles Lehner <rdm.cel@celehner.com>
|
||||
Avi Levy <avi.w.levy@gmail.com>
|
||||
Simon Lipp <bugs-gnome@simon.lipp.name>
|
||||
Brendan Long <self@brendanlong.com>
|
||||
Angelo Marchesin <marchesin.angelo@gmail.com>
|
||||
Kai Mast <mail@kai-mast.de>
|
||||
|
|
|
|||
|
|
@ -124,9 +124,8 @@ public string remove_html_tags(string input) {
|
|||
Regex style = new Regex("<style[^>]*?>[\\s\\S]*?<\\/style>", RegexCompileFlags.CASELESS);
|
||||
output = style.replace(output, -1, 0, "");
|
||||
|
||||
// Removes remaining tags. Based on this regex:
|
||||
// http://osherove.com/blog/2003/5/13/strip-html-tags-from-a-string-using-regular-expressions.html
|
||||
Regex tags = new Regex("<(.|\n)*?>", RegexCompileFlags.CASELESS);
|
||||
// Removes remaining tags.
|
||||
Regex tags = new Regex("<[^>]*>", RegexCompileFlags.CASELESS);
|
||||
return tags.replace(output, -1, 0, "");
|
||||
} catch (Error e) {
|
||||
debug("Error stripping HTML tags: %s", e.message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue