O'Reilly logo

Drupal 7 Webform Cookbook by Douglas Vernon Denny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enhancing component descriptions with HTML

Component descriptions can appear to be a little bland and lifeless as they seem to permit only plain text. Webform does, however, permit some HTML tagged input in these description textareas, that is,<a>, <em>, <strong>, <code>, and<img>.

The list of permitted HTML tags may be extended if we wish. Care must be taken lest we inadvertently open security holes, such as by permitting the<javascript> tags for example.

How to do it...

To extend this list of permitted HTML we need to edit our site's settings.php file, ordinarily found in our installation's sites/default directory.

  1. To add the line breaking<br> tag as a permitted tag, we need to override the defaults. This is achieved by opening our settings.php ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required