Last modified: 2005-10-09 13:30:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5650, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3650 - {{PAGENAMEE}} inconsistantly encodes 'space' for no good reason.
{{PAGENAMEE}} inconsistantly encodes 'space' for no good reason.
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-08 14:19 UTC by Dan Bolser
Modified: 2005-10-09 13:30 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Bolser 2005-10-08 14:19:51 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.
Comment 1 lɛʁi לערי ריינהארט 2005-10-08 14:37:12 UTC
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]]

Comment 2 Ævar Arnfjörð Bjarmason 2005-10-08 14:42:29 UTC
(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.
Comment 3 lɛʁi לערי ריינהארט 2005-10-08 15:02:32 UTC
It will brake {{SERVER}}{{localurl:category:foo|from={{PAGENAMEE}}}} at pages
with nontrivial names (containing spaces and non 7 bit ASCII characters).
Comment 4 Brion Vibber 2005-10-09 00:36:01 UTC
PAGENAMEE is specifically for wiki page titles, so that's how they're formatted.
Comment 5 Daniel Kinzler 2005-10-09 13:30:19 UTC
Ok then, maybe we should have PAGENAMEU for the url-encoded version?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links