function _advpoll_choice_markup in Advanced Poll 6
Same name and namespace in other branches
- 5 advpoll.module \_advpoll_choice_markup()
- 6.3 advpoll.module \_advpoll_choice_markup()
- 6.2 advpoll.module \_advpoll_choice_markup()
Helper function 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.
5 calls to _advpoll_choice_markup()
- advpoll_view_results_binary in modes/
binary.inc - advpoll_view_results_ranking in modes/
ranking.inc - advpoll_votes_page in ./
advpoll.pages.inc - Display the votes page.
- advpoll_voting_binary_form in modes/
binary.inc - Implementation of the view_voting hook for the poll module.
- advpoll_voting_ranking_form in modes/
ranking.inc
File
- ./
advpoll.module, line 1344 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function _advpoll_choice_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
$text = check_markup($text, $format, $check);
$text = str_replace(array(
'<p>',
'</p>',
), '', $text);
$text = trim($text);
return $text;
}