Last modified: 2012-08-06 19:25:49 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 T40906, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38906 - Parsoid does not handle urlencoded interwiki prefixes correctly
Parsoid does not handle urlencoded interwiki prefixes correctly
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 04:02 UTC by Roan Kattouw
Modified: 2012-08-06 19:25 UTC (History)
2 users (show)

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


Attachments

Description Roan Kattouw 2012-08-01 04:02:42 UTC
http://localhost:8000/localhost:VisualEditor:Foo works and parses VisualEditor:Foo on localhost

http://localhost:8000/localhost:VisualEditor%3AFoo works too

http://localhost:8000/localhost%3AVisualEditor%3A Foo does not work, it doesn't recognize the interwiki prefix, falls back to the default interwiki (mw:), and tries to parse [[mw:Localhost:VisualEditor:Foo]].

Debugging shows that in the "Regular article parsing" callback on line 397, req.params is set to [ undefined, 'localhost:VisualEditor:Lists' ], whereas if the colons aren't urlencoded it's [ 'localhost', 'VisualEditor:Lists' ]. It looks like app.get()'s regex mode isn't processing urlencoded characters correctly even though it does unescape the matches before putting them in req.params.

This is obviously a blocker for making VisualEditor always use an interwiki prefix.
Comment 1 Gabriel Wicke 2012-08-01 20:34:18 UTC
I don't really see the need to urlencode the colon since it is plain ASCII (browsers don't do so evidently). I have added support for this nevertheless since it was easy to do: https://gerrit.wikimedia.org/r/#/c/17331/
Comment 2 James Forrester 2012-08-06 19:25:49 UTC
Mass-moving bugs into the new 'Parsoid' product.

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


Navigation
Links