From: moodler Date: Mon, 24 Nov 2008 01:05:55 +0000 (+0000) Subject: Emoticons MDLSITE-564 Patch to avoid [[brackets]] around alt text X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4bfa414f639a980caf70617d4dc8f29f41904aa2;p=moodle.git Emoticons MDLSITE-564 Patch to avoid [[brackets]] around alt text --- 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 .''; }