]> git.mjollnir.org Git - moodle.git/commitdiff
More robustness when dealing with links that may have HTML tags
authormoodler <moodler>
Sun, 22 Feb 2004 02:51:42 +0000 (02:51 +0000)
committermoodler <moodler>
Sun, 22 Feb 2004 02:51:42 +0000 (02:51 +0000)
within the link.

filter/mediaplugin/filter.php

index 9c4e2f05063b9320af5c717b0bb929eb06e143e9..d13c88326dcd036a2bf393c914d01d298fa8e5bc 100644 (file)
@@ -28,7 +28,7 @@
 function mediaplugin_filter($courseid, $text) {
     global $CFG;
 
-    $search = '/<a(.*)href=\"(.*)\.mp3\"([^>]*)>([^>]*)<\/a>/i';
+    $search = '/<a(.*?)href=\"(.*?)\.mp3\"([^>]*)>(.*?)<\/a>/i';
 
     $replace = '\\0&nbsp;<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
     $replace .= ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';