Index: advpoll.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/advpoll/advpoll.module,v
retrieving revision 1.21.2.25
diff -u -r1.21.2.25 advpoll.module
--- advpoll.module	23 Apr 2007 21:59:06 -0000	1.21.2.25
+++ advpoll.module	23 Apr 2007 23:34:57 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: advpoll.module,v 1.21.2.25 2007/04/23 21:59:06 fajerstarter Exp $
+// $Id: advpoll.module,v 1.21.2.24 2007/04/02 17:09:39 fajerstarter Exp $
 
 /**
  * @file
@@ -675,11 +675,11 @@
       $rows[$key]['name'] = $vote->name ? theme('username', $vote) : check_plain($vote->hostname);
       if ($node->type == 'advpoll_ranking') {
         // Need two dimensional results (if equal rankings are allowed)
-        $rows[$key]['votes'][$vote->value][] = check_plain($node->choice[$vote->tag]['label']);
+        $rows[$key]['votes'][$vote->value][] = _advpoll_choice_markup($node->choice[$vote->tag]['label'], $node->format);
       }
       else {
         // Just need one dimensional results
-        $rows[$key]['votes'][] = check_plain($node->choice[$vote->tag]['label']);
+        $rows[$key]['votes'][] = _advpoll_choice_markup($node->choice[$vote->tag]['label'], $node->format);
       }
     }
     
@@ -1221,3 +1221,17 @@
   }
   return $_advpoll_modes;
 }
+
+/**
+ * Helper fucntion for rich text in choices.
+ *  
+ * We strip out the paragraphs which are not allowed within the label element
+ * and created by check_markup() when "Line break converter"-filter is used.
+ */
+function _advpoll_choice_markup($text, $format = FILTER_FORMAT_DEFAULT) {
+  $text = check_markup($text, $format);
+  $text = str_replace(array('<p>', '</p>'), '', $text);
+  $text = trim($text);
+
+  return $text; 
+}
Index: modes/binary.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/advpoll/modes/binary.inc,v
retrieving revision 1.7.2.11
diff -u -r1.7.2.11 binary.inc
--- modes/binary.inc	2 Apr 2007 17:09:39 -0000	1.7.2.11
+++ modes/binary.inc	23 Apr 2007 23:00:09 -0000
@@ -32,7 +32,7 @@
     foreach ($node->choice as $i => $choice) {
       // Don't show blank choices
       if ($choice['label']) {
-         $list[$i] = check_plain($choice['label']);
+         $list[$i] = _advpoll_choice_markup($choice['label'], $node->format);
       }
     }
     $form['choice'] = array(
@@ -106,7 +106,7 @@
         $votes[$i] = 0;
       }
       $percentage = round(100 * $votes[$i] / $total_votes, 0);
-      $output .= theme('advpoll_bar',  check_plain($ch['label']), $percentage, format_plural($votes[$i], '1 vote', '@count votes'), $block);
+      $output .= theme('advpoll_bar',  _advpoll_choice_markup($ch['label'], $node->format), $percentage, format_plural($votes[$i], '1 vote', '@count votes'), $block);
     }
   }
 
Index: modes/ranking.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/advpoll/modes/ranking.inc,v
retrieving revision 1.8.2.16
diff -u -r1.8.2.16 ranking.inc
--- modes/ranking.inc	2 Apr 2007 17:09:39 -0000	1.8.2.16
+++ modes/ranking.inc	23 Apr 2007 23:36:57 -0000
@@ -62,7 +62,7 @@
       if ($choice['label']) {
         $form['choice'][$key] = array(
           '#type' => 'select',
-          '#title' => check_plain($choice['label']),
+          '#title' => _advpoll_choice_markup($choice['label'], $node->format),
           '#options' => $choices,
         );
       }
@@ -156,8 +156,7 @@
 
         // Loop through all choices with this ranking
         foreach ($ranking[$i]->choices as $choice) {
-          $this_rank .= ($first_one? '' : ', ')
-            . check_plain($node->choice[$choice]['label']);
+          $this_rank .= ($first_one? '' : ', ') . _advpoll_choice_markup($node->choice[$choice]['label'], $node->format);
           $first_one = false;
         }
 
@@ -175,7 +174,7 @@
 
         // Loop through all choices with this ranking
         foreach ($ranking[$i]->choices as $choice) {
-          $output .= ($first_one? '' : ', ') . check_plain($node->choice[$choice]['label']);
+          $output .= ($first_one? '' : ', ') . _advpoll_choice_markup($node->choice[$choice]['label'], $node->format);
           $first_one = false;
         }
 
