[pmwiki-users] Skins: How to disable file: , function: , and page: markups?
Petko Yotov
5ko at free.fr
Fri Jun 22 21:31:08 CDT 2007
On Saturday 23 June 2007, Patrick R. Michaud wrote:
> On Sat, Jun 23, 2007 at 04:13:26AM +0200, Petko Yotov wrote:
> > So, is it possible to disable the following skin markups from being
> > processed: <!--function: fname par par...-->
> > <!--file:/etc/passwd-->
> > <!--page:ReadProtectedPage SiteAdmin.AuthUser-->
...
> Actually, I think we could make this fairly simple, by providing a
> $SkinDirectivesPattern that identifies the patterns allowed in a
> skin template. Currently the code to do this is skin.php, line 106:
>
> $TmplFmt['Start'] = array_merge(array('headers:'),
> preg_split('/[[<]!--((?:wiki|file|function|markup):.*?)--[]>]/s',
> array_shift($sect),0,PREG_SPLIT_DELIM_CAPTURE));
>
> (As you can see, <!--page:...--> already appears to not be supported. :-)
>
> So, if we change this line to be a configuration variable, it may
> be fairly simple. :-)
>
> Comments?
Yes: if this pattern (or even just the keywords) could become a variable, it
should work. BTW it is repeated once again in the function.
Thanks, :-)
Petko
More information about the pmwiki-users
mailing list