summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/poll.module b/modules/poll.module
index 81979e3d5..c4bdaa904 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -146,7 +146,7 @@ function poll_insert($node) {
for ($i = 0; $i < $node->choices; $i++) {
if ($node->choice[$i] != "") {
- db_query("INSERT INTO poll_choices (nid, chtext, chvotes, chorder) VALUES (%d, '%s', %d, %d)", $node->nid, filter($node->choice[$i]), $node->chvotes[$i], $i);
+ db_query("INSERT INTO poll_choices (nid, chtext, chvotes, chorder) VALUES (%d, '%s', %d, %d)", $node->nid, $node->choice[$i], $node->chvotes[$i], $i);
}
}
}
@@ -263,7 +263,7 @@ function poll_view_voting(&$node, $main, $block, $links) {
if ($node->choice) {
foreach ($node->choice as $key => $value) {
if ($value != "") {
- $output .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" /> $value<br />";
+ $output .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."<br />";
}
}
}
@@ -306,7 +306,7 @@ function poll_view_results(&$node, $main, $block, $links) {
$width = round($node->chvotes[$key] * 100 / $votesmax);
$percentage = round($node->chvotes[$key] * 100 / max($votestotal, 1));
- $output .= "<div class=\"poll-text\">$value</div>";
+ $output .= "<div class=\"poll-text\">". filter($value) ."</div>";
$output .= "<div style=\"float:left; width:". $width ."%; height: 1em;\" class=\"poll-foreground\"></div>";
$output .= "<div style=\"float:left; width:". (100 - $width) ."%; height: 1em;\" class=\"poll-background\"></div>";
$output .= "<div align=\"right\"> $percentage%". (!$block ? " (". format_plural($node->chvotes[$key], "1 vote", "%count votes") .")" : "") ."</div>";
@@ -379,7 +379,7 @@ function poll_update($node) {
db_query("DELETE FROM poll_choices WHERE nid = %d", $node->nid);
for ($i = 0; $i < $node->choices; $i++) {
- $choice->chtext = filter($node->choice[$i]);
+ $choice->chtext = $node->choice[$i];
$choice->chvotes = (int)$node->chvotes[$i];
$choice->chorder = $i;