Index: skins/MonoBook.php
===================================================================
--- skins/MonoBook.php	(revision 14297)
+++ skins/MonoBook.php	(working copy)
@@ -87,7 +87,7 @@
 	</head>
 <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
 <?php if($this->data['body_onload'    ]) { ?>onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
- class="<?php $this->text('nsclass') ?> <?php $this->text('dir') ?>">
+ class="<?php $this->text('nsclass') ?> <?php $this->text('dir') ?>" id="<?php $this->text('bodyid') ?>">
 	<div id="globalWrapper">
 		<div id="column-content">
 	<div id="content">
Index: includes/SkinTemplate.php
===================================================================
--- includes/SkinTemplate.php	(revision 14297)
+++ includes/SkinTemplate.php	(working copy)
@@ -189,6 +189,8 @@
 		$tpl->set( 'pagetitle', $wgOut->getHTMLTitle() );
 		$tpl->set( 'displaytitle', $wgOut->mPageLinkTitle );
 
+		$tpl->set( 'bodyid', Sanitizer::escapeId( $wgTitle->getPrefixedText() ) );
+
 		$tpl->setRef( "thispage", $this->thispage );
 		$subpagestr = $this->subPageSubtitle();
 		$tpl->set(
Index: includes/Skin.php
===================================================================
--- includes/Skin.php	(revision 14297)
+++ includes/Skin.php	(working copy)
@@ -416,6 +416,8 @@
 			}
 			$a['onload'] .= 'setupRightClickEdit()';
 		}
+		$a['id'] = Sanitizer::escapeId( $wgTitle->getPrefixedText() );
+
 		return $a;
 	}
 
