Hey,
I have some tag extension in which one of the parameters is a SPARQL query. My code is constructing this query correctly (confirmed by var_dump'ing the relevant vars), but when I put the tag in a wiki page, several spaces are getting replaced by   which breaks the query. Is there a way to make the parser not do this? (The HTML returned by my tag extension function should be embedded as-is.)
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Jeroen De Dauw wrote:
Hey,
I have some tag extension in which one of the parameters is a SPARQL query. My code is constructing this query correctly (confirmed by var_dump'ing the relevant vars), but when I put the tag in a wiki page, several spaces are getting replaced by   which breaks the query. Is there a way to make the parser not do this? (The HTML returned by my tag extension function should be embedded as-is.)
Cheers
Saving into a token and restoring at the end? I'm quite sure there are examples/docs on how to do it...
Hey,
Saving into a token and restoring at the end?
Thanks, that pointed me in the right direction. The docs are not very clear though. I ended up with this:
return array( $parser->insertStripItem( $html, $parser->mStripState ), 'noparse' => true, 'isHTML' => true );
The tag extension docs mention nothing about the array and extra args stuff, nor the insertStripItem method. They are both on the parser functions docs page, although there it's not mentioned you need both these to get a working result (which I guess is a difference between parser functions and tag extensions). I'll try clearing up the docs a bit soonish, but if someone that's more familiar with this code could do this, it'd be a great help for new devs :)
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Hello,
I have a lot of deleted pages in my wiki and was wondering how to free up the database by getting rid of them completely. I don't want to loose the history of the pages that aren't deleted though, is there an extension for this?
Thanks, Aran
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Aran Dunkley wrote:
Hello,
I have a lot of deleted pages in my wiki and was wondering how to free up the database by getting rid of them completely. I don't want to loose the history of the pages that aren't deleted though, is there an extension for this?
Thanks, Aran
There's a script for that. Run maintenance/deleteArchivedRevisions.php (use --delete parameter to really perform the action, without it to inform)
wikitech-l@lists.wikimedia.org