So for those web-sites which still use a DsRegionBlock functionality (i.e. it makes it possible to create blocks from entity fields from a view display), there is a problem in rendering style HTML attribute (for all tags) since markup being rendered is passed in an Xss::attributes (where style attribute will be stripped off).

It started to occur from DS version 3.4 - because drupal_render_children (which is going to be deprecated in 9.x Drupal) was replaced with similar logic. The problem is - $output is returned as a string - but should be returned as a Markup::create object. (so the markup is tagged as a safe and won't be passed into an Xss filtering)

CommentFileSizeAuthor
#2 markup-as-object-3150889-2.patch683 bytesStockticker
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stockticker created an issue. See original summary.

Stockticker’s picture

Attaching a patch that solves this issue (which is a pretty critical issue for my client's site.)

Stockticker’s picture

Status: Active » Needs review
Stockticker’s picture

Assigned: Stockticker » Unassigned

  • swentel committed 0478b1b on 8.x-3.x authored by Stockticker
    Issue #3150889 by Stockticker: DsRegionBlock should return markup as an...
swentel’s picture

Status: Needs review » Fixed

Committed and pushed to the 8.x-3.x branch, thanks!

New release is approximately at the end of this month.

The 8.x-4.x branch does not have this functionality anymore, so no need for a commit there.

Status: Fixed » Closed (fixed)

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