MDL-36571 qtype multichoice: don't corrupt unicode characters.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 19 Nov 2012 17:21:00 +0000 (17:21 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 19 Nov 2012 18:20:38 +0000 (18:20 +0000)
commit4c1a35e34c9cdc8dfd5a2d346ee5c183ab93d11e
tree1788aaf95be68199fffa6d8604c093c5104d40da
parent6548ce091566295f49aeecec8519e78620e6cadc
MDL-36571 qtype multichoice: don't corrupt unicode characters.

It seems that \s includes non-breaking space, and the typical one-byte
representation of that is the same as some parts of multibyte unicode
characters. Therefore, you need to include the u modifer on the regular
expressions.

Also, remove any number of <br /> at the end of the answer.

Thanks to Joseph R├ęzeau and Jean-Michel Vedrine for working out what the
problem was, and how to fix it.
question/type/multichoice/question.php
question/type/multichoice/tests/question_test.php