Issue Bug Closed

#29221Sprite Manager and Icon Works are creating invalid class names

Jo Hasenau 08/24/11, 14:12 updated 08/12/15, 14:56

Description

When using the field module which is rendered as contains plugin within the TCE forms of a page you can assign your own module name.
This name is not restricted to follow any naming conventions so it can contain any character and up to 64k of data, since the DB field is a blob.

Now while creating the classes for the page tree the value of this module field is used as part of the class name in
a) the HTML output
b) the CSS file containing the styles for the icon

Now an extension using names like

my_extension:MODULE

or

my_extension:MODULE.type.TYPE

is creating a CSS selector like

.tcarecords-table-my_extension:MODULE.type.TYPE

I guess you can imagine the problem – exactly – the icon will be replaced with the fatal error icon.

We’ve got naming conventions for CSS classes though, so sprite manager and icon works should respect these and filter the value with an appropriate expression.

AFAIR it has been like that in 4.4.x already so this applies to all currently supported core versions.
I will come up with a patch soon.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.