Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 542cd89f8ddc676bb0bde917e7f3cd31528939d8 1 parent 490414a
moodler authored
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" />';
}
Please sign in to comment.
Something went wrong with that request. Please try again.