https://bugzilla.wikimedia.org/show_bug.cgi?id=39456

       Web browser: ---
             Bug #: 39456
           Summary: Searchmenu-* messages are given $1 HTML-encoded,
                    unable to urlencode it
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: Search
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


“searchmenu-*” messages (e.g. searchmenu-exists) are given the searched title
in $1, so that they display something like “There is a page named "[[:$1]]" on
this wiki.” However SpecialSearch::showCreateLink() escapes the search query
using wfEscapeWikiText.

This means e.g. quotes are escaped as HTML entities when received in
searchmenu-new, and you are unable to use the original query in links (e.g. to
search in other namespaces) in the message, like
“[{{fullurl:Special:Search|search={{urlencode:$1}}&ns14=1&fulltext=Search&advanced=1}}
Search categories]” since the urlencode leads to the HTML-encoded quote in the
URL (and OTOH, omitting the urlencode would break queries containing e.g. an
ampersand).

See
https://commons.wikimedia.org/wiki/MediaWiki_talk:Searchmenu-new#Quotes_get_destroyed

Maybe we could have an alternate parameter $2 containing the original unencoded
query?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to