User account menu

  • Log in

Breadcrumb

  • Home
  • HTML 5
Home
DrupalVIP
Freelancer service with great care and enthusiasm.

Main navigation

  • Home
  • Products
  • Blog
  • Support

HTML 5

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' .

 

Drupal
Code Example
Front-End
HTML 5
Custom Block
Module Development
Drupal 9

Drupal Form Element Reference

Drupal core provides a couple dozen different input #type elements that can be added to forms. This includes one for every standard HTML5 input element, and some Drupal-specific ones that encapsulate more complex interactions like uploading files. But how can you know what elements exist? Where do you find information about what Render API properties each element uses?

Form Element
Form API
Module Development
HTML 5
Drupal
Code Example
Form Elements
Subscribe to HTML 5

The Freelancer Assistance

Drupal Development

Drupal Development

Site Management

Site Management

Proactive Maintenance

Proactive Maintenance

Fullstack Service

Fullstack Service

Drupal Shared Space

Drupal Shared Space

Drupal Training

drupal training session
Review All Services

Buy Hourly Support

 

Drupal platform support for complex websites. The service includes support, training, troubleshooting, fixes, updates, tool creation and module building.
* Minimum order is for 5 hours of support
* For every 20 hours of order you will be entitled to an additional hour of support
* For every 50 hours of order you will be entitled to 5 additional hours of support

 

>> Payment <<

 
cards

מופעל על-ידי paypal

Legal

  • Home
  • Contact
  • Products

Copyright © 2026 DrupalVIP - All rights reserved

Developed & Designed by Yuval Ben-Hur