Permalink
Browse files

MDL-11769:

question name is properly truncated to less than 255 characters tom
stop PostGRES choking.
  • Loading branch information...
1 parent d6949b0 commit 01c48affffcb8dfeaaecec2ce8618faaa02ea534 thepurpleblob committed Oct 15, 2007
Showing with 2 additions and 1 deletion.
  1. +2 −1 question/format/gift/format.php
@@ -217,7 +217,8 @@ function readquestion($lines) {
}
// ensure name is not longer than 250 characters
- $question->name = shorten_text( $question->name, 250 );
+ $question->name = shorten_text( $question->name, 200 );
+ $question->name = strip_tags(substr( $question->name, 0, 250 ));
// determine QUESTION TYPE
$question->qtype = NULL;

0 comments on commit 01c48af

Please sign in to comment.