Last modified: 2011-10-25 00:15:37 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 T17564, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15564 - Input box does not generate correct URL containing ampersand
Input box does not generate correct URL containing ampersand
Status: RESOLVED DUPLICATE of bug 29066
Product: MediaWiki extensions
Classification: Unclassified
InputBox (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-11 15:43 UTC by Robert Ullmann
Modified: 2011-10-25 00:15 UTC (History)
2 users (show)

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


Attachments

Description Robert Ullmann 2008-09-11 15:43:27 UTC
If the page title contains an ampersand, Inputbox generates the edit url with %26amp%3B instead of just %26, usually resulting in a server error; but has been reported as generating the page title truncated at the ampersand.

E.g. on en.wikt, enter foo&bar and "Go", then pick the "Noun" button; generated URL contains &title=foo%26amp%3Bbar :

go to http://en.wiktionary.org/w/index.php?title=Special:Search&search=foo%26bar
press "Noun"

I have not tested other things that might be escaped in a URL or other cases, code needs looking at.
Comment 1 Umherirrender 2009-03-20 17:50:41 UTC
should works with #tag:

{{#tag:inputbox|
type=create
editintro=Template:new_en_noun_intro
preload=Template:new_en_noun 
default=$1
break=no
width=1
hidden=true
buttonlabel=Noun
}}
Comment 2 Mark A. Hershberger 2011-06-14 00:22:37 UTC
unassigned Trevor from Inputbox extension.
Comment 3 Brion Vibber 2011-09-23 00:02:05 UTC
(In reply to comment #1)
> should works with #tag:

Actually that doesn't seem to do any different.

Hmm...

The parameter with the search term on the searchmenu-new message in Special:Search is escaped ahead of time so that it won't trigger wiki syntax in the output: eg a title containing "''" shouldn't trigger italics.

So the inputbox's parameters contain "default=foo&bar" (or on 1.18/trunk, "default=foo&bar" which fails in a similar but slightly different way).

Inputbox dutifully accepts that and sticks it in the value of its (hidden) input element -- of course escaping all of its output so the & and whatnot are preserved across the form submission.

Possibly inputbox should do normalization on the input to pre-convert any character references... though of course if anybody is *deliberately* putting character references into the inputbox input values they'd need to update to double-escape.
Comment 4 Dominic 2011-10-25 00:15:37 UTC
Marking as duplicate of bug 29066, with a more general name, since ampersands are not the only problematic characters.

*** This bug has been marked as a duplicate of bug 29066 ***

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


Navigation
Links