* (bug 12801) Fix link in subtitle message in AJAX search
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 00:03:56 +0000 (00:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 00:03:56 +0000 (00:03 +0000)
RELEASE-NOTES
includes/AjaxFunctions.php

index 166a0de..d2fba67 100644 (file)
@@ -102,6 +102,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13407) MediaWiki:Powersearch is used in two places
 * (bug 13403) Fix cache invalidation of history pages when old revisions change
 * (bug 11563) Deprecated SearchMySQL4 class; merged code to SearchMySQL
+* (bug 12801) Fix link in subtitle message in AJAX search
 
 
 === API changes in 1.13 ===
index ffd3168..6b8bd21 100644 (file)
@@ -128,9 +128,10 @@ function wfSajaxSearch( $term ) {
 
        $valid = (bool) $term_title;
        $term_url = urlencode( $term );
-       $term_diplay = htmlspecialchars( $valid ? $term_title->getFullText() : $term );
+       $term_normalized = $valid ? $term_title->getFullText() : $term;
+       $term_display = htmlspecialchars( $term );
        $subtitlemsg = ( $valid ? 'searchsubtitle' : 'searchsubtitleinvalid' );
-       $subtitle = wfMsgWikiHtml( $subtitlemsg, $term_diplay );
+       $subtitle = wfMsgExt( $subtitlemsg, array( 'parse' ), wfEscapeWikiText( $term_normalized ) );
        $html = '<div id="searchTargetHide"><a onclick="Searching_Hide_Results();">'
                . wfMsgHtml( 'hideresults' ) . '</a></div>'
                . '<h1 class="firstHeading">'.wfMsgHtml('search')
@@ -138,15 +139,15 @@ function wfSajaxSearch( $term ) {
        if( $canSearch ) {
                $html .= '<ul><li>'
                        . $sk->makeKnownLink( $wgContLang->specialPage( 'Search' ),
-                                               wfMsgHtml( 'searchcontaining', $term_diplay ),
+                                               wfMsgHtml( 'searchcontaining', $term_display ),
                                                "search={$term_url}&fulltext=Search" )
                        . '</li><li>' . $sk->makeKnownLink( $wgContLang->specialPage( 'Search' ),
-                                               wfMsgHtml( 'searchnamed', $term_diplay ) ,
+                                               wfMsgHtml( 'searchnamed', $term_display ) ,
                                                "search={$term_url}&go=Go" )
                        . "</li></ul>";
        }
        if( $r ) {
-               $html .= "<h2>" . wfMsgHtml( 'articletitles', $term_diplay ) . "</h2>"
+               $html .= "<h2>" . wfMsgHtml( 'articletitles', $term_display ) . "</h2>"
                        . '<ul>' .$r .'</ul>' . $more;
        }