On 29/06/12 21:42, Daniel Barrett wrote:
>>> How can I prevent this conversion so ampersands (and presumably other 
>>> special characters) are preserved?
>> 
>> Followup up my own question: StripState is not relevant here. It's the fact 
>> that it's a parser tag extension. Simply returning "&" in the callback will 
>> produce "&". Is there a way to suppress this conversion when returning 
>> "&" from a parser tag extension?
>> 
>> DanB

Platonides wrote:
>Why do you want a plain & ?
>Seems like you want invalid html...

Because the output may contain JavaScript and it's converting "if (a&&b)" to 
"if (a&&b)".

The extension is a tag "<javascript>" that adds arbitrary javascript, supplied 
by the user, to the wiki page. Security is not an issue because this is a 
completely internal wiki.

Is there a better way to implement a <javascript> parser tag extension so the 
HTML-conversion issue doesn't happen?

DanB

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to