Same name and namespace in other branches
  1. 4.6.x includes/bootstrap.inc \check_plain()
  2. 4.7.x includes/bootstrap.inc \check_plain()
  3. 6.x includes/bootstrap.inc \check_plain()
  4. 7.x includes/bootstrap.inc \check_plain()

Encode special characters in a plain-text string for display as HTML.

Uses drupal_validate_utf8 to prevent cross site scripting attacks on Internet Explorer 6.

107 calls to check_plain()
aggregator_form_feed in modules/aggregator/aggregator.module
Generate a form to add/edit feed sources.
aggregator_page_categories in modules/aggregator/aggregator.module
Menu callback; displays all the categories used by the aggregator.
aggregator_page_list in modules/aggregator/aggregator.module
aggregator_page_opml in modules/aggregator/aggregator.module
Menu callback; generates an OPML representation of all feeds.
aggregator_page_sources in modules/aggregator/aggregator.module
Menu callback; displays all the feeds used by the aggregator.

... See full list

3 string references to 'check_plain'
blogapi_admin_settings in modules/blogapi/blogapi.module
node_form_alter in modules/node/node.module
Implementation of hook_form_alter().
taxonomy_form_vocabulary in modules/taxonomy/taxonomy.module
Display form for adding and editing vocabularies.

File

includes/bootstrap.inc, line 670
Functions that need to be loaded on every Drupal request.

Code

function check_plain($text) {
  return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
}