Support » Alpha/Beta/RC » 5.9RC2, twentytwenty-two theme. Incorrect quote symbol for HTML attributes.

  • Resolved wpdevelop


    Theme incorrectly closing HTML elements with attributes that contain HTML tags in content of the posts and pages.

    For example, if the HTML element have tags like this
    <div data-content="<div class='flex-popover-content-data'>Data</div>" data-original-title="<div class='popover-title-id' > ID: 19</div>" >My text</div>
    Theme show info like this
    <div data-content="<div class='flex-popover-content-data'>Data</div>” data-original-title=”<div class='popover-title-id' > ID: 19</div>” >My text</div>

    Issue relative to second (and next) quote symbols
    it’s have to be like this one "

    • This topic was modified 8 months, 2 weeks ago by wpdevelop.
Viewing 2 replies - 1 through 2 (of 2 total)
  • data-content="<div class='flex-popover-content-data'>Data</div>" is not valid HTML. You cannot put HTML inside an HTML attribute. This is breaking the HTML so that WordPress cannot tell that some of the " symbols are supposed to be HTML.

    If you want HTML inside an attribute you need to escape it first and then unescape it whenever you want to use it as HTML. In this context escaping means encoding characters like < inside the attribute as < and > as > etc.

    Moderator Marius L. J.


    As this is not a new issue with WordPress 5.9, but has always been this way, for the reasons mentioned by @jakept, I’m marking the topic as resolved so that we know it is not something that might need looking into before the 5.9 release. If you feel this is a bug and have any thoughts on how it may be solved, please create a ticket with the Gutenberg repository, where development of the block editor is happening.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘5.9RC2, twentytwenty-two theme. Incorrect quote symbol for HTML attributes.’ is closed to new replies.