'Create HTML text message.
Convert HTML text body (`htmltext`) into HTML email message using the
stored HTML template and the provided `context` dict.'

def render_htmltext(self, htmltext, context):

    for (key, value) in context.iteritems():
        if isinstance(value, basestring):
            context[key] = markupsafe.escape(value)
    return CourseEmailTemplate._render(self.html_template, htmltext, context)
