Unrendered $input in extension

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unrendered $input in extension

Sigbert Klinke
Hi, I'am writing some extensions an use usually a scheme like that:

<url src="http://www.destatis.de/basis/d/biwiku/hochtab1.php">/<!--
Content Begin -->(.*?)<!-- Content End -->/s</url>

I rely heavily on the fact that in my render function "renderUrl
($input, $params)"  $input contains the unrendered  code between
<url>...</url>.  But if  I look to the content (after updating from
1.5.5 to 1.6.5)  $input contains:

/UNIQ197a31dbac4f402-HTMLCommentStrip27fc8dec69226a9200000001(.*?)UNIQ197a31dbac4f402-HTMLCommentStrip27fc8dec69226a9200000002/s

instead of

/<!-- Content Begin -->(.*?)<!-- Content End -->/s

Obviously some rendering has been done. I remember I have seen somewhere
(but where ?, can't find it anymore) how to access the unrendered text.
Can someone help me ?

Thanks in advance

 Sigbert
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Unrendered $input in extension

Rob Church
On 17/05/06, Sigbert Klinke <[hidden email]> wrote:

> Hi, I'am writing some extensions an use usually a scheme like that:
>
> <url src="http://www.destatis.de/basis/d/biwiku/hochtab1.php">/<!--
> Content Begin -->(.*?)<!-- Content End -->/s</url>
>
> I rely heavily on the fact that in my render function "renderUrl
> ($input, $params)"  $input contains the unrendered  code between
> <url>...</url>.  But if  I look to the content (after updating from
> 1.5.5 to 1.6.5)  $input contains:
>
> /UNIQ197a31dbac4f402-HTMLCommentStrip27fc8dec69226a9200000001(.*?)UNIQ197a31dbac4f402-HTMLCommentStrip27fc8dec69226a9200000002/s
>
> instead of
>
> /<!-- Content Begin -->(.*?)<!-- Content End -->/s
>
> Obviously some rendering has been done. I remember I have seen somewhere
> (but where ?, can't find it anymore) how to access the unrendered text.
> Can someone help me ?

It's not rendering, it's "armouring" - that is, hiding something from
the parser, in this case, comments. Obviously the parser was changed
to strip out comments from 1.6.0 onwards - sensible move, I feel.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Unrendered $input in extension

Sigbert Klinke
Hi,
>It's not rendering, it's "armouring" - that is, hiding something from
>the parser, in this case, comments. Obviously the parser was changed
>to strip out comments from 1.6.0 onwards - sensible move, I feel.
>  
Not really, because

1.) usually I embed between two tags <tag>...</tag> source code for a
server software which delivers HTML code back. If by chance a
combination of operators becomes a HTML comment or, whatever else is
armoured, the program code won't execute anymore.
2.) The same behaviour appears if I use a construct like <url src="...."
expr="/<!-- Content Begin -->(.*?)<!-- Content End -->/s">, the contents
of params['expr'] is also /UNIQ197a31dba... Why the attribute of tag is
"armoured" as well ?

Thanks for the answer nevertheless   Sigbert


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Unrendered $input in extension

Rob Church
On 18/05/06, Sigbert Klinke <[hidden email]> wrote:
> 1.) usually I embed between two tags <tag>...</tag> source code for a
> server software which delivers HTML code back. If by chance a
> combination of operators becomes a HTML comment or, whatever else is
> armoured, the program code won't execute anymore.

The intent of a comment is usually to hide text and/or prevent markup
from having an effect.

> 2.) The same behaviour appears if I use a construct like <url src="...."
> expr="/<!-- Content Begin -->(.*?)<!-- Content End -->/s">, the contents
> of params['expr'] is also /UNIQ197a31dba... Why the attribute of tag is
> "armoured" as well ?

I don't *think* the parser makes that distinction at the time it does the stuff.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l