From dfde3b2069ad3f0cd21776a9b8ff4f8c7bfc84fa Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 30 Mar 2005 23:34:04 +0000 Subject: [PATCH] alt tags in radio buttons were breaking display it they contain lang tags. Now they are filtered against strip_tags() and processed by format_text(). In vertical display, format_text() was using format_text (FORMAT_PLAIN), not sure why and it was breaking multilang support, replacing all <> to their htmlentities(). --- mod/choice/lib.php | 2 +- mod/choice/view.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 07fccbc1f6a..51f1c1bf684 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -193,7 +193,7 @@ function choice_get_choice($choiceid) { if ($choice = get_record("choice", "id", $choiceid)) { if ($options = get_records("choice_options", "choiceid", $choiceid, "id")) { foreach ($options as $option) { - $choice->option[$option->id] = $option->text; + $choice->option[$option->id] = $option->text; } return $choice; } diff --git a/mod/choice/view.php b/mod/choice/view.php index b0d02a30e18..42f19d66002 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -118,7 +118,7 @@ foreach ($choice->option as $optionid => $text) { if ($text) { echo ""; - echo ""; + echo ""; echo format_text($text); echo ""; } @@ -132,8 +132,8 @@ foreach ($choice->option as $optionid => $text) { if ($text) { echo ""; - echo "". - format_text($text, FORMAT_PLAIN); + echo "". + format_text($text); echo ""; echo ""; }