Skip to main content

HTML 5

Displaying 1 - 2 of 2

How to prevent drupal to filter out style attribute from custom block code

When creating custom block, the inherit function build() return an element, usualy it include tag: #markup,

but it seems that it filter out the attributes, so how can we overwrite it correctly without the filter?

In other words we want to prevent drupal to filter out style attribute from custom block code

The '#markup' is filtered in ->ensureMarkupIsSafe(), which is called from within ->doRender().

The same does not apply to '#children' .