scripts/wiki/macro/JavaScript.py
Stephane Glondu 40054a968b [wiki] Fix JavaScript macro so that preview and diff work
darcs-hash:20110101162826-61eff-d9b54629d19cd701cad6b1ac39b4dfc0d8d889c8.gz
2011-01-01 17:28:26 +01:00

8 lines
230 B
Python
Executable file

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from MoinMoin.wikiutil import escape
def execute(macro, text):
return macro.formatter.rawHTML(
'\n<script type="text/javascript" src="%s"></script>\n' % escape(text, 1))