summaryrefslogtreecommitdiff
path: root/src/BBCodeParser.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-07-24 20:35:18 +0000
committeruckelman <uckelman@nomic.net>2010-07-24 20:35:18 +0000
commit2621324fbc35249274d8863d3dda0ce5f9759e87 (patch)
treec01b708af29a539f6f74c92149bb5a638bdec822 /src/BBCodeParser.php
parentc5ce65af94411e06c97cdd7f14fd00b78069796f (diff)
Decode smilies.
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@7025 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/BBCodeParser.php')
-rw-r--r--src/BBCodeParser.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/BBCodeParser.php b/src/BBCodeParser.php
index a1f7236..af2d129 100644
--- a/src/BBCodeParser.php
+++ b/src/BBCodeParser.php
@@ -12,6 +12,9 @@ class BBCodeParser {
# decode HTML entities before parsing
$in = html_entity_decode($in, ENT_QUOTES, 'UTF-8');
+ # convert smilies, which aren't in BBCode (ack!)
+ $in = preg_replace('/<!-- s(.*?) --><img src="\{SMILIES_PATH\}\/.*? \/><!-- s\1 -->/', '\1', $in);
+
$text_stack = array();
$arg_stack = array();