Exemple #1
0
    def image(self, src, title, text):
        src = mistune.escape_link(src)
        text = mistune.escape(text, quote=True)

        if title:
            title = mistune.escape(title, quote=True)
            ecml = """\
                <figure align="center">
                    <caption>%s</caption>
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (title, src)
        else:
            ecml = """\
                <figure align="center">
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (src, )
        #end if

        return ecml
Exemple #2
0
    def image(self, src, title, text):
        src  = mistune.escape_link(src)
        text = mistune.escape(text, quote=True)

        if title:
            title = mistune.escape(title, quote=True)
            ecml = """\
                <figure align="center">
                    <caption>%s</caption>
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (title, src)
        else:
            ecml = """\
                <figure align="center">
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (src,)
        #end if

        return ecml
Exemple #3
0
 def link(self, link, title, text):
     link = mistune.escape_link(link)
     return '<link url="%s">%s</a>' % (link, text)
Exemple #4
0
 def link(self, link, title, text):
     link = mistune.escape_link(link)
     return '<link url="%s">%s</a>' % (link, text)