r74898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74897‎ | r74898 | r74899 >
Date:15:12, 17 October 2010
Author:hartman
Status:ok
Tags:
Comment:
Use getAttribute( 'href', 2), so we can preserve relative paths if we want.

Fixes bug 25549
Modified paths:
  • /trunk/phase3/skins/common/search.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/search.js
@@ -11,7 +11,7 @@
1212 }
1313
1414 var searchterm = searchbox.value;
15 - var parts = obj.href.split( 'search=' );
 15+ var parts = obj.getAttribute( 'href', 2).split( 'search=' );
1616 var lastpart = '';
1717 var prefix = 'search=';
1818 if( parts.length > 1 && parts[1].indexOf('&') >= 0 ) {

Status & tagging log