Skip to content

Instantly share code, notes, and snippets.

@colinjoy
Created November 9, 2014 15:53
Show Gist options
  • Save colinjoy/f07cd272bd19a260e085 to your computer and use it in GitHub Desktop.
Save colinjoy/f07cd272bd19a260e085 to your computer and use it in GitHub Desktop.
drupal string placeholders
@variable: Escaped to HTML using check_plain(). Use this as the default choice for anything displayed on a page on the site.
%variable: Escaped to HTML and formatted using drupal_placeholder(), which makes it display as <em>emphasized</em> text.
!variable: Inserted as is, with no sanitization or formatting. Only use this for text that has already been prepared for HTML display (for example, user-supplied text that has already been run through check_plain() previously, or is expected to contain some limited HTML tags and has already been run through filter_xss() previously).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment