Marius,
I have finally been able to see the extra "processing-instructions-like" html
comments that the html macro (and probably all macros?) generate in one of my stock XWiki
installations (an XWiki 4.3): HTMLCleaner was called with code:
<!--startmacro:html\!-\!clean="false"\!-\!<iframe
width="450" height="350">no
frames?</iframe>--><!--stopmacro-->
And this properly edits into the editor.
So, what can be the reason that our editor (based on xwiki 3.5) does not include these
comments but includes the raw html which then gets cleaned out by the html-cleaner?
thanks in advance.
Paul
Le 25 oct. 2013 à 21:19, Paul Libbrecht <paul(a)hoplahup.net> a écrit :
In this setting, the workflow:
- start to edit (shows wysiwyg)
- click source
- add the iframe
Using the {{html}} macro?
No we had not tried this but now I did and it also got killed.
(we have opened bug
http://jira.xwiki.org/browse/CURRIKI-6382 for this, a video is coming
there showing how non-functional the html macro is in this case). My guess is that were
are hitting an unsupported feature of the "html editor" facet.
Sergiu,
your statement:
Marius ;)
Sorry for that!
I like your reactivity!
There's no contradiction at all. The title of
this thread is
"HTMLCleaner to remove some iframes?" and the answer is definitely No,
the HTML cleaner doesn't remove the iframe element.
Well. It does if it's not wrapped within an html macro.
As I already said,
the iframe element is lost when the cleaned HTML is converted to wiki
syntax because the iframe element doesn't have a corresponding wiki
syntax element. The conversion is done using the rendering module
http://rendering.xwiki.org with very precise rules.
This is what would interest me. Where are the rules?
You need a parser to obtain an XDOM from the
input syntax (HTML) and a renderer to serialize the XDOM into the output syntax (XWiki
2.1). The converter
cannot magically add a macro/transformation marker around the iframe
element. You have to do this.
I see two options in your case:
1) Try to use XHTML as source syntax, not XWiki 2.1
This is done in the video and fails.
2) Check the Annotated XHTML syntax that is used
as input for the
WYSIWYG editor. Edit a page that has macros and check the HTML that is
given as input to the editor. You'll notice some markers. Or, you
could check the HTML that is produced when you insert a macro from the
WYSIWYG editor.
(I have never seen markers of xwiki macros output inside html, this must be the reason).
thanks
Paul