'Return dictionary prepared with module content and type for indexing.'

def index_dictionary(self):

    xblock_body = super(CapaDescriptor, self).index_dictionary()
    capa_content = re.sub(re.compile('\n                                                                                <solution>.*?</solution>    |\n                                                                                <script>.*?</script>    |\n                                                                                <style>.*?</style>    |\n                                                                                <[a-z]*hint.*?>.*?</[a-z]*hint>\n                                                                ', (re.DOTALL | re.VERBOSE)), '', self.data)
    capa_content = escape_html_characters(capa_content)
    capa_body = {'capa_content': capa_content, 'display_name': self.display_name}
    if ('content' in xblock_body):
        xblock_body['content'].update(capa_body)
    else:
        xblock_body['content'] = capa_body
    xblock_body['content_type'] = self.INDEX_CONTENT_TYPE
    xblock_body['problem_types'] = list(self.problem_types)
    return xblock_body
