Last modified: 2005-10-09 13:30:19 UTC
A page called 'One Two Three' is encoded as 'One_Two_Three' by {{PAGENAMEE}}, which is fine for internal (self referential) links to 'this' page in the current or another wiki, but isn't adequate for 'dynamic' links to google for example. So [http://www.google.com/search?q={{PAGENAMEE}} search this page on Google] doesn't work like it should. If {{PAGENAMEE}} instead produced 'One%20%Two%20Three' or 'One+Two+Three', it would still work with 'internal' links within and between wiki's, but would also work in the 'google' context above. The code looks like this... $t->mDbkeyform = str_replace( ' ', '_', $title ); $t->mArticleID = ( $ns >= 0 ) ? -1 : 0; $t->mUrlform = wfUrlencode( $t->mDbkeyform ); When it could better just look like this... $t->mUrlform = wfUrlencode( $title ); Thanks to the IRC people for helping me with this bug report.
please take a look at bug 707: Google search with [[Google:search term]] {{PAGENAMEE}} makes a lot of usefull character conversion and is used often in the parameter part of URL's. {{PAGENAMEE}} should not be changed for the Google search. I think it would be best to have another solution as another variable or an extension. Best regards Reinhardt [[user:gangleri]]
(In reply to comment #1) > {{PAGENAMEE}} makes a lot of usefull character conversion and is used often in > the parameter part of URL's. {{PAGENAMEE}} should not be changed for the Google > search. I think it would be best to have another solution as another variable or > an extension. This bug is about making PAGENAMEE return "+" for spaces rather than "_" which should as far as I know work, in what cases would it not work and break current use of the variable in which case we need a seperate variable for this functionality.
It will brake {{SERVER}}{{localurl:category:foo|from={{PAGENAMEE}}}} at pages with nontrivial names (containing spaces and non 7 bit ASCII characters).
PAGENAMEE is specifically for wiki page titles, so that's how they're formatted.
Ok then, maybe we should have PAGENAMEU for the url-encoded version?