[pmwiki-users] Pu

Dominique Faure dominique.faure at gmail.com
Mon Jul 28 18:49:27 CDT 2008


On Tue, Jul 29, 2008 at 00:49, DaveG <pmwiki at solidgone.com> wrote:
>
> I'm trying to define a markup, part of which will be used to determine
> the path for an image styled background. However, this markup:
> Markup('^Country:', 'fulltext',
>        '/^Country\s+([a-zA-Z][a-zA-Z]):(.*?)&gt;&gt;&lt;&lt;/ism',
>        '<div class="country" style="background-image: url(\''.
> $GLOBALS['PubDirUrl']. '/dropdown/flags/$1.png\');">$2</div>'
> );
>
>
> results in this HTML:
> <div class='vspace'></div><div class="country" style="background-image:
> url('<img src='http://mr2wiki.com/pmwiki/pub/dropdown/flags/JP.png'
> alt='' title='' />');"> some text</div>
>
> Notice the <img src=" in the middle of the background-image url.
>
> I suspect PmWiki is seeing the http://....png and considers that to be
> an image.  Is there a way to prevent this?
>
>  ~ ~ Dave
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>

You should perhaps use Keep(...) to prevent any further Markup processing:

Markup('^Country:', 'fulltext',
       '/^Country\\s+([a-zA-Z][a-zA-Z]):(.*?)&lt;&lt;&gt;&gt;/isme',
       "'<:block>'.Keep('<div class=\'country\'
style=\'background-image:
url(\"'.\$GLOBALS['PubDirUrl'].'/dropdown/flags/$1.png\")\'>').'$2'.Keep('</div>')");

-- 
Dominique



More information about the pmwiki-users mailing list