r54773 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54772‎ | r54773 | r54774 >
Date:08:36, 11 August 2009
Author:raymond
Status:ok (Comments)
Tags:
Comment:
* Do not transform EXIF fields with pure text to avoid results like foo,bar@example,com
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Exif.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Exif.php
@@ -1043,6 +1043,14 @@
10441044 $this->formatNum( $val ) );
10451045 break;
10461046
 1047+ // Do not transform fields with pure text.
 1048+ // For some languages the formatNum() conversion results to wrong output like
 1049+ // foo,bar@example,com or foo٫bar@example٫com
 1050+ case 'ImageDescription':
 1051+ case 'Artist':
 1052+ case 'Copyright':
 1053+ $tags[$tag] = htmlspecialchars( $val );
 1054+ break;
10471055 default:
10481056 $tags[$tag] = $this->formatNum( $val );
10491057 break;
Index: trunk/phase3/RELEASE-NOTES
@@ -402,6 +402,8 @@
403403 * (bug 19289) importDump.php can now handle bzip2 and 7zip
404404 * (bug 20131) Fixed a PHP notice for users having the "rollback" right on
405405 Special:RecentChangesLinked
 406+* Do not transform EXIF fields with pure text to avoid results like
 407+ foo,bar@example,com
406408
407409 == API changes in 1.16 ==
408410

Comments

#Comment by Raymond (talk | contribs)   08:40, 11 August 2009

Example Example of the previous misleading output, from File:Früh Brauhaus Köln - Am Hof 14 (4614-16).jpg:

EXIF with misleading formatnum conversion.png

Status & tagging log