mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
Fix A tag regex searching. MDL-15842 ; merged from 19_STABLE
This commit is contained in:
parent
fb8634e50c
commit
4ffc25ce55
@ -73,7 +73,7 @@ function filter_phrases ($text, &$link_array, $ignoretagsopen=NULL, $ignoretagsc
|
||||
/// Unless specified otherwise, we will not replace within <a></a> tags
|
||||
if ( $ignoretagsopen === NULL ) {
|
||||
//$ignoretagsopen = array('<a(.+?)>');
|
||||
$ignoretagsopen = array('<a[^>]+?>');
|
||||
$ignoretagsopen = array('<a\s[^>]+?>');
|
||||
$ignoretagsclose = array('</a>');
|
||||
}
|
||||
|
||||
|
@ -684,7 +684,7 @@ function glossary_print_entry_definition($entry) {
|
||||
|
||||
|
||||
//Extract <a>..><a> tags from definition
|
||||
preg_match_all('/<a[^>]+?>(.*?)<\/a>/is',$definition,$list_of_a);
|
||||
preg_match_all('/<a\s[^>]+?>(.*?)<\/a>/is',$definition,$list_of_a);
|
||||
|
||||
//Save them into links array to use them later
|
||||
foreach (array_unique($list_of_a[0]) as $key=>$value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user