Quote Originally Posted by xtom View Post
Request for HTML publish to retain hyphens and underscores in custom text style names.
For example; currently "my-style" publishes to HTML as class name "my-45style" and "my_style" publishes to HTML as class name "my-95style"
It looks like it does this for all non-alphanumeric characters but hyphens and underscores are common in HTML class names so maybe they could export as-is?
My use-case is to apply a custom class name eg. product-price-456789 to some text by using a text style name and then dynamically replace the text contained within the HTML span. I can put product-price-456789 as the actual text instead and replace it that way but being able to use the span class name would be nice.
xtom, if it helps, change 'my_style' to 'my style' and the end-result is my_style - the space is changed to an underscore. A leading space returns x-_.

Generally can you not work with Styles as Pascal case, 'ProductPrice 456789' or camelCase, 'productPrice 456789'? [ProductPrice_456789, productPrice_456789]

The alternative would be to iterate through all class lists and replace the offending substitutions.

Acorn