Topic on Extension talk:GoogleSiteSearch

Problem handing off accents from wiki search form to Google search form

4
Summary by Sophivorus

Fixed in version 3.0+

Vitruvian95 (talkcontribs)

Installed your extension, and searching for terms in the Google search form work fine. However, my wiki is in Spanish and if I place a term with accents in the wiki search form (in the toolbar or Special:Search), it runs into trouble. This appears to pass coded accents to Google (i.e. "currículum" instead of "currículum"), and then Google returns no results for the search. Thanks for your help.

This post was posted by Vitruvian95, but signed as Felipe95a.

Jossmart (talkcontribs)
My wiki in Czech language has the same problem. The solution is replacing htmlentities with htmlspecialchars in
GoogleSiteSearch.php:
$outhtml = str_replace( '_GSS_TERM_ESCAPE_', htmlentities( $term, ENT_QUOTES, $wgGoogleSiteSearchCharset ), $outhtml );
Vitruvian95 (talkcontribs)

Thanks! That worked for the accents. However, the extension still has trouble interpreting the inverted commas in exact searches (e.g. "currículum nacional"). Any suggestions are appreciated.

This post was posted by Vitruvian95, but signed as Felipe95a.

Fo0bar (talkcontribs)

The latest release (3.0) should have i18n/UTF-8 issues sorted out. For an example, see e.g.