(self, text)
return text
Iterate over html stash and restore "safe" html.
Iterate over html stash and restore "safe" html.
Iterate over html stash and restore safe html .
def run(self, text):
        """ Iterate over html stash and restore "safe" html. """
        for i in range(self.markdown.htmlStash.html_counter):
            html, safe  = self.markdown.htmlStash.rawHtmlBlocks[i]
            if self.markdown.safeMode and not safe:
                if str(self.markdown.safeMode).lower() == 'escape':
                    html = self.escape(html)
                elif str(self.markdown.safeMode).lower() == 'remove':
                    html = ''
                else:
                    html = self.markdown.html_replacement_text
            if self.isblocklevel(html) and (safe or not self.markdown.safeMode):
                text = text.replace("<p>%s</p>" % 
                            (self.markdown.htmlStash.get_placeholder(i)),
                            html + "\n")
            text =  text.replace(self.markdown.htmlStash.get_placeholder(i), 
                                 html)
        return text
def run ( self , text ) : for i in range ( self . markdown . htmlStash . html_counter ) : html , safe = self . markdown . htmlStash . rawHtmlBlocks [ i ] if self . markdown . safeMode and not safe : if str ( self . markdown . safeMode ) . lower ( ) == 'escape' : html = self . escape ( html ) elif str ( self . markdown . safeMode ) . lower ( ) == 'remove' : html = '' else : html = self . markdown . html_replacement_text if self . isblocklevel ( html ) and ( safe or not self . markdown . safeMode ) : text = text . replace ( "<p>%s</p>" % ( self . markdown . htmlStash . get_placeholder ( i ) ) , html + "\n" ) text = text . replace ( self . markdown . htmlStash . get_placeholder ( i ) , html ) return text