1. Telling creole to leave <object> alone
- Posted by euphoric (admin) Sep 04, 2009
- 1051 views
- Last edited Sep 05, 2009
I've got some HTML in my pre-processed text that I want creole to leave alone. It's the <object> tag, actually. How do I let that pass through without modification?
2. Re: Telling creole to leave <object> alone
- Posted by DerekParnell (admin) Sep 05, 2009
- 1036 views
I've got some HTML in my pre-processed text that I want creole to leave alone. It's the <object> tag, actually. How do I let that pass through without modification?
I assume you mean that you want to pass the HTML tag "<object>" throuh to the output without 'sanitizing' it. Currently, the default html_generator() routine converts all '<' and '>' to < and > respectively.
Anyhow, you need to write your own handler for the "Passthru" and/or "Sanitize" action.
The Passthru action is triggered when creole finds any original text enclosed in double-back-quotes ... eg. ``<object>``. This is designed to allow only explicitly designated text to be passed through. The default handler doesn't actually do that though. It sanitizes the original text and then wraps the result in a <div class="passthru"> tag.
The Sanitize action is triggered for all text before it gets to the output stream. By default it converts '<', '>' and '&' to their long-HTML forms. If you choose to modify this you would need to exclude the <object> tags.