Fix A tag regex searching. MDL-15842 ; merged from 19_STABLE

This commit is contained in:
stronk7 2008-07-26 22:13:39 +00:00
parent fb8634e50c
commit 4ffc25ce55
2 changed files with 2 additions and 2 deletions

View File

@ -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>');
}

View File

@ -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) {