Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
contextual_pre_render_placeholder simply outputs raw HTML instead of using the new attribute system. This results in unescaped ampersands in HTML output.
Wrong:
<div data-contextual-id="views_ui:admin/structure/views/view:frontpage:location=page&name=frontpage&display_id=page_1"></div>
I will upload the patch as soon as I get an issue number.
Comments
Comment #1
nicholaspaun CreditAttribution: nicholaspaun commentedComment #3
rszrama CreditAttribution: rszrama commentedRe-rolled patch attached with coding style in line with other uses of Attribute. The new HTML looks like so:
Comment #5
rszrama CreditAttribution: rszrama commentedUpdated the "use" to not have a preceding \ and fixed the failing tests to also make use of Attribute.
Comment #6
Wim LeersOhhh, great find! I'm the one who introduced this, so I'll review this until it's committed. Let's first see if this still passes.
Comment #7
Wim Leers#5: 2003684-5.contextual_pre_render_placeholder_attributes.patch queued for re-testing.
Comment #9
rszrama CreditAttribution: rszrama commentedAttempting a quick re-roll.
Comment #10
Wim LeersDarn, I completely lost track of this :/ I'm very sorry!
Rerolling.
Comment #11
Gábor HojtsyLooks good to me :) Pretty simple changes.
Comment #12
rszrama CreditAttribution: rszrama commentedYep, patch applies clean and still gets the job done. : )
Comment #13
webchickNice catch!
Committed and pushed to 8.x. Thanks!
Comment #14
Wim Leers