[pmwiki-users] markup expression output handling

Patrick R. Michaud pmichaud at pobox.com
Wed Jan 23 10:39:32 CST 2008

On Wed, Jan 23, 2008 at 04:19:17PM +0000, Hans wrote:
> What is the difference between output handling of a markup expression,
> for
> case A: The expression is written in the page content,
> case B: The expression gets evaluated as part of a post submission?
> Simplified example:
> $MarkupExpr['tagtest'] = 'TagTest()';
> function TagTest() {
>         return "<b>Hello</b>";;
> }
> case A:
> {(tagtest)} appears as a bold 'Hello'
> case B:
> {$$(tagtest)} posted from a template is written as <b>Hello</b>
> I use a fox form
> (:fox form2 target={*$FullName}:)
> (:foxtemplate "{$$(tagtest)}":)
> (:input submit post Enter:)
> (:foxend form2:)
> and when Fox replaces template variables the markup expression gets
> evaluated by calling the MarkupExpression function.
> Why is the <b> tag interpreted as bold in case A?

In case A, the <b> tag is being generated as part of the
page output at the time it is being rendered.  Thus a browser
sees it as a bold tag.

In case B, the <b> tag is being saved as part of the page's markup,
exactly as if someone had written <b>Hello</b> in the markup text.
Then the angle brackets are converted to &lt; and &gt; when the
page is rendered.


More information about the pmwiki-users mailing list