Issue: Custom CSS styles
-
With “Custom CSS styles” I mean the option “Adv. Gutenberg” => “Custom CSS styles” for example “Blue message” or “Left Block”.
When I add a style attribute with quotation marks like >"< or >'< for example as ‘content: "Phone";’ or “background-image: url(“https://example.com/yourimage.png");” it will be html 4.1 encoded like “\"”. I thnink there is an overdoing safety algorithm wich encode all data with “htmlentities([…], ENT_HTML401) or something like that.
I think there are two solutions.
1st. Don’t do any encoding and only warn the user if some special chars are inside like “<” or “>”.
2nd. Implement an option wich control encoding yes or no for all or each style.One additional suggestion for future releases, add a placholder like “/*[class-name]*/” wich is replaced by the class name of the style. So I can write:
/*[class-name]*/ { margin-left: 1em; } /*[class-name]*/::before { content: "phone:"; }The special form is to solve errors with typos like “/*[clas-name]*/” or “/*[classname]*/”. It will be only CSS-commands and ignored so for example “/*[clas-name]*/.strong” is parsed as “.strong”.
Hope you understand the issue and suggestion.
The topic ‘Issue: Custom CSS styles’ is closed to new replies.