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

Musikschule Bernsbach / Schwarzenberg (Webmaster) webmaster at musikschule-bernsbach.de
Sat Jan 21 05:12:07 CST 2006


Thank you all for your help. :-)
I think Patrick's solution is the best one for me.


Greetings, Torsten


-----Ursprüngliche Nachricht-----
Von: pmwiki-users-bounces at pmichaud.com
[mailto:pmwiki-users-bounces at pmichaud.com] Im Auftrag von H. Fox
Gesendet: Freitag, 20. Januar 2006 23:30
An: Patrick R. Michaud
Cc: pmwiki-users at pmichaud.com
Betreff: Re: [pmwiki-users] How to prevent text from being parsed?

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

_______________________________________________
pmwiki-users mailing list
pmwiki-users at pmichaud.com
http://host.pmichaud.com/mailman/listinfo/pmwiki-users





More information about the pmwiki-users mailing list