Drupal security reference
1. Always use check_plain(), check_markup(), filter_xss() while you process input data.
2. For Drupal set message use placeholders (or) sanitize using one of check_plain(), check_markup & filter_xss()
placeholder example:
$output = 'coming from somewhere';
drupal_set_message(t('this is @output', array('@output' => $output)));
sanitize example:
$output = 'coming from somewhere';
drupal_set_message(check_plain(t('this is '. $output));
2. For Drupal set message use placeholders (or) sanitize using one of check_plain(), check_markup & filter_xss()
placeholder example:
$output = 'coming from somewhere';
drupal_set_message(t('this is @output', array('@output' => $output)));
sanitize example:
$output = 'coming from somewhere';
drupal_set_message(check_plain(t('this is '. $output));
Comments
Post a Comment