More Pythonic way of doing switch statements:
```
return {
    'textile': u'Textile',
    'markdown': u'Markdown',
    'restructuredtext': u'reStructuredText',
}.get(name, u'HTML')
```

You can also take away returning `u'HTML'` from `get_markup_filter()`: not having a markup filter defined or having an invalid value in the settings means no filtering will be done, treating the result as plain HTML.