Hello fellow debs,
What version of HTMLCleaner/XWiki do you have ? Could
be a bug in an
older version.
- htmlcleaner-2.2.jar
- xwiki 3.5.1
On Fri, Oct 25, 2013 at 8:44 AM, Marius Dumitru
Florea
<mariusdumitru.florea(a)xwiki.com> wrote:
> What syntax are you using? I just tried with XWiki 2.1 syntax:
2.1
However, the problem is not that html macro is lost.
The problem is that we use the wysiwyg editor for html editing, the underlying xwiki
content is purely html and not xwiki syntax, and the editor seems to call the htmlCleaner
service at start.
In this setting, the workflow:
- start to edit (shows wysiwyg)
- click source
- add the iframe
- save
… shows the iframe well
- click edit again (shows wysiwyg)
- go to source, the iframe element is gone (but not, for example, the child text)
Sergiu, your statement:
Of course, the iframe element is lost when the cleaned
HTML is converted to XWiki 2.1 syntax
because there's no equivalent for the iframe element in the wiki syntax.
is contradicting the rest of the mail: the converter could replace it with an html macro
but I do not know how to patch it for this.
paul
----------8<----------
before
{{html}}
<iframe src="http://www.xwiki.org"></iframe>
{{/html}}
after
---------->8----------
and the iframe element is not lost when I use the WYSIWYG editor.
Moreover, even if I inject the following HTML in the BODY element of
the WYSIWYG editor's rich text area:
----------8<----------
<p>before</p>
<iframe src="http://www.xwiki.org"></iframe>
<p>after</p>
---------->8----------
the HTML cleaner produces:
----------8<----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head></head><body><p>before</p>
<iframe src="http://www.xwiki.org"></iframe>
<p>after</p></body></html>
---------->8----------
which has the iframe element as you can see. Of course, the iframe
element is lost when the cleaned HTML is converted to XWiki 2.1 syntax
because there's no equivalent for the iframe element in the wiki
syntax. That's why we use the HTML macro. So I think your problem is
elsewhere.
Hope this helps,
Marius
On Fri, Oct 25, 2013 at 1:27 AM, Paul Libbrecht <paul(a)hoplahup.net> wrote:
Hello fellow xwiki developers,
trying to understand why an iframe element disappears after we re-edit source after we
insert the iframe in source html, I seem to understand that the service called
"HTMLCleaner" is the guilty one (the service is called as a POST to URL
/xwiki/resources/js/xwiki/wysiwyg/xwe/HTMLConverter.gwtrpc
Is there any way to configure the policy of the html-cleaner?
I did not see this among the configs.
thanks in advance.
paul
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs