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?

Comments

truyenle’s picture

Same 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

stuartEngelhardt’s picture

Status: Active » Needs review
StatusFileSize
new584 bytes

I 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.

quicksketch’s picture

Priority: Major » Minor
Status: Needs review » Reviewed & tested by the community

Thanks, 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.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, finally committed. Will be in the 3.11 release.

quicksketch’s picture

Title: Generating Classnames with Dots » Generated extension class names should not contain dots

Clarifying title.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.