main
Last change
on this file was
42bd667,
checked in by David Fuertes <dfuertes@…>, 4 years ago
|
Historial Limpio
|
-
Property mode set to
100755
|
File size:
574 bytes
|
Line | |
---|
1 | from .markdown2 import * |
---|
2 | from gluon.html import XML |
---|
3 | from gluon._compat import to_unicode |
---|
4 | |
---|
5 | def WIKI(text, encoding="utf8", safe_mode='escape', html4tags=False, **attributes): |
---|
6 | if not text: |
---|
7 | test = '' |
---|
8 | if 'extras' in attributes: |
---|
9 | extras = attributes['extras'] |
---|
10 | del attributes['extras'] |
---|
11 | else: |
---|
12 | extras=None |
---|
13 | text = to_unicode(text, encoding, 'replace') |
---|
14 | |
---|
15 | return XML(markdown(text,extras=extras, |
---|
16 | safe_mode=safe_mode, html4tags=html4tags)\ |
---|
17 | .encode(encoding,'xmlcharrefreplace'),**attributes) |
---|
18 | |
---|
Note: See
TracBrowser
for help on using the repository browser.