Last modified: 2013-07-31 21:20:01 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 T53092, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51092 - Images: Auto-external links to image files display the image inline
Images: Auto-external links to image files display the image inline
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: C. Scott Ananian
http://parsoid.wmflabs.org/en/User:Th...
:
: 51103 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-10 03:43 UTC by Robert Rohde
Modified: 2013-07-31 21:20 UTC (History)
9 users (show)

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


Attachments

Description Robert Rohde 2013-07-10 03:43:47 UTC
This is one of the more amazing bugs I can recall seeing.

If a page has a plain external link to an image file with no markup, e.g.

http://www.impactwrestling.com/images/stories/galleries/718-title.jpg

Then opening the Visual Editor on that page results in the external link being replaced with an actual fully rendered copy of the image.  I haven't the wildest clue why an external link to an image would be translated into HTML markup that displays that image, but that seems to be what is happening.

I tried a few more dangerous file types (e.g. js, css, pdf) and those do not appear to be rendered / included, so apparently it is something specific about external links to image file types.
Comment 1 Chris McKenna 2013-07-10 09:17:07 UTC
Confirmed in Firefox 22 for JPG, PNG and SVG files but not for GIF or TIF files 

https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox2&oldid=563640804
Comment 2 Chris McKenna 2013-07-10 10:00:56 UTC
See also bug 51103 which is likely related to this one.
Comment 3 James Forrester 2013-07-10 17:09:48 UTC
Turns into the following in Parsoid:

  <img rel="mw:externalImage" alt="<filename>" src="<URL>">

Not good.
Comment 4 C. Scott Ananian 2013-07-10 17:15:40 UTC
ok, i'll take this one.
Comment 5 James Forrester 2013-07-10 18:17:05 UTC
Having spoken to Roan, he says this is caused because he presumes that Parsoid assumes that $wgAllowExternalImages is true - it generally isn't, and certainly isn't in production for Wikimedia. :-)
Comment 6 James Forrester 2013-07-10 18:20:08 UTC
*** Bug 51103 has been marked as a duplicate of this bug. ***
Comment 7 C. Scott Ananian 2013-07-10 21:36:53 UTC
Hm, but parserTests seem to run with $wgAllowExternalImages=true -- for example:

!! test
External image
!! input
External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
!! result
<p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
</p>
!! end
Comment 8 Gerrit Notification Bot 2013-07-10 22:14:11 UTC
Change 73111 had a related patch set uploaded by Cscott:
Add wgAllowExternalImages option to parser tests.

https://gerrit.wikimedia.org/r/73111
Comment 9 C. Scott Ananian 2013-07-11 16:41:54 UTC
So I need to export the value of $wgAllowExternalImages in the mediawiki siteinfo in order to parse this correctly.

Alternatively, we could leave parsoid as-is and handle this in VE?
Comment 10 James Forrester 2013-07-11 17:03:31 UTC
(In reply to comment #9)
> So I need to export the value of $wgAllowExternalImages in the mediawiki
> siteinfo in order to parse this correctly.
> 
> Alternatively, we could leave parsoid as-is and handle this in VE?

I don't think that would be appropriate; VE should not need to know about server configuration items like this, and it'd be an ugly hack to special-case certain kinds of images.
Comment 11 Gerrit Notification Bot 2013-07-11 17:59:30 UTC
Change 73199 had a related patch set uploaded by Cscott:
Export information about external image settings via siteinfo API.

https://gerrit.wikimedia.org/r/73199
Comment 12 Gerrit Notification Bot 2013-07-16 14:10:58 UTC
Change 73199 merged by jenkins-bot:
Export information about external image settings via siteinfo API.

https://gerrit.wikimedia.org/r/73199
Comment 13 Gerrit Notification Bot 2013-07-16 18:02:04 UTC
Change 73111 merged by jenkins-bot:
Add wgAllowExternalImages option to parser tests.

https://gerrit.wikimedia.org/r/73111
Comment 14 Gerrit Notification Bot 2013-07-16 20:37:31 UTC
Change 74053 had a related patch set uploaded by Cscott:
Handle $wgAllowExternalImages in wiki configuration.

https://gerrit.wikimedia.org/r/74053
Comment 15 Gerrit Notification Bot 2013-07-17 18:41:26 UTC
Change 74053 merged by jenkins-bot:
Handle $wgAllowExternalImages in wiki configuration.

https://gerrit.wikimedia.org/r/74053
Comment 16 C. Scott Ananian 2013-07-31 21:20:01 UTC
Deployed and tested on https://en.wikipedia.org/wiki/User:Cscott/bug51092 ---  all fixed!

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


Navigation
Links