[wp-trac] Re: [WordPress Trac] #9103: Put search string into
<title> of search results page
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 27 17:32:51 GMT 2009
#9103: Put search string into <title> of search results page
--------------------------+-------------------------------------------------
Reporter: jidanni | Owner: westi
Type: defect (bug) | Status: assigned
Priority: lowest | Milestone: 2.8
Component: Template | Version: 2.7
Severity: trivial | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Changes (by westi):
* cc: westi (added)
* owner: anonymous => westi
* status: new => assigned
Old description:
> WordPress (or at least its default theme) should consider putting the
> search string into the XHTML <title> of the search results page.
>
> The goal is to make different searches findable in one's browser
> history, etc.
> Consider this MediaWiki example:
> http://en.wikipedia.org/wiki/Special:Search?search=jidanni
> gives
> {{{
> <title>jidanni - Search results - Wikipedia, the free
> encyclopedia</title>
> }}}
>
> (Of course one should properly escape the search string, to prevent
> XSS.)
New description:
WordPress (or at least its default theme) should consider putting the
search string into the XHTML <title> of the search results page.
The goal is to make different searches findable in one's browser
history, etc.
Consider this MediaWiki example:
http://en.wikipedia.org/wiki/Special:Search?search=jidanni
gives
{{{
<title>jidanni - Search results - Wikipedia, the free encyclopedia</title>
}}}
(Of course one should properly escape the search string, to prevent
XSS.)
--
Comment:
Replying to [comment:6 jidanni]:
> I believe I'm trying to say: instead of your diff's
> {{{
> $title = sprintf(__('Search Results %s %s'), $t_sep,
wp_specialchars($search));
> }}}
> You should do
> {{{
> $title = sprintf(__('%s %s Search Results'), wp_specialchars($search),
$t_sep,);
> }}}
> As Google and Wikipedia do. Else you will have munched 75% of each tab
> with "Search Results". Better still would be
> {{{
> $title = sprintf(__('%s %s Search'), wp_specialchars($search), $t_sep,);
> }}}
>
> Mine are for a totally "leftist" solution.
> It seems your original should also be retained, to provide for an
additional totally "rightest" choice.
Nope the diffs are correct.
WordPress is by default leftist.
If you want rightist you call wp_title in your theme with the third
argument as 'right' and it flips them all round for you.
This is exactly how the default and classic themes do it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9103#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list