source: OpenRLabs-Git/deploy/rlabs-docker/web2py-rlabs/gluon/contrib/markdown/__init__.py

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 
1from .markdown2 import *
2from gluon.html import XML
3from gluon._compat import to_unicode
4
5def 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.