Hello all,
Recently we discovered that in XWiki 8.2 the {{html}} macro cleaner now removes
<video>
tag whereas in 7.4 it did not and this has unfortunately caused problems for
the {{video}}
macro.
1. After some helpful investigation by a few XWiki developers, we have found
that in fact
the {{html}} macro is cleaning for XHTML and not for HTML5 which is what XWiki
uses and the
change has seemingly gone unnoticed since the upgrade to 8.0M1.
2. After some conversation with developers, I have observed that it is rare for
an application
developer to *intend* to have their HTML cleaned. In the XWiki repositories we
find that
amongst non-one-liner {{html}} macro invocations, 109 out of 292 (37%) of the
invocations
explicitly request clean=false [1].
3. Nowhere is clean="true" specified and though one might think it obvious as
it is a default,
we find that wiki="false" (also default) is indeed specified 28 times [2].
4. We see also that the HTML macro proves to be quite slow. During an
investigation of SOLR
performance Thomas found that "about 23% of the request is spend executing html
macros" [3].
I suppose it should be obvious that without the cleaner, the {{html}} macro
should not cause
any significant performance degradation.
Given the status of this feature, I would like to propose that we make an
intentional change
of behavior and change the default to clean=false. This way we application
developers will not
need to type it all of the time and XWiki will become measurably faster.
Here is my +1 for changing the default.
Thanks,
Caleb
[1]:
$ grep -nr '{{html' | grep '.xml:' | grep 'clean=['\''"]*false' | grep -v
'{{/html}}' | wc -l
109
$ grep -nr '{{html' | grep '.xml:' | grep -v 'clean=['\''"]*false' | grep -v
'{{/html}}' | wc -l
183
[2]:
$ grep -nr '{{html' | grep '.xml:' | grep 'wiki=['\''"]*false' | wc -l
28
[3]: https://jira.xwiki.org/browse/XWIKI-12043
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs