From be14203534c5f09d0c70c2bf59b81b80f2a90b32 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 31 Mar 2005 09:25:33 +0000 Subject: - #18817: Clean up plain-text checking (see drupal-devel!) --- modules/poll/poll.module | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/poll') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index d5eae590a..933c1067a 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -307,9 +307,9 @@ function poll_view_voting(&$node, $teaser, $page, $block) { if ($node->choice) { $list = array(); foreach ($node->choice as $i => $choice) { - $list[$i] = drupal_specialchars($choice['chtext']); + $list[$i] = check_plain($choice['chtext']); } - $form .= form_radios($page ? '' : $node->title, 'choice', -1, $list); + $form .= form_radios($page ? '' : check_plain($node->title), 'choice', -1, $list); } $form .= ''; $form .= form_hidden('nid', $node->nid); @@ -336,12 +336,12 @@ function poll_view_results(&$node, $teaser, $page, $block) { // Output the divs for the text, bars and percentages $output .= '
'; if ($block) { - $output .= '
'. $node->title .'
'; + $output .= '
'. check_plain($node->title) .'
'; } foreach ($node->choice as $i => $choice) { if ($choice['chtext'] != '') { $percentage = round($choice['chvotes'] * 100 / max($votestotal, 1)); - $output .= '
'. drupal_specialchars($choice['chtext']) .'
'; + $output .= '
'. check_plain($choice['chtext']) .'
'; $output .= '
'; $output .= '
'; $output .= '
'; @@ -360,7 +360,7 @@ function poll_view_results(&$node, $teaser, $page, $block) { */ function poll_results() { if ($node = node_load(array('nid' => arg(1)))) { - drupal_set_title($node->title); + drupal_set_title(check_plain($node->title)); print theme('page', node_show($node, 0)); } else { -- cgit v1.2.3