Permalink
Browse files

Merge branch 'MDL-36571_22' of git://github.com/timhunt/moodle into M…

…OODLE_22_STABLE
  • Loading branch information...
2 parents f7f7cf7 + 0f36ae6 commit 6330424fae92480ef4d44dbe742ffa81565766e6 @danpoltawski danpoltawski committed Nov 20, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 question/type/multichoice/question.php
View
8 question/type/multichoice/question.php
@@ -126,10 +126,10 @@ public function check_file_access($qa, $options, $component, $filearea, $args, $
}
public function make_html_inline($html) {
- $html = preg_replace('~\s*<p>\s*~', '', $html);
- $html = preg_replace('~\s*</p>\s*~', '<br />', $html);
- $html = preg_replace('~<br />$~', '', $html);
- return $html;
+ $html = preg_replace('~\s*<p>\s*~u', '', $html);
+ $html = preg_replace('~\s*</p>\s*~u', '<br />', $html);
+ $html = preg_replace('~(<br\s*/?>)+$~u', '', $html);
+ return trim($html);
}
}

0 comments on commit 6330424

Please sign in to comment.