[pmwiki-users] Simple markup question...

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 20 10:47:38 CDT 2006


[Going back to the original message to answer the original question,
now that I understand what's being asked.  --Pm]

On Tue, Sep 19, 2006 at 05:03:28PM -0400, The Editor wrote:
> On the page I write (:textarea FieldName:){$FieldName}(:textareaend:)
> 
> It works fine.  I can insert various text into the textarea box and it
> is retrieved perfectly (using FAST Data of course). But unfortunately
> when if I include markup code like colors, or something, into the
> textarea box, the page variable saves properly and displays perfectly
> in the page, but in the textbox it comes all messed up with html code.
> Which keeps it from resaving.  

In other words, you want to replace {$FieldName} by its contents
but not process any other markup that comes in as a result.

PmWiki doesn't have anything like that built-in, you'll have to
have some custom code to do it.  Which means that you either need
a custom markup that means "replace page variables but Keep() the
results", or a custom page variables that return text as escaped
values using Keep().

> I tried:
>     Markup('keep', 'inline', '/\\(:keep (.*?):\\)/e', "Keep(PSS(\"$1\"))");
> and changed my page code to
>     (:textarea FieldName:)(:keep {$FieldName}:)(:textareaend:)
> But it still retrieved all the html markup.  

Doing it at the 'inline' stage of processing is far too late in
the sequence to protect the contents -- it has to happen very
early.  

Pm





More information about the pmwiki-users mailing list