Permalink
Browse files

Solved bug 1491 in all the "linking" filters.

  • Loading branch information...
1 parent 0ae7e6f commit 2ed07cc70a05f9a3f0b9c5059bfd6fb38f9118ea stronk7 committed May 30, 2004
Showing with 4 additions and 4 deletions.
  1. +2 −2 filter/activitynames/filter.php
  2. +1 −1 mod/glossary/filter.php
  3. +1 −1 mod/resource/filter.php
@@ -2,7 +2,7 @@
//This function provides automatic linking to
//activities when its name (title) is found inside every Moodle text
//It's based in the glosssary filter by Williams Castillo
- //Modifications by stronk7. Enjoy! :-)
+ //Modifications by stronk7.
$textfilter_function='activitynames_filter';
@@ -84,7 +84,7 @@ function activity_link_names($text,$name,$href_tag_begin,$href_tag_end = "</a>")
//Now avoid searching inside links
$links = array();
- preg_match_all('/<A (.+?)>(.+?)<\/A>/is',$text,$list_of_links);
+ preg_match_all('/<A[\s](.+?)>(.+?)<\/A>/is',$text,$list_of_links);
foreach (array_unique($list_of_links[0]) as $key=>$value) {
$links['<@'.$key.'@>'] = $value;
}
View
@@ -164,7 +164,7 @@ function glossary_link_concepts($text,$concept,$href_tag_begin,$href_tag_end = "
//Now avoid searching inside links
$links = array();
- preg_match_all('/<A (.+?)>(.+?)<\/A>/is',$text,$list_of_links);
+ preg_match_all('/<A[\s](.+?)>(.+?)<\/A>/is',$text,$list_of_links);
foreach (array_unique($list_of_links[0]) as $key=>$value) {
$links['<@'.$key.'@>'] = $value;
}
View
@@ -102,7 +102,7 @@ function resource_link_names($text,$name,$href_tag_begin,$href_tag_end = "</a>")
//Now avoid searching inside links
$links = array();
- preg_match_all('/<A (.+?)>(.+?)<\/A>/is',$text,$list_of_links);
+ preg_match_all('/<A[\s](.+?)>(.+?)<\/A>/is',$text,$list_of_links);
foreach (array_unique($list_of_links[0]) as $key=>$value) {
$links['<@'.$key.'@>'] = $value;
}

0 comments on commit 2ed07cc

Please sign in to comment.