mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Reducing a bit the number of replacements performed by the filter. ;-)
This commit is contained in:
parent
9c4d6572a1
commit
902c63b023
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ function filter_phrases ($text, $link_array, $ignoretagsopen=NULL, $ignoretagscl
|
||||||
}
|
}
|
||||||
$newtagsprefix = (string)(count($newtagsarray) + 1);
|
$newtagsprefix = (string)(count($newtagsarray) + 1);
|
||||||
$newtags = array();
|
$newtags = array();
|
||||||
preg_match_all('/<(.+?)>/is',$text,$list_of_newtags);
|
preg_match_all('/<[^\#\|\%](.+?)>/is',$text,$list_of_newtags);
|
||||||
foreach (array_unique($list_of_newtags[0]) as $ntkey=>$value) {
|
foreach (array_unique($list_of_newtags[0]) as $ntkey=>$value) {
|
||||||
$newtags['<%'.$newtagsprefix.'.'.$ntkey.'%>'] = $value;
|
$newtags['<%'.$newtagsprefix.'.'.$ntkey.'%>'] = $value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue