From e359b7544a8b941e8f2bbc73e39a82a59cabe311 Mon Sep 17 00:00:00 2001 From: henoheno Date: Fri, 6 May 2005 21:35:21 +0900 Subject: [PATCH] BugTrack/779: Simplify strip_htmltag(): Don't compute so many --- lib/html.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/html.php b/lib/html.php index 2abd40b..4dad592 100644 --- a/lib/html.php +++ b/lib/html.php @@ -1,6 +1,6 @@ ([^<]*)]+>' . - preg_quote($_symbol_noexists, '#') . '#'; + if (! isset($noexists_pattern)) + $noexists_pattern = '#([^<]*)]+>' . + preg_quote($_symbol_noexists, '#') . '#'; $str = preg_replace($noexists_pattern, '$1', $str); //$str = preg_replace('/]+>\?<\/a>/', '', $str); + return preg_replace('/<[^>]+>/', '', $str); } -- 2.11.0