Is there a way to selectively prevent embedded markup expressions from being evaluated?

The issue arises when making a call to includesection (Cookbook/IncludeSection). We need to ensure that parameters which might contain quotes are encoded to prevent the quotes being considered an end of the parameter -- the markup expression bi_encode does this.

(:includesection "#common-blog-head title='{(bi_encode {*$Title})}' entrydate='{*$:entrydate}' entrytags='{(bi_encode {*$:entrytags})}' entryauthor='{(bi_encode {*$:entryauthor})}' listformat=false ":)

However, in the example above, if the Title or Tags contain a string in parenthesis "this is a title (or is it)", then the string "or is it" is evaluated as a markup expression embedded with in the bi_encode expression.


So:
1] Is there a way to disable embedded markup expression handling in selected cases?

2] It seems to me that I may simply be approaching this the wrong way. I'm quoting the includesection parameters, which is causing the problem. Is there an alternate way to use includesection?


For reference here's bi_encode:
$MarkupExpr['bi_encode'] = 'htmlentities(bi_IsNull(implode(\' \', $args)), ENT_QUOTES)';

and bi_IsNull (used for older versions of PmWiki):
function bi_IsNull($e){ return (!empty($e) && substr($e,0,3)!='{*$' && substr($e,0,2)!='{$' && substr($e,0,3)!='{=$' ?$e :''); }


 ~ ~ Dave

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to