(bug 23570) Fix an instance of a javascript: link in core
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 7 Jun 2010 16:19:09 +0000 (16:19 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 7 Jun 2010 16:19:09 +0000 (16:19 +0000)
includes/DefaultSettings.php
skins/common/wikibits.js

index daa1a8e..69df146 100644 (file)
@@ -1676,7 +1676,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches do not keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '284';
+$wgStyleVersion = '285';
 
 
 # Server-side caching:
index 0454bba..1bf36b8 100644 (file)
@@ -145,7 +145,9 @@ function showTocToggle() {
                var toggleLink = document.createElement( 'a' );
                toggleLink.id = 'togglelink';
                toggleLink.className = 'internal';
-               toggleLink.href = 'javascript:toggleToc()';
+               toggleLink.href = '#';
+               toggleLink.onclick = toggleToc;
+               
                toggleLink.appendChild( document.createTextNode( tocHideText ) );
 
                outerSpan.appendChild( document.createTextNode( '[' ) );
@@ -187,6 +189,7 @@ function toggleToc() {
                document.cookie = "hidetoc=1";
                tocmain.className = 'toc tochidden';
        }
+       return false;
 }
 
 var mwEditButtons = [];