Upgraded weblib::format_string() so it accepts unicode htmlentities. Also added more unit tests, including a stub for an integration web-based test.

This commit is contained in:
nicolasconnault
2007-03-06 05:05:45 +00:00
parent eb353c5727
commit a205dcdc09
5 changed files with 81 additions and 26 deletions
+1 -1
View File
@@ -1432,7 +1432,7 @@ function format_string ($string, $striplinks = false, $courseid=NULL ) {
}
// First replace all ampersands not followed by html entity code
$string = preg_replace("/\&(?![a-z0-9]{1,8};)/", "&", $string);
$string = preg_replace("/\&(?![a-z0-9#]{1,8};)/", "&", $string);
if (!empty($CFG->filterall)) {
$string = filter_text($string, $courseid);