Page MenuHomePhabricator

srcset uses incorrect radix character
Closed, DuplicatePublic

Description

The main image link on the file page in my setup has a "1,5x," in the srcset attribute of the img tag. It should be "1.5x," instead. Because of this, none of my files are showing correctly in the "File:..." pages nor as thumbs in the Wiki pages. The thumb does work correctly in the "File:" page as do links to other image resolutions.

Event Timeline

I guess this is due to LC_NUMERIC being set to his french number format.

There is a foreach loop in Html::srcSet that does

// Cast density to float to strip 'x', then back to string to serve
$density = (string)(float)$density;

which indirectly causes this. We could either use number_format, but then we end up with 1.0x instead of 1x, or I guess we can do character replacement...
Neither is particularly ideal really...