Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
2.2 RC1
-
None
-
Unknown
-
Description
XWikiDocument.display:
if (isInRenderingEngine && !is10Syntax(syntaxId) && (result.indexOf("<") != -1 || result.indexOf(">") != -1)) { result.insert(0, "{{html clean=\"false\" wiki=\"false\"}}"); result.append("{{/html}}"); }
Add check for '&', e.g. to handle
I would need such a function in another place too, so maybe it could be defined as utility function, such as HtmlUtil.isHtml(StringBuffer) + HtmlUtil.isHtml(String)
Or perhaps HtmlUtil.isNotHtml would be more appriopriate... because if string doesn't contain any of <>& then it is not html, but if it does it not necessarily is (e.g. "M&M")