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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicholaspaun’s picture

Status: Active » Needs review
FileSize
922 bytes

Status: Needs review » Needs work

The last submitted patch, escape-ids-2003684-1.patch, failed testing.

rszrama’s picture

Status: Needs work » Needs review
FileSize
776 bytes

Re-rolled patch attached with coding style in line with other uses of Attribute. The new HTML looks like so:

<div data-contextual-id="views_ui:admin/structure/views/view:frontpage:location=page&amp;name=frontpage&amp;display_id=page_1"></div>

Status: Needs review » Needs work

The last submitted patch, 2003684.contextual_pre_render_placeholder_attributes.patch, failed testing.

rszrama’s picture

Status: Needs work » Needs review
FileSize
5.01 KB

Updated the "use" to not have a preceding \ and fixed the failing tests to also make use of Attribute.

Wim Leers’s picture

Ohhh, 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.

Wim Leers’s picture

Status: Needs review » Needs work

The last submitted patch, 2003684-5.contextual_pre_render_placeholder_attributes.patch, failed testing.

rszrama’s picture

Status: Needs work » Needs review
FileSize
5.01 KB

Attempting a quick re-roll.

Wim Leers’s picture

Darn, I completely lost track of this :/ I'm very sorry!

Rerolling.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me :) Pretty simple changes.

rszrama’s picture

Yep, patch applies clean and still gets the job done. : )

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch!

Committed and pushed to 8.x. Thanks!

Wim Leers’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.