• Resolved armarius

    (@armarius)


    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&quot;);” it will be html 4.1 encoded like “\&quot;”. 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.

    • This topic was modified 1 month ago by armarius.
    • This topic was modified 1 month ago by armarius.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support htmgarcia

    (@htmgarcia)

    Hi @armarius,
    may you share the style you’re having problems with? Also an screenshot to see how it looks in your end may clarify your concern.
    ___
    Regards

    Plugin Support htmgarcia

    (@htmgarcia)

    Note: custom styles are designed to support classnames as selectors.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.