From 4bfa414f639a980caf70617d4dc8f29f41904aa2 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 24 Nov 2008 01:05:55 +0000 Subject: [PATCH] Emoticons MDLSITE-564 Patch to avoid [[brackets]] around alt text --- lib/weblib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/weblib.php b/lib/weblib.php index b443ef7b5e..e87756f777 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2031,6 +2031,7 @@ function replace_smilies(&$text) { $img[$lang] = array(); foreach ($emoticons as $emoticon => $image){ $alttext = get_string($image, 'pix'); + $alttext = preg_replace('/^\[\[(.*)\]\]$/', '$1', $alttext); /// Clean alttext in case there isn't lang string for it. $e[$lang][] = $emoticon; $img[$lang][] = ''. $alttext .''; } -- 2.39.5