[xwiki-users] escaping almost everything
With the exception of backslashing individual characters, is there any way I could prevent wiki syntax rendering, and Groovy/Velocity rendering? To put it another way, is there any way I can prevent rendering of everything BUT HTML? As a musing, (speaking with essentially no Groovy/Velocity experience,) it would be nice to see a macro that selectively escapes each of the rendering methods. For example: {dontrender[:wiki][:html][:groovy][:velocity]} markup {/dontrender} Thanks, Paul D. Grodt TECORE Wireless Systems
Hi Paul, On Nov 16, 2007, at 5:20 PM, Paul Grodt wrote:
With the exception of backslashing individual characters, is there any way I could prevent wiki syntax rendering, and Groovy/Velocity rendering? To put it another way, is there any way I can prevent rendering of everything BUT HTML?
Have you seen http://www.xwiki.org/xwiki/bin/view/UserGuide/XWikiSyntax#HEscapingText ?
As a musing, (speaking with essentially no Groovy/Velocity experience,) it would be nice to see a macro that selectively escapes each of the rendering methods. For example:
{dontrender[:wiki][:html][:groovy][:velocity]} markup {/dontrender}
This is planned for the future xwiki v2 architecture (no date yet). Thanks -Vincent
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Vincent Massol Sent: Friday, November 16, 2007 11:33 AM To: XWiki Users Subject: Re: [xwiki-users] escaping almost everything
Hi Paul,
On Nov 16, 2007, at 5:20 PM, Paul Grodt wrote:
With the exception of backslashing individual characters, is there any way I could prevent wiki syntax rendering, and Groovy/Velocity rendering? To put it another way, is there any way I can prevent rendering of everything BUT HTML?
Have you seen
http://www.xwiki.org/xwiki/bin/view/UserGuide/XWikiSyntax#HEscapingText
?
Yes I have, thank you. However, as I interpret the documentation, {pre}{/pre} still processes Groovy/Velocity code, {code}{code} doesn't evaluate HTML and forces text into the sourcecode textbox, and escaping single characters is annoying for anything beyond a line or two. (As background, I tried to edit the "Panels.SyntaxHelp" page to document some macros, and because I didn't escape it properly, it killed my system such that I could no longer edit any pages without important a backup of the SyntaxHelp page. But I consider that my fault, live and learn.)
As a musing, (speaking with essentially no Groovy/Velocity experience,) it would be nice to see a macro that selectively escapes each of the rendering methods. For example:
{dontrender[:wiki][:html][:groovy][:velocity]} markup {/dontrender}
This is planned for the future xwiki v2 architecture (no date yet).
Thanks -Vincent
Excellent! Glad to hear it. Thanks Paul D. Grodt TECORE Wireless Systems
On Nov 16, 2007, at 6:11 PM, Paul Grodt wrote:
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Vincent Massol Sent: Friday, November 16, 2007 11:33 AM To: XWiki Users Subject: Re: [xwiki-users] escaping almost everything
Hi Paul,
On Nov 16, 2007, at 5:20 PM, Paul Grodt wrote:
With the exception of backslashing individual characters, is there any way I could prevent wiki syntax rendering, and Groovy/Velocity rendering? To put it another way, is there any way I can prevent rendering of everything BUT HTML?
Have you seen
http://www.xwiki.org/xwiki/bin/view/UserGuide/ XWikiSyntax#HEscapingText
?
Yes I have, thank you. However, as I interpret the documentation, {pre}{/pre} still processes Groovy/Velocity code, {code}{code} doesn't evaluate HTML and forces text into the sourcecode textbox, and escaping single characters is annoying for anything beyond a line or two.
I don't think we have that combination unfortunately. There might be some tricks to do that but I can't think of one right now. Right now the only syntax to not execute velocity scripts is the code macro and it was a very hard thing to implement (with some hacks). But the code macro doesn't let the HTML code through. So I think the solution (before the v2 architecture) would be to: 1) Add an escape macro. 2) Add some parameters: {escape:escapeVelocity=true/false | escapeGroovy=true/false | escapeHTML=true/false | escapeRadeox=true/false} 3) Make the code macro synonymous to {escape:escapeVelocity=true | escapeGroovy=true | escapeHTML=true| escapeRadeox=true} It's not obvious to implement but doable. However who has the knowledge and time to implement it? :) Thanks -Vincent
(As background, I tried to edit the "Panels.SyntaxHelp" page to document some macros, and because I didn't escape it properly, it killed my system such that I could no longer edit any pages without important a backup of the SyntaxHelp page. But I consider that my fault, live and learn.)
As a musing, (speaking with essentially no Groovy/Velocity experience,) it would be nice to see a macro that selectively escapes each of the rendering methods. For example:
{dontrender[:wiki][:html][:groovy][:velocity]} markup {/dontrender}
This is planned for the future xwiki v2 architecture (no date yet).
Thanks -Vincent
Excellent! Glad to hear it.
Thanks Paul D. Grodt
TECORE Wireless Systems
participants (2)
-
Paul Grodt -
Vincent Massol