Vincent Massol wrote:
Hi,
Need 1: Be able to prevent some macros from execution in some contexts. For example in the comments field prevent usage of script and html macros Proposed solution: Use a Rendering Transformation with a high priority that removes (or that generate an error) those macros (the list of macros can be retrieved from a config file or from some execution context)
How do you mark when should macros be disabled? An idea would be to push some settings in comentsinline.vm before rendering the comments.
Need 2: Ensure that renderers generate valid content (eg valid XHTML for the WYSIWYG editor). For example if the user uses the HTML macro and puts invalid HTML the WYSIWYG editor should still work Proposed solution: Use a Rendering Transformation with a low priority that traverses the XDOM to validate it (for example remove inline elements that are placed in a standalone context).
When do you want to enable this feature? Just for the WYSIWYG, or in general? If we enable it globally, we can solve an often reported problem: broken layout, caused by invalid content (most often the panels are pushed to the bottom of the page, or become invisible altogether).
WDYT?
Looks good. -- Sergiu Dumitriu http://purl.org/net/sergiu/