From d0b8e40d6f15e48df1403cf3a91646b3176b4791 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 19 Feb 2008 13:34:31 +0000 Subject: [PATCH] MDL-12538 skip to main does not work if page div contains other attributes; merged from MOODLE_19_STABLE --- lib/weblib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 8660b4bcc0..5439caa2f9 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2609,7 +2609,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='', // Skip to main content, see skip_main_destination(). if ($pageid=='course-view' or $pageid=='site-index' or $pageid=='course-index') { $skiplink = ''; - if (! preg_match('/(.*)(.*)/s', $output, $matches)) { + if (! preg_match('/(.*]+id="page"[^>]*>)(.*)/s', $output, $matches)) { preg_match('/(.*)(.*)/s', $output, $matches); } $output = $matches[1]."\n". $skiplink .$matches[2]; -- 2.39.5