Skip to content
Browse files

Emoticons MDLSITE-564 Patch to avoid [[brackets]] around alt text

  • Loading branch information...
1 parent 490414a commit 542cd89f8ddc676bb0bde917e7f3cd31528939d8 moodler committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/weblib.php
View
1 lib/weblib.php
@@ -2134,6 +2134,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][] = '<img alt="'. $alttext .'" width="15" height="15" src="'. $CFG->pixpath .'/s/'. $image .'.gif" />';
}

0 comments on commit 542cd89

Please sign in to comment.
Something went wrong with that request. Please try again.