view data/plugin/macro/ @ 530:78ca2464edf9

macro.EmbedContent: embeds html content of an URL on a page (action=content)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 25 May 2010 01:45:05 +0200
children 127da830be6c
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - macro to embed content of an other (wiki) page


    @copyright: 2010 by MoinMoin:ReimarBauer
    @license: GNU GPL, see COPYING for details.
import urllib2

def macro_EmbedContent(macro, url=u""):
    fmt = macro.formatter
    if url:
        uo = urllib2.urlopen(url)
        html =
        return fmt.rawHTML(html)