Last modified: 2010-06-14 16:39:03 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 T8257, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6257 - URLs containing URL-like parameters are split into multiple URLs upon rendering
URLs containing URL-like parameters are split into multiple URLs upon rendering
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal minor with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://images.google.de/imgres?imgurl...
: parser, patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-09 21:00 UTC by Raimond Spekking
Modified: 2010-06-14 16:39 UTC (History)
3 users (show)

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


Attachments
One-line fix (1.80 KB, patch)
2006-08-15 06:32 UTC, Wil Mahan
Details
Corrected patch (2.00 KB, patch)
2007-08-31 12:00 UTC, Dan Collins
Details

Description Raimond Spekking 2006-06-09 21:00:24 UTC
Very very long URLs from Google imagesearch in the form
"http://images.google.de/imgres?imgurl=http://...=http://..."
are broken before the third "http" into two different URLs. Please see testcase
at [[:de:Benutzer:Raymond/LongURL]].
Comment 1 Antoine "hashar" Musso (WMF) 2006-06-23 21:59:28 UTC
we currently support only one url in an url :(
Caused by a preg_match on bits[$i+1] in Parser.php

# special case: handle urls as url args:
# http://www.example.com/foo?=http://www.example.com/bar
if(strlen($trail) == 0 &&
   isset($bits[$i]) &&
   preg_match('/^'. wfUrlProtocols() . '$/S', $bits[$i]) &&
   preg_match( '/^('.EXT_LINK_URL_CLASS.'+)(.*)$/s', $bits[$i + 1], $m ))
   {

Maybe we should loop through the bits until there is nothing to do :)
Comment 2 Wil Mahan 2006-08-15 06:32:52 UTC
Created attachment 2228 [details]
One-line fix

Here's a one-line fix with a parser test case.
Comment 3 Dan Collins 2007-08-31 12:00:26 UTC
Created attachment 4062 [details]
Corrected patch

This is the same patch with line numbers corrected for r25248
Comment 4 Chad H. 2010-06-14 16:39:03 UTC
Seems to have been fixed at some point, since original test case WFM with trunk. Feel free to reopen if you can replicate this on a recent(ish) copy of MediaWiki.

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


Navigation
Links