]> git.mjollnir.org Git - moodle.git/commitdiff
Solved bug 1491 in all the "linking" filters.
authorstronk7 <stronk7>
Sun, 30 May 2004 01:00:16 +0000 (01:00 +0000)
committerstronk7 <stronk7>
Sun, 30 May 2004 01:00:16 +0000 (01:00 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=1491)
Bugfix 001

filter/activitynames/filter.php
mod/glossary/filter.php
mod/resource/filter.php

index 78c661f76299a1881a6dc3d389b982126dcd9eee..b35d748d96e57e655765fc8f8817080e75bf1a79 100644 (file)
@@ -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 @@
 
         //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;
         }
index 51da92fd4110a87b87fafdc65d7e3f3f219688e9..d8003a7b229a85123963efaac3c7f55f0cbbfe6e 100644 (file)
 
         //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;
         }
index 03c57669a576c83b0e9a343879089e38d73efe84..c670f403e52290dd7bce5a8767b1ff3ab2ed5fcc 100644 (file)
 
         //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;
         }