From a9208a08abca36e23524c517cff9a6c56a2014bf Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Thu, 29 Mar 2012 21:17:06 +0200 Subject: [PATCH] (bug 25277) Moved the space before the dirmark. If the dirmark is immediately adjacent to the file name, the user may copy it with and then paste an unneeded dirmark somewhere. It can be adjacent to the file description, however. Patch set 2: using getDirMarkEntity, according to MaxSem's suggestion. Change-Id: I9567a90e9a4b32cdf31af5f26044c8f80961f986 --- includes/ImagePage.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index b41e12646f..7453baac5a 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -279,7 +279,7 @@ class ImagePage extends Article { $max = $wgImageLimits[$sizeSel]; $maxWidth = $max[0]; $maxHeight = $max[1]; - $dirmark = $wgLang->getDirMark(); + $dirmark = $wgLang->getDirMarkEntity(); if ( $this->displayImg->exists() ) { # image @@ -449,14 +449,21 @@ class ImagePage extends Article { if ( !$this->displayImg->isSafeFile() ) { $warning = wfMsgNoTrans( 'mediawarning' ); + // dirmark is needed here to separate the file name, which + // most likely ends in Latin characters, from the description, + // which may begin with the file type. In RTL environment + // this will get messy. + // The dirmark, however, must not be immediately adjacent + // to the filename, because it can get copied with it. + // See bug 25277. $wgOut->addWikiText( <<{$medialink}$dirmark $longDesc +
{$medialink} $dirmark$longDesc
$warning
EOT ); } else { $wgOut->addWikiText( <<{$medialink}{$dirmark} $longDesc +
{$medialink} {$dirmark}$longDesc
EOT ); -- 2.20.1