From 4c3396fc9f4bf9f669728dd104e1c390b153489a Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 26 Jul 2008 23:04:50 +0000 Subject: [PATCH] Fix A tag regex searching. MDL-15842 ; merged from 19_STABLE --- lib/html2text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/html2text.php b/lib/html2text.php index 42c05565ff..219efaa7ef 100644 --- a/lib/html2text.php +++ b/lib/html2text.php @@ -130,7 +130,7 @@ function html2text( $badStr ) { $goodStr = preg_replace( "/<(th|td)[^>]*>/i", "\t", $goodStr ); // $goodStr = preg_replace( "/]* href=(\"((?!\"|#|javascript:)[^\"#]*)(\"|#)|'((?!'|#|javascript:)[^'#]*)('|#)|((?!'|\"|>|#|javascript:)[^#\"'> ]*))[^>]*>/i", "[LINK: $2$4$6] ", $goodStr ); // Moodle - $goodStr = preg_replace( "/]* href=(\"((?!\"|#|javascript:)[^\"#]*)(\"|#)|'((?!'|#|javascript:)[^'#]*)('|#)|((?!'|\"|>|#|javascript:)[^#\"'> ]*))[^>]*>([^<]*)<\/a>/i", "$7 [$2$4$6]", $goodStr ); + $goodStr = preg_replace( "/]*href=(\"((?!\"|#|javascript:)[^\"#]*)(\"|#)|'((?!'|#|javascript:)[^'#]*)('|#)|((?!'|\"|>|#|javascript:)[^#\"'> ]*))[^>]*>([^<]*)<\/a>/i", "$7 [$2$4$6]", $goodStr ); // $goodStr = preg_replace( "/]* alt=(\"([^\"]+)\"|'([^']+)'|([^\"'> ]+))[^>]*>/i", "[IMAGE: $2$3$4] ", $goodStr ); // Moodle $goodStr = preg_replace( "/]* alt=(\"([^\"]+)\"|'([^']+)'|([^\"'> ]+))[^>]*>/i", "[$2$3$4] ", $goodStr ); -- 2.39.5