Closed (fixed)
Project:
FileField
Version:
6.x-3.10
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2012 at 18:38 UTC
Updated:
24 Apr 2013 at 15:20 UTC
Jump to comment: Most recent file
FileField is automatically generating classname attributes with dots in them:
field-icon-application-vnd.openxmlformats-officedocument.wordprocessingml.template
These cannot be properly referenced in CSS, because a.b is a joining reference for two classnames on the same element, not a long single classname. And while you might get away with a\.b to escape the dot, this is a hack and not universally supported by browsers.
Could the . be replaced by a - or -- in the output?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | translate_dot_to_dash_in_classname-1645544-2.patch | 584 bytes | stuartEngelhardt |
Comments
Comment #1
truyenle commentedSame issue here.
If I upload files with extension as:
.Xltx ---> the module generate a class name: field-icon-application-vnd.openxmlformats-officedocument.spreadsheetml.template
.Dotx ---> the module generate a class name: field-icon-application-vnd.openxmlformats-officedocument.wordprocessingml.template
These can't be reference even though I am using escape character as
.field-icon-application-vnd\.openxmlformats-officedocument\.spreadsheetml\.template
Agree with Stuart if it is turn out like - or -- instead of .
Thanks
Comment #2
stuartEngelhardt commentedI found the omission in filefield.theme.inc on line 23. Slashes and Pluses have been being converted, but dots (periods) have not been. I have added dot (period) to the translation array.
Comment #3
quicksketchThanks, I'll make sure to add this to the next release of FileField. In the mean time you can easily override the theme_filefield_icon function in your own template.php file to include the change.
Comment #4
quicksketchThanks, finally committed. Will be in the 3.11 release.
Comment #5
quicksketchClarifying title.