I took a second look.
>>> WIKI('this <b>is</b> a test').xml()
'<p>this <b>is</b> a test</p>\n'
>>> WIKI('this <b>is</b> a test',safe_mode=True).xml()
'<p>this [HTML_REMOVED]is[HTML_REMOVED] a test</p>\n'
>>> WIKI('this <b>is</b> a test',safe_mode=False).xml()
'<p>this <b>is</b> a test</p>\n'
>>> WIKI('this <script>is</script> a test',safe_mode=False).xml()
'<p>this <script>is</script> a test</p>\n'
It seems safe_mode=False is the way to go but it does do any
sanitization either.
This is a problem with the markdown2 library we use.
For now you can do:
XML(WIKI('this <b>is</b> a test',safe_mode=False),sanitize=True)
until I finish rewriting markdown.
On Nov 26, 7:13 am, Johann Spies <[email protected]> wrote:
> 2009/11/24 mdipierro <[email protected]>:
>
> I am testing with "<h2>Post a comment</h2>":
>
> > When you do WIKI(....,safe_mode='escape') is default. Try with
> > safe_mode=None or safe_mode=True.
>
> With "save_mode='escape'" the result is ""
>
> With "save_mode=True" the result is "[HTML_REMOVED]Post a
> comment[HTML_REMOVED]"
>
> :(
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.