From: skodak Date: Tue, 19 Feb 2008 13:34:31 +0000 (+0000) Subject: MDL-12538 skip to main does not work if page div contains other attributes; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d0b8e40d6f15e48df1403cf3a91646b3176b4791;p=moodle.git MDL-12538 skip to main does not work if page div contains other attributes; merged from MOODLE_19_STABLE --- 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];