From 1e20dea9b23920b3e7ef7159ca452894eb996627 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 28 Jul 2011 11:50:42 +0100 Subject: [PATCH] MDL-28508 bad string trunction in Aiken format. --- question/format/aiken/format.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/question/format/aiken/format.php b/question/format/aiken/format.php index f5f2c58d11a..d9db4bb7eab 100644 --- a/question/format/aiken/format.php +++ b/question/format/aiken/format.php @@ -96,8 +96,8 @@ class qformat_aiken extends qformat_default { } else { // Must be the first line of a new question, since no recognised prefix. $question->qtype = MULTICHOICE; - $question->name = htmlspecialchars(substr($nowline, 0, 50)); - $question->questiontext = htmlspecialchars($nowline); + $question->name = shorten_text(s($nowline), 50); + $question->questiontext = s($nowline); $question->single = 1; $question->feedback[] = ''; }