def sanitize_html(self, message):
        """Sanitize user-submitted HTML"""
        # Use django's built-in HTML cleaner to improve HTML. This will also
        # run the HTML through djanog's normalize_newlines utility
        message = clean_html(message)

        # Detect if redactor is enabled
        if 'vars:redactor=true' not in message:
            # If redactor is not enabled, replace \n with <br/>
            message = string.replace(message, '\n', '<br/>')

        clean_code = self._cleanse_tags(message)

        final = handle_breaks(clean_code)

        return final
dataset/ETHPy150Open ofa/connect/open_connect/connect_core/utils/mixins.py/SanitizeHTMLMixin.sanitize_html/original