Not sure, but could it be that tidy at latest would escape that ampersand? This has nothing to do with Wikitext, but just plain HTML -- a sole ampersand is not valid in HTML.
2012/6/29 Daniel Barrett <[email protected]>: > In a parser tag callback, if I change this: > > function myCallback($input, $argv, $parser) { > return '&'; > } > > to this: > > function myCallback($input, $argv, $parser) { > return array('&', 'markerType' => 'nowiki'); > } > > shouldn't the second one cause a plain ampersand to be rendered, rather than > & ? > Reference: > http://www.mediawiki.org/wiki/Manual:Tag_extensions#How_can_I_avoid_modification_of_my_extension.27s_HTML_output.3F. > > This is MediaWiki 1.18.1. > > Thanks, > DanB > > _____________________________________________ > From: Daniel Barrett > Sent: Friday, June 29, 2012 3:42 PM > To: 'Wikimedia developers' > Subject: RE: StripState and ampersands? > > >> 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 > > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- Project director Wikidata Wikimedia Deutschland e.V. | Obentrautstr. 72 | 10963 Berlin Tel. +49-30-219 158 26-0 | http://wikimedia.de Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
