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:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user