From 5aa0471e66582408f59fca57ae6a88c58232cfb5 Mon Sep 17 00:00:00 2001 From: "What.CD" Date: Wed, 6 Jul 2011 08:00:07 +0000 Subject: [PATCH] [bbcode] allow exact code in [pre] tags empty emoticons --- classes/class_text.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/class_text.php b/classes/class_text.php index 9b917456..cd7707b1 100644 --- a/classes/class_text.php +++ b/classes/class_text.php @@ -12,10 +12,13 @@ class TEXT { ':blush:' => 'blush.gif', ':cool:' => 'cool.gif', ':\'(' => 'crying.gif', + ':*(' => 'crying.gif', + ':crying:' => 'crying.gif', '>.>' => 'eyesright.gif', ':frown:' => 'frown.gif', '<3' => 'heart.gif', ':unsure:' => 'hmm.gif', + ':\\' => 'hmm.gif', ':whatlove:' => 'ilu.gif', ':lol:' => 'laughing.gif', ':loveflac:' => 'loveflac.gif', @@ -44,7 +47,7 @@ class TEXT { ':creepy:' => 'creepy.gif', ':worried:' => 'worried.gif', ':wtf:' => 'wtf.gif', - ':wub:' => 'wub.gif' + ':wub:' => 'wub.gif', ); private $NoImg = 0; // If images should be turned into URLs @@ -373,7 +376,7 @@ function parse($Str) { $Block = preg_replace('/\[inlinesize\=5\](.*?)\[\/inlinesize\]/i', '===$1===', $Block); $Block = preg_replace('/\[inlinesize\=7\](.*?)\[\/inlinesize\]/i', '==$1==', $Block); - $Array[$ArrayPos] = array('Type'=>$TagName, 'Val'=>$Block); + $Array[$ArrayPos] = array('Type'=>$TagName, 'Val'=>htmlspecialchars($Block)); // double escape break; case 'hide': $Array[$ArrayPos] = array('Type'=>'hide', 'Attr'=>$Attrib, 'Val'=>$this->parse($Block));