[pmwiki-users] How to prevent text from being parsed?

H. Fox haganfox at users.sourceforge.net
Fri Jan 20 16:29:57 CST 2006


On 1/20/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> At the moment the best way is to force a block designation on it:
>
>     Markup(
>       'html',
>       'fulltext',
>       '/^\\(:html:\\)(.*?)\\(:htmlend:\\)/esi',
>       "'<:block>'.Keep(str_replace(array('&gt;', '&lt;', '&amp;'),
>                                    array('>', '<', '&'), PSS('$1')))");

Using that, the source including (:html:) appears in the rendered
page.  I traced it down to the ^ in

      '/^\\(:html:\\)(.*?)\\(:htmlend:\\)/esi',

If I take out the ^ it seems to work.

Documented here:

   http://www.pmwiki.org/wiki/Cookbook/EnableHTML#altmethod

Thanks.

> However, it occurs frequently enough (for me as well) that I'm
> thinking I'll add a 'B' (block) pool to the Keep() function that
> indicates the kept content is block markup and therefore should not
> be wrapped in a paragraph.  If I do this, the code would then be
>
>     Markup(
>       'html',
>       'fulltext',
>       '/^\\(:html:\\)(.*?)\\(:htmlend:\\)/esi',
>       "Keep(str_replace(array('&gt;', '&lt;', '&amp;'),
>                               array('>', '<', '&'), PSS('$1')),'B')");
>
> Or perhaps just a KeepBlock() function that does the equivalent.

Either one of those would be helpful.

Hagan




More information about the pmwiki-users mailing list