Page MenuHomePhabricator

Images: Unnecessary url encoding applied to "link" image option
Closed, ResolvedPublic

Description

Log in to a wiki, visit a Flow board and create a post containing the wikitext

[[File:Şirince_(doyler79).jpg|thumb]]

when you edit the wiki text, note it has become

[[File:Şirince_(doyler79).jpg|thumb|link=File:%C5%9Eirince_(doyler79).jpg]]

It only happens if the file name has an accented character. This sounds like an edge case of bug 49844, which was fixed. If I run the wikitext on line 2 through the round-trip parser http://parsoid.wmflabs.org/_rtform/ , the link parameter doesn't appear. It's in the HTML generated by http://parsoid.wmflabs.org/_wikitext/ , as a data-parsoid parameter:

<figure ... data-parsoid='{"optList":[{... ,{"ck":"link","ak":"link=File:%C5%9Eirince_(doyler79).jpg"}], ...] }

I don't think that percent encoding is needed, the link should only be URL-encoded when put in a URL. For what it's worth the wikitext from Parsoid doesn't work if you copy it to a regular page, "link=File:%C5%9Eirince_(doyler79).jpg" appears as the caption.


Version: unspecified
Severity: normal

Details

Reference
bz69152

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:37 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz69152.
TheDJ claimed this task.
TheDJ subscribed.

This was resolved quite a while ago.