Skip to content

Commit

Permalink
XWIKI-7878: Disabling html macro with clean="false" in restricted mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasJonsson committed Jun 9, 2012
1 parent d5cc364 commit 907dc06
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -149,6 +149,8 @@ public List<Block> execute(HTMLMacroParameters parameters, String content, Macro
// Clean the HTML into valid XHTML if the user has asked (it's the default).
if (parameters.getClean()) {
normalizedContent = cleanHTML(normalizedContent, context);
} else if (context.getTransformationContext().isRestricted()) {
throw new MacroExecutionException("The HTML macro may not be used with clean=\"false\" in this context.");
}

blocks = Arrays.asList((Block) new RawBlock(normalizedContent, XHTML_SYNTAX));
Expand Down

0 comments on commit 907dc06

Please sign in to comment.