On Jan 10, 2008, at 12:07 PM, Sergiu Dumitriu wrote:
j05ef wrote:
Sergiu Dumitriu-2 wrote:
But you cannot prevent smart users from using images from other sources than attachments, as they can enter HTML tags. Yes I can and I want to. To achieve this, my skin only renders $doc.EscapedContent.
Ah, nice trick.
About the ImageMacro, I guess we could use a platform feature that restricts using images only from some spaces.
I don't understand the need for this in the platform since it looks to me a bit too specific a need (unless I don't understand something). I'd rather we have something more generic that encompasses this use case. I may be mistaken though. -Vincent
I imagine this in the following way:
- there's a setting in xwiki.cfg, like xwiki.render.image.allowedSpaces=Main,Uploads - The Images macro reads this property and checks if the document is in the right space - There could be another configuration that lists not the allowed spaces, but the disabled ones, which would be better in some cases, like xwiki.render.image.disabledSpaces=XWiki,Private
I think you have the proper skills to implement this, and it would be nice to share it with the community, so could you make a Jira issue for this (jira.xwiki.org) and give a patch?
Thanks, Sergiu