"activity names" are not the same thing as "section names" (as in "Remove HTML tags from all activity names") which are coded in core for all formats as 'text' -> https://github.com/moodle/moodle/blob/master/course/editsection_form.php#L33 - thus cannot take HTML. Therefore you can either adapt your Moodle installation or find / create a tracker issue to have this implemented in the next version of Moodle (currently 3.0) if its approved and somebody writes the code.
Courses and course formats
Adding an Icon to Topics (section names)
This discussion has been locked so you can no longer reply to it.