I done as you suggested with a slight variation, see:
http://tracker.moodle.org/browse/MDL-6068#action_25664
You're right too, utf-8 should probably be passed in this function, though there are reports that html_entity_decode may be buggy with utf-8, see:
http://www.google.com/search?q=php+html_entity_decode+utf+bug
Quiz
Help! About a cloze question
This discussion has been locked so you can no longer reply to it.