You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it's possible for users to create a subfolder that contain spaces in the name. Craft then preserves these spaces in the file path. This is problematic when using the imgsrcset attribute and getUrl() as unlike the src attribute spaces are used as the delimiter for the descriptor. Spaces within the file url cause the browser to stop parsing and ignore srcset.
Craft should convert spaces in folder names to underscores (or similar) on folder creation, or disallow spaces entirely.
Additional info
Craft version: 3.1
PHP version: 7.1
The text was updated successfully, but these errors were encountered:
I agree spaces shouldn’t ever be allowed, in filenames or subfolder names (unless a plugin were to modify the name after we’ve already removed the spaces ourselves).
I was pretty sure that this is a recent bug, and when testing on Craft 3.0.37, we found that subfolders with spaces are replaced with hyphens; e.g. "Banner Images" becomes "Banner-Images".
Description
Currently it's possible for users to create a subfolder that contain spaces in the name. Craft then preserves these spaces in the file path. This is problematic when using the
img
srcset
attribute andgetUrl()
as unlike thesrc
attribute spaces are used as the delimiter for the descriptor. Spaces within the file url cause the browser to stop parsing and ignoresrcset
.Craft should convert spaces in folder names to underscores (or similar) on folder creation, or disallow spaces entirely.
Additional info
The text was updated successfully, but these errors were encountered: