Takes care of formats other that HTML

Fixes troywilliams/moodle-mod_dialogue#33