Index: trunk/phase3/includes/AjaxFunctions.php |
— | — | @@ -79,6 +79,7 @@ |
80 | 80 | |
81 | 81 | $l = new Linker; |
82 | 82 | |
| 83 | + $term = trim( $term ); |
83 | 84 | $term = str_replace( ' ', '_', $wgContLang->ucfirst( |
84 | 85 | $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) ) |
85 | 86 | ) ); |
— | — | @@ -113,18 +114,19 @@ |
114 | 115 | $subtitlemsg = ( Title::newFromText($term) ? 'searchsubtitle' : 'searchsubtitleinvalid' ); |
115 | 116 | $subtitle = $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ); #FIXME: parser is missing mTitle ! |
116 | 117 | |
117 | | - $term = urlencode( $term ); |
| 118 | + $term_url = urlencode( $term ); |
| 119 | + $term_diplay = htmlspecialchars( str_replace( '_', ' ', $term ) ); |
118 | 120 | $html = '<div style="float:right; border:solid 1px black;background:gainsboro;padding:2px;"><a onclick="Searching_Hide_Results();">' |
119 | | - . wfMsg( 'hideresults' ) . '</a></div>' |
120 | | - . '<h1 class="firstHeading">'.wfMsg('search') |
| 121 | + . wfMsgHtml( 'hideresults' ) . '</a></div>' |
| 122 | + . '<h1 class="firstHeading">'.wfMsgHtml('search') |
121 | 123 | . '</h1><div id="contentSub">'. $subtitle . '</div><ul><li>' |
122 | 124 | . $l->makeKnownLink( $wgContLang->specialPage( 'Search' ), |
123 | | - wfMsg( 'searchcontaining', $term ), |
124 | | - "search=$term&fulltext=Search" ) |
| 125 | + wfMsgHtml( 'searchcontaining', $term_diplay ), |
| 126 | + "search={$term_url}&fulltext=Search" ) |
125 | 127 | . '</li><li>' . $l->makeKnownLink( $wgContLang->specialPage( 'Search' ), |
126 | | - wfMsg( 'searchnamed', $term ) , |
127 | | - "search=$term&go=Go" ) |
128 | | - . "</li></ul><h2>" . wfMsg( 'articletitles', $term ) . "</h2>" |
| 128 | + wfMsgHtml( 'searchnamed', $term_diplay ) , |
| 129 | + "search={$term_url}&go=Go" ) |
| 130 | + . "</li></ul><h2>" . wfMsgHtml( 'articletitles', $term_diplay ) . "</h2>" |
129 | 131 | . '<ul>' .$r .'</ul>'.$more; |
130 | 132 | |
131 | 133 | $response = new AjaxResponse( $html ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -361,6 +361,7 @@ |
362 | 362 | now 500 / 5000, in line with other modules. |
363 | 363 | * Added list=allcategories module |
364 | 364 | * (bug 12321) API list=blocks reveals private data |
| 365 | +* Fix output of wfSajaxSearch |
365 | 366 | |
366 | 367 | === Languages updated in 1.12 === |
367 | 368 | |