Page MenuHomePhabricator

invisible directional character on File page pollutes pasted filenames
Closed, ResolvedPublic

Description

The File page outputs an invisible Unicode directional character ("Left to Right Mark" or its counterpart) just after the link to the raw file, with no space intervening.

That's, for instance, here on line 479 of ImagePage.php (r73636):
<span class="dangerousLink">{$medialink}</span>$dirmark

This means that when a user copies the filename from that link in order to paste it into a wiki page, the invisible character is pasted as well. This can cause problems in the wiki page and is hard to troubleshoot because the offending character is invisible.

I don't know anything about bidirectional text, so I don't have a patch, but can't that mark be separated from the link text, or even converted into an html attribute or something?


Version: 1.16.x
Severity: normal

Details

Reference
bz25277

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:15 PM
bzimport added projects: MediaWiki-General, I18n.
bzimport set Reference to bz25277.

Created attachment 7711
add a space between an anchor and the dirmark

$dirmark was added to this message in r15352 :
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/ImagePage.php?r1=15352&r2=15353&pathrev=49895&

This patch fixes other possible occurences.

Attached:

sumanah wrote:

Added "i18n" tag since I don't see an rtl tag.

The usual way to mark RTL bugs is to mark them as blocking bug 745. I'll take a look at it.

I think it's safe to remove the dirmark, it didn't make any visual difference as far as I tested.

The dirmark can have influence here. The file description can begin with a type, like "PNG", and the file name usually ends in Latin characters, so it can get messy.

I applied a patch similar to the one that is attached at https://gerrit.wikimedia.org/r/3929 .

That change is merged. What is left to do for this bug? Is it done?

Thanks for the reminder!