summaryrefslogtreecommitdiff
path: root/www/wiki/tests/parser
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/tests/parser')
-rw-r--r--www/wiki/tests/parser/DbTestPreviewer.php205
-rw-r--r--www/wiki/tests/parser/DbTestRecorder.php87
-rw-r--r--www/wiki/tests/parser/DjVuSupport.php57
-rw-r--r--www/wiki/tests/parser/MultiTestRecorder.php55
-rw-r--r--www/wiki/tests/parser/ParserTestMockParser.php20
-rw-r--r--www/wiki/tests/parser/ParserTestParserHook.php66
-rw-r--r--www/wiki/tests/parser/ParserTestPrinter.php328
-rw-r--r--www/wiki/tests/parser/ParserTestResult.php44
-rw-r--r--www/wiki/tests/parser/ParserTestResultNormalizer.php87
-rw-r--r--www/wiki/tests/parser/ParserTestRunner.php1737
-rw-r--r--www/wiki/tests/parser/PhpunitTestRecorder.php18
-rw-r--r--www/wiki/tests/parser/README12
-rw-r--r--www/wiki/tests/parser/TestFileEditor.php196
-rw-r--r--www/wiki/tests/parser/TestFileReader.php335
-rw-r--r--www/wiki/tests/parser/TestRecorder.php93
-rw-r--r--www/wiki/tests/parser/TidySupport.php77
-rw-r--r--www/wiki/tests/parser/editTests.php488
-rw-r--r--www/wiki/tests/parser/extraParserTests.txtbin0 -> 1994 bytes
-rw-r--r--www/wiki/tests/parser/fuzzTest.php202
-rw-r--r--www/wiki/tests/parser/parserTests.php199
-rw-r--r--www/wiki/tests/parser/parserTests.txt30829
-rw-r--r--www/wiki/tests/parser/preprocess/All_system_messages.expected5604
-rw-r--r--www/wiki/tests/parser/preprocess/All_system_messages.txt5603
-rw-r--r--www/wiki/tests/parser/preprocess/Factorial.expected17
-rw-r--r--www/wiki/tests/parser/preprocess/Factorial.txt16
-rw-r--r--www/wiki/tests/parser/preprocess/Fundraising.expected18
-rw-r--r--www/wiki/tests/parser/preprocess/Fundraising.txt17
-rw-r--r--www/wiki/tests/parser/preprocess/NestedTemplates.expected90
-rw-r--r--www/wiki/tests/parser/preprocess/NestedTemplates.txt89
-rw-r--r--www/wiki/tests/parser/preprocess/QuoteQuran.expected140
-rw-r--r--www/wiki/tests/parser/preprocess/QuoteQuran.txt139
31 files changed, 46868 insertions, 0 deletions
diff --git a/www/wiki/tests/parser/DbTestPreviewer.php b/www/wiki/tests/parser/DbTestPreviewer.php
new file mode 100644
index 00000000..33aee7d3
--- /dev/null
+++ b/www/wiki/tests/parser/DbTestPreviewer.php
@@ -0,0 +1,205 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+class DbTestPreviewer extends TestRecorder {
+ protected $filter; // /< Test name filter callback
+ protected $lb; // /< Database load balancer
+ protected $db; // /< Database connection to the main DB
+ protected $curRun; // /< run ID number for the current run
+ protected $prevRun; // /< run ID number for the previous run, if any
+ protected $results; // /< Result array
+
+ /**
+ * This should be called before the table prefix is changed
+ * @param IDatabase $db
+ * @param bool|string $filter
+ */
+ function __construct( $db, $filter = false ) {
+ $this->db = $db;
+ $this->filter = $filter;
+ }
+
+ /**
+ * Set up result recording; insert a record for the run with the date
+ * and all that fun stuff
+ */
+ function start() {
+ if ( !$this->db->tableExists( 'testrun', __METHOD__ )
+ || !$this->db->tableExists( 'testitem', __METHOD__ )
+ ) {
+ print "WARNING> `testrun` table not found in database.\n";
+ $this->prevRun = false;
+ } else {
+ // We'll make comparisons against the previous run later...
+ $this->prevRun = $this->db->selectField( 'testrun', 'MAX(tr_id)' );
+ }
+
+ $this->results = [];
+ }
+
+ function record( $test, ParserTestResult $result ) {
+ $this->results[$test['desc']] = $result->isSuccess() ? 1 : 0;
+ }
+
+ function report() {
+ if ( $this->prevRun ) {
+ // f = fail, p = pass, n = nonexistent
+ // codes show before then after
+ $table = [
+ 'fp' => 'previously failing test(s) now PASSING! :)',
+ 'pn' => 'previously PASSING test(s) removed o_O',
+ 'np' => 'new PASSING test(s) :)',
+
+ 'pf' => 'previously passing test(s) now FAILING! :(',
+ 'fn' => 'previously FAILING test(s) removed O_o',
+ 'nf' => 'new FAILING test(s) :(',
+ 'ff' => 'still FAILING test(s) :(',
+ ];
+
+ $prevResults = [];
+
+ $res = $this->db->select( 'testitem', [ 'ti_name', 'ti_success' ],
+ [ 'ti_run' => $this->prevRun ], __METHOD__ );
+ $filter = $this->filter;
+
+ foreach ( $res as $row ) {
+ if ( !$filter || $filter( $row->ti_name ) ) {
+ $prevResults[$row->ti_name] = $row->ti_success;
+ }
+ }
+
+ $combined = array_keys( $this->results + $prevResults );
+
+ # Determine breakdown by change type
+ $breakdown = [];
+ foreach ( $combined as $test ) {
+ if ( !isset( $prevResults[$test] ) ) {
+ $before = 'n';
+ } elseif ( $prevResults[$test] == 1 ) {
+ $before = 'p';
+ } else /* if ( $prevResults[$test] == 0 ) */ {
+ $before = 'f';
+ }
+
+ if ( !isset( $this->results[$test] ) ) {
+ $after = 'n';
+ } elseif ( $this->results[$test] == 1 ) {
+ $after = 'p';
+ } else /* if ( $this->results[$test] == 0 ) */ {
+ $after = 'f';
+ }
+
+ $code = $before . $after;
+
+ if ( isset( $table[$code] ) ) {
+ $breakdown[$code][$test] = $this->getTestStatusInfo( $test, $after );
+ }
+ }
+
+ # Write out results
+ foreach ( $table as $code => $label ) {
+ if ( !empty( $breakdown[$code] ) ) {
+ $count = count( $breakdown[$code] );
+ printf( "\n%4d %s\n", $count, $label );
+
+ foreach ( $breakdown[$code] as $differing_test_name => $statusInfo ) {
+ print " * $differing_test_name [$statusInfo]\n";
+ }
+ }
+ }
+ } else {
+ print "No previous test runs to compare against.\n";
+ }
+
+ print "\n";
+ }
+
+ /**
+ * Returns a string giving information about when a test last had a status change.
+ * Could help to track down when regressions were introduced, as distinct from tests
+ * which have never passed (which are more change requests than regressions).
+ * @param string $testname
+ * @param string $after
+ * @return string
+ */
+ private function getTestStatusInfo( $testname, $after ) {
+ // If we're looking at a test that has just been removed, then say when it first appeared.
+ if ( $after == 'n' ) {
+ $changedRun = $this->db->selectField( 'testitem',
+ 'MIN(ti_run)',
+ [ 'ti_name' => $testname ],
+ __METHOD__ );
+ $appear = $this->db->selectRow( 'testrun',
+ [ 'tr_date', 'tr_mw_version' ],
+ [ 'tr_id' => $changedRun ],
+ __METHOD__ );
+
+ return "First recorded appearance: "
+ . date( "d-M-Y H:i:s", strtotime( $appear->tr_date ) )
+ . ", " . $appear->tr_mw_version;
+ }
+
+ // Otherwise, this test has previous recorded results.
+ // See when this test last had a different result to what we're seeing now.
+ $conds = [
+ 'ti_name' => $testname,
+ 'ti_success' => ( $after == 'f' ? "1" : "0" ) ];
+
+ if ( $this->curRun ) {
+ $conds[] = "ti_run != " . $this->db->addQuotes( $this->curRun );
+ }
+
+ $changedRun = $this->db->selectField( 'testitem', 'MAX(ti_run)', $conds, __METHOD__ );
+
+ // If no record of ever having had a different result.
+ if ( is_null( $changedRun ) ) {
+ if ( $after == "f" ) {
+ return "Has never passed";
+ } else {
+ return "Has never failed";
+ }
+ }
+
+ // Otherwise, we're looking at a test whose status has changed.
+ // (i.e. it used to work, but now doesn't; or used to fail, but is now fixed.)
+ // In this situation, give as much info as we can as to when it changed status.
+ $pre = $this->db->selectRow( 'testrun',
+ [ 'tr_date', 'tr_mw_version' ],
+ [ 'tr_id' => $changedRun ],
+ __METHOD__ );
+ $post = $this->db->selectRow( 'testrun',
+ [ 'tr_date', 'tr_mw_version' ],
+ [ "tr_id > " . $this->db->addQuotes( $changedRun ) ],
+ __METHOD__,
+ [ "LIMIT" => 1, "ORDER BY" => 'tr_id' ]
+ );
+
+ if ( $post ) {
+ $postDate = date( "d-M-Y H:i:s", strtotime( $post->tr_date ) ) . ", {$post->tr_mw_version}";
+ } else {
+ $postDate = 'now';
+ }
+
+ return ( $after == "f" ? "Introduced" : "Fixed" ) . " between "
+ . date( "d-M-Y H:i:s", strtotime( $pre->tr_date ) ) . ", " . $pre->tr_mw_version
+ . " and $postDate";
+ }
+}
diff --git a/www/wiki/tests/parser/DbTestRecorder.php b/www/wiki/tests/parser/DbTestRecorder.php
new file mode 100644
index 00000000..2089f64a
--- /dev/null
+++ b/www/wiki/tests/parser/DbTestRecorder.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+use Wikimedia\Rdbms\IMaintainableDatabase;
+
+class DbTestRecorder extends TestRecorder {
+ public $version;
+ /** @var Database */
+ private $db;
+
+ public function __construct( IMaintainableDatabase $db ) {
+ $this->db = $db;
+ }
+
+ /**
+ * Set up result recording; insert a record for the run with the date
+ * and all that fun stuff
+ */
+ function start() {
+ $this->db->begin( __METHOD__ );
+
+ if ( !$this->db->tableExists( 'testrun' )
+ || !$this->db->tableExists( 'testitem' )
+ ) {
+ print "WARNING> `testrun` table not found in database. Trying to create table.\n";
+ $updater = DatabaseUpdater::newForDB( $this->db );
+ $this->db->sourceFile( $updater->patchPath( $this->db, 'patch-testrun.sql' ) );
+ echo "OK, resuming.\n";
+ }
+
+ $this->db->insert( 'testrun',
+ [
+ 'tr_date' => $this->db->timestamp(),
+ 'tr_mw_version' => $this->version,
+ 'tr_php_version' => PHP_VERSION,
+ 'tr_db_version' => $this->db->getServerVersion(),
+ 'tr_uname' => php_uname()
+ ],
+ __METHOD__ );
+ if ( $this->db->getType() === 'postgres' ) {
+ $this->curRun = $this->db->currentSequenceValue( 'testrun_id_seq' );
+ } else {
+ $this->curRun = $this->db->insertId();
+ }
+ }
+
+ /**
+ * Record an individual test item's success or failure to the db
+ *
+ * @param array $test
+ * @param ParserTestResult $result
+ */
+ function record( $test, ParserTestResult $result ) {
+ $this->db->insert( 'testitem',
+ [
+ 'ti_run' => $this->curRun,
+ 'ti_name' => $test['desc'],
+ 'ti_success' => $result->isSuccess() ? 1 : 0,
+ ],
+ __METHOD__ );
+ }
+
+ /**
+ * Commit transaction and clean up for result recording
+ */
+ function end() {
+ $this->db->commit( __METHOD__ );
+ }
+}
diff --git a/www/wiki/tests/parser/DjVuSupport.php b/www/wiki/tests/parser/DjVuSupport.php
new file mode 100644
index 00000000..73d4a47f
--- /dev/null
+++ b/www/wiki/tests/parser/DjVuSupport.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+/**
+ * Initialize and detect the DjVu files support
+ */
+class DjVuSupport {
+
+ /**
+ * Initialises DjVu tools global with default values
+ */
+ public function __construct() {
+ global $wgDjvuRenderer, $wgDjvuDump, $wgDjvuToXML, $wgFileExtensions, $wgDjvuTxt;
+
+ $wgDjvuRenderer = $wgDjvuRenderer ? $wgDjvuRenderer : '/usr/bin/ddjvu';
+ $wgDjvuDump = $wgDjvuDump ? $wgDjvuDump : '/usr/bin/djvudump';
+ $wgDjvuToXML = $wgDjvuToXML ? $wgDjvuToXML : '/usr/bin/djvutoxml';
+ $wgDjvuTxt = $wgDjvuTxt ? $wgDjvuTxt : '/usr/bin/djvutxt';
+
+ if ( !in_array( 'djvu', $wgFileExtensions ) ) {
+ $wgFileExtensions[] = 'djvu';
+ }
+ }
+
+ /**
+ * Returns true if the DjVu tools are usable
+ *
+ * @return bool
+ */
+ public function isEnabled() {
+ global $wgDjvuRenderer, $wgDjvuDump, $wgDjvuToXML, $wgDjvuTxt;
+
+ return is_executable( $wgDjvuRenderer )
+ && is_executable( $wgDjvuDump )
+ && is_executable( $wgDjvuToXML )
+ && is_executable( $wgDjvuTxt );
+ }
+}
diff --git a/www/wiki/tests/parser/MultiTestRecorder.php b/www/wiki/tests/parser/MultiTestRecorder.php
new file mode 100644
index 00000000..5fbfecf8
--- /dev/null
+++ b/www/wiki/tests/parser/MultiTestRecorder.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * This is a TestRecorder representing a collection of other TestRecorders.
+ * It proxies calls to all constituent objects.
+ */
+class MultiTestRecorder extends TestRecorder {
+ private $recorders = [];
+
+ public function addRecorder( TestRecorder $recorder ) {
+ $this->recorders[] = $recorder;
+ }
+
+ private function proxy( $funcName, $args ) {
+ foreach ( $this->recorders as $recorder ) {
+ call_user_func_array( [ $recorder, $funcName ], $args );
+ }
+ }
+
+ public function start() {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function startTest( $test ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function startSuite( $path ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function endSuite( $path ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function record( $test, ParserTestResult $result ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function warning( $message ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function skipped( $test, $subtest ) {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function report() {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+
+ public function end() {
+ $this->proxy( __FUNCTION__, func_get_args() );
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestMockParser.php b/www/wiki/tests/parser/ParserTestMockParser.php
new file mode 100644
index 00000000..0757b34c
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestMockParser.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * A parser used during article insertion which does nothing, to avoid
+ * unnecessary log noise and other interference with debugging.
+ */
+class ParserTestMockParser {
+ public function preSaveTransform( $text, Title $title, User $user,
+ ParserOptions $options, $clearState = true
+ ) {
+ return $text;
+ }
+
+ public function parse(
+ $text, Title $title, ParserOptions $options,
+ $linestart = true, $clearState = true, $revid = null
+ ) {
+ return new ParserOutput;
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestParserHook.php b/www/wiki/tests/parser/ParserTestParserHook.php
new file mode 100644
index 00000000..5995012b
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestParserHook.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A basic extension that's used by the parser tests to test whether input and
+ * arguments are passed to extensions properly.
+ *
+ * Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
+ */
+
+class ParserTestParserHook {
+
+ static function setup( &$parser ) {
+ $parser->setHook( 'tag', [ __CLASS__, 'dumpHook' ] );
+ $parser->setHook( 'tåg', [ __CLASS__, 'dumpHook' ] );
+ $parser->setHook( 'statictag', [ __CLASS__, 'staticTagHook' ] );
+ return true;
+ }
+
+ static function dumpHook( $in, $argv ) {
+ return "<pre>\n" .
+ var_export( $in, true ) . "\n" .
+ var_export( $argv, true ) . "\n" .
+ "</pre>";
+ }
+
+ static function staticTagHook( $in, $argv, $parser ) {
+ if ( !count( $argv ) ) {
+ $parser->static_tag_buf = $in;
+ return '';
+ } elseif ( count( $argv ) === 1 && isset( $argv['action'] )
+ && $argv['action'] === 'flush' && $in === null
+ ) {
+ // Clear the buffer, we probably don't need to
+ if ( isset( $parser->static_tag_buf ) ) {
+ $tmp = $parser->static_tag_buf;
+ } else {
+ $tmp = '';
+ }
+ $parser->static_tag_buf = null;
+ return $tmp;
+ } else { // wtf?
+ return "\nCall this extension as <statictag>string</statictag> or as" .
+ " <statictag action=flush/>, not in any other way.\n" .
+ "text: " . var_export( $in, true ) . "\n" .
+ "argv: " . var_export( $argv, true ) . "\n";
+ }
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestPrinter.php b/www/wiki/tests/parser/ParserTestPrinter.php
new file mode 100644
index 00000000..94d226c1
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestPrinter.php
@@ -0,0 +1,328 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+/**
+ * This is a TestRecorder responsible for printing information about progress,
+ * success and failure to the console. It is specific to the parserTests.php
+ * frontend.
+ */
+class ParserTestPrinter extends TestRecorder {
+ private $total;
+ private $success;
+ private $skipped;
+ private $term;
+ private $showDiffs;
+ private $showProgress;
+ private $showFailure;
+ private $showOutput;
+ private $useDwdiff;
+ private $markWhitespace;
+ private $xmlError;
+
+ function __construct( $term, $options ) {
+ $this->term = $term;
+ $options += [
+ 'showDiffs' => true,
+ 'showProgress' => true,
+ 'showFailure' => true,
+ 'showOutput' => false,
+ 'useDwdiff' => false,
+ 'markWhitespace' => false,
+ ];
+ $this->showDiffs = $options['showDiffs'];
+ $this->showProgress = $options['showProgress'];
+ $this->showFailure = $options['showFailure'];
+ $this->showOutput = $options['showOutput'];
+ $this->useDwdiff = $options['useDwdiff'];
+ $this->markWhitespace = $options['markWhitespace'];
+ }
+
+ public function start() {
+ $this->total = 0;
+ $this->success = 0;
+ $this->skipped = 0;
+ }
+
+ public function startTest( $test ) {
+ if ( $this->showProgress ) {
+ $this->showTesting( $test['desc'] );
+ }
+ }
+
+ private function showTesting( $desc ) {
+ print "Running test $desc... ";
+ }
+
+ /**
+ * Show "Reading tests from ..."
+ *
+ * @param string $path
+ */
+ public function startSuite( $path ) {
+ print $this->term->color( 1 ) .
+ "Running parser tests from \"$path\"..." .
+ $this->term->reset() .
+ "\n";
+ }
+
+ public function endSuite( $path ) {
+ print "\n";
+ }
+
+ public function record( $test, ParserTestResult $result ) {
+ $this->total++;
+ $this->success += ( $result->isSuccess() ? 1 : 0 );
+
+ if ( $result->isSuccess() ) {
+ $this->showSuccess( $result );
+ } else {
+ $this->showFailure( $result );
+ }
+ }
+
+ /**
+ * Print a happy success message.
+ *
+ * @param ParserTestResult $testResult
+ * @return bool
+ */
+ private function showSuccess( ParserTestResult $testResult ) {
+ if ( $this->showProgress ) {
+ print $this->term->color( '1;32' ) . 'PASSED' . $this->term->reset() . "\n";
+ }
+ }
+
+ /**
+ * Print a failure message and provide some explanatory output
+ * about what went wrong if so configured.
+ *
+ * @param ParserTestResult $testResult
+ * @return bool
+ */
+ private function showFailure( ParserTestResult $testResult ) {
+ if ( $this->showFailure ) {
+ if ( !$this->showProgress ) {
+ # In quiet mode we didn't show the 'Testing' message before the
+ # test, in case it succeeded. Show it now:
+ $this->showTesting( $testResult->getDescription() );
+ }
+
+ print $this->term->color( '31' ) . 'FAILED!' . $this->term->reset() . "\n";
+
+ if ( $this->showOutput ) {
+ print "--- Expected ---\n{$testResult->expected}\n";
+ print "--- Actual ---\n{$testResult->actual}\n";
+ }
+
+ if ( $this->showDiffs ) {
+ print $this->quickDiff( $testResult->expected, $testResult->actual );
+ if ( !$this->wellFormed( $testResult->actual ) ) {
+ print "XML error: $this->xmlError\n";
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Run given strings through a diff and return the (colorized) output.
+ * Requires writable /tmp directory and a 'diff' command in the PATH.
+ *
+ * @param string $input
+ * @param string $output
+ * @param string $inFileTail Tailing for the input file name
+ * @param string $outFileTail Tailing for the output file name
+ * @return string
+ */
+ private function quickDiff( $input, $output,
+ $inFileTail = 'expected', $outFileTail = 'actual'
+ ) {
+ if ( $this->markWhitespace ) {
+ $pairs = [
+ "\n" => '¶',
+ ' ' => '·',
+ "\t" => '→'
+ ];
+ $input = strtr( $input, $pairs );
+ $output = strtr( $output, $pairs );
+ }
+
+ # Windows, or at least the fc utility, is retarded
+ $slash = wfIsWindows() ? '\\' : '/';
+ $prefix = wfTempDir() . "{$slash}mwParser-" . mt_rand();
+
+ $infile = "$prefix-$inFileTail";
+ $this->dumpToFile( $input, $infile );
+
+ $outfile = "$prefix-$outFileTail";
+ $this->dumpToFile( $output, $outfile );
+
+ $shellInfile = wfEscapeShellArg( $infile );
+ $shellOutfile = wfEscapeShellArg( $outfile );
+
+ global $wgDiff3;
+ // we assume that people with diff3 also have usual diff
+ if ( $this->useDwdiff ) {
+ $shellCommand = 'dwdiff -Pc';
+ } else {
+ $shellCommand = ( wfIsWindows() && !$wgDiff3 ) ? 'fc' : 'diff -au';
+ }
+
+ $diff = wfShellExec( "$shellCommand $shellInfile $shellOutfile" );
+
+ unlink( $infile );
+ unlink( $outfile );
+
+ if ( $this->useDwdiff ) {
+ return $diff;
+ } else {
+ return $this->colorDiff( $diff );
+ }
+ }
+
+ /**
+ * Write the given string to a file, adding a final newline.
+ *
+ * @param string $data
+ * @param string $filename
+ */
+ private function dumpToFile( $data, $filename ) {
+ $file = fopen( $filename, "wt" );
+ fwrite( $file, $data . "\n" );
+ fclose( $file );
+ }
+
+ /**
+ * Colorize unified diff output if set for ANSI color output.
+ * Subtractions are colored blue, additions red.
+ *
+ * @param string $text
+ * @return string
+ */
+ private function colorDiff( $text ) {
+ return preg_replace(
+ [ '/^(-.*)$/m', '/^(\+.*)$/m' ],
+ [ $this->term->color( 34 ) . '$1' . $this->term->reset(),
+ $this->term->color( 31 ) . '$1' . $this->term->reset() ],
+ $text );
+ }
+
+ private function wellFormed( $text ) {
+ $html =
+ Sanitizer::hackDocType() .
+ '<html>' .
+ $text .
+ '</html>';
+
+ $parser = xml_parser_create( "UTF-8" );
+
+ # case folding violates XML standard, turn it off
+ xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
+
+ if ( !xml_parse( $parser, $html, true ) ) {
+ $err = xml_error_string( xml_get_error_code( $parser ) );
+ $position = xml_get_current_byte_index( $parser );
+ $fragment = $this->extractFragment( $html, $position );
+ $this->xmlError = "$err at byte $position:\n$fragment";
+ xml_parser_free( $parser );
+
+ return false;
+ }
+
+ xml_parser_free( $parser );
+
+ return true;
+ }
+
+ private function extractFragment( $text, $position ) {
+ $start = max( 0, $position - 10 );
+ $before = $position - $start;
+ $fragment = '...' .
+ $this->term->color( 34 ) .
+ substr( $text, $start, $before ) .
+ $this->term->color( 0 ) .
+ $this->term->color( 31 ) .
+ $this->term->color( 1 ) .
+ substr( $text, $position, 1 ) .
+ $this->term->color( 0 ) .
+ $this->term->color( 34 ) .
+ substr( $text, $position + 1, 9 ) .
+ $this->term->color( 0 ) .
+ '...';
+ $display = str_replace( "\n", ' ', $fragment );
+ $caret = ' ' .
+ str_repeat( ' ', $before ) .
+ $this->term->color( 31 ) .
+ '^' .
+ $this->term->color( 0 );
+
+ return "$display\n$caret";
+ }
+
+ /**
+ * Show a warning to the user
+ * @param string $message
+ */
+ public function warning( $message ) {
+ echo "$message\n";
+ }
+
+ /**
+ * Mark a test skipped
+ * @param string $test
+ * @param string $subtest
+ */
+ public function skipped( $test, $subtest ) {
+ if ( $this->showProgress ) {
+ print $this->term->color( '1;33' ) . 'SKIPPED' . $this->term->reset() . "\n";
+ }
+ $this->skipped++;
+ }
+
+ public function report() {
+ if ( $this->total > 0 ) {
+ $this->reportPercentage( $this->success, $this->total );
+ } else {
+ print $this->term->color( 31 ) . "No tests found." . $this->term->reset() . "\n";
+ }
+ }
+
+ private function reportPercentage( $success, $total ) {
+ $ratio = wfPercent( 100 * $success / $total );
+ print $this->term->color( 1 ) . "Passed $success of $total tests ($ratio)";
+ if ( $this->skipped ) {
+ print ", skipped {$this->skipped}";
+ }
+ print "... ";
+
+ if ( $success == $total ) {
+ print $this->term->color( 32 ) . "ALL TESTS PASSED!";
+ } else {
+ $failed = $total - $success;
+ print $this->term->color( 31 ) . "$failed tests failed!";
+ }
+
+ print $this->term->reset() . "\n";
+
+ return ( $success == $total );
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestResult.php b/www/wiki/tests/parser/ParserTestResult.php
new file mode 100644
index 00000000..6396a018
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestResult.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @file
+ *
+ * @copyright Copyright © 2013, Antoine Musso
+ * @copyright Copyright © 2013, Wikimedia Foundation Inc.
+ */
+
+/**
+ * Represent the result of a parser test.
+ *
+ * @since 1.22
+ */
+class ParserTestResult {
+ /** The test info array */
+ public $test;
+ /** Text that was expected */
+ public $expected;
+ /** Actual text rendered */
+ public $actual;
+
+ /**
+ * @param array $test The test info array from TestIterator
+ * @param string $expected The normalized expected output
+ * @param string $actual The actual output
+ */
+ public function __construct( $test, $expected, $actual ) {
+ $this->test = $test;
+ $this->expected = $expected;
+ $this->actual = $actual;
+ }
+
+ /**
+ * Whether the test passed
+ * @return bool
+ */
+ public function isSuccess() {
+ return $this->expected === $this->actual;
+ }
+
+ public function getDescription() {
+ return $this->test['desc'];
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestResultNormalizer.php b/www/wiki/tests/parser/ParserTestResultNormalizer.php
new file mode 100644
index 00000000..fbeed97b
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestResultNormalizer.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * @file
+ * @ingroup Testing
+ */
+
+class ParserTestResultNormalizer {
+ protected $doc, $xpath, $invalid;
+
+ public static function normalize( $text, $funcs ) {
+ $norm = new self( $text );
+ if ( $norm->invalid ) {
+ return $text;
+ }
+ foreach ( $funcs as $func ) {
+ $norm->$func();
+ }
+ return $norm->serialize();
+ }
+
+ protected function __construct( $text ) {
+ $this->doc = new DOMDocument( '1.0', 'utf-8' );
+
+ // Note: parsing a supposedly XHTML document with an XML parser is not
+ // guaranteed to give accurate results. For example, it may introduce
+ // differences in the number of line breaks in <pre> tags.
+
+ Wikimedia\suppressWarnings();
+ if ( !$this->doc->loadXML( '<html><body>' . $text . '</body></html>' ) ) {
+ $this->invalid = true;
+ }
+ Wikimedia\restoreWarnings();
+ $this->xpath = new DOMXPath( $this->doc );
+ $this->body = $this->xpath->query( '//body' )->item( 0 );
+ }
+
+ protected function removeTbody() {
+ foreach ( $this->xpath->query( '//tbody' ) as $tbody ) {
+ while ( $tbody->firstChild ) {
+ $child = $tbody->firstChild;
+ $tbody->removeChild( $child );
+ $tbody->parentNode->insertBefore( $child, $tbody );
+ }
+ $tbody->parentNode->removeChild( $tbody );
+ }
+ }
+
+ /**
+ * The point of this function is to produce a normalized DOM in which
+ * Tidy's output matches the output of html5depurate. Tidy both trims
+ * and pretty-prints, so this requires fairly aggressive treatment.
+ *
+ * In particular, note that Tidy converts <pre>x</pre> to <pre>\nx\n</pre>,
+ * which theoretically affects display since the second line break is not
+ * ignored by compliant HTML parsers.
+ *
+ * This function also removes empty elements, as does Tidy.
+ */
+ protected function trimWhitespace() {
+ foreach ( $this->xpath->query( '//text()' ) as $child ) {
+ if ( strtolower( $child->parentNode->nodeName ) === 'pre' ) {
+ // Just trim one line break from the start and end
+ if ( substr_compare( $child->data, "\n", 0 ) === 0 ) {
+ $child->data = substr( $child->data, 1 );
+ }
+ if ( substr_compare( $child->data, "\n", -1 ) === 0 ) {
+ $child->data = substr( $child->data, 0, -1 );
+ }
+ } else {
+ // Trim all whitespace
+ $child->data = trim( $child->data );
+ }
+ if ( $child->data === '' ) {
+ $child->parentNode->removeChild( $child );
+ }
+ }
+ }
+
+ /**
+ * Serialize the XML DOM for comparison purposes. This does not generate HTML.
+ * @return string
+ */
+ protected function serialize() {
+ return strtr( $this->doc->saveXML( $this->body ),
+ [ '<body>' => '', '</body>' => '' ] );
+ }
+}
diff --git a/www/wiki/tests/parser/ParserTestRunner.php b/www/wiki/tests/parser/ParserTestRunner.php
new file mode 100644
index 00000000..844a43f3
--- /dev/null
+++ b/www/wiki/tests/parser/ParserTestRunner.php
@@ -0,0 +1,1737 @@
+<?php
+/**
+ * Generic backend for the MediaWiki parser test suite, used by both the
+ * standalone parserTests.php and the PHPUnit "parsertests" suite.
+ *
+ * Copyright © 2004, 2010 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @todo Make this more independent of the configuration (and if possible the database)
+ * @file
+ * @ingroup Testing
+ */
+use Wikimedia\Rdbms\IDatabase;
+use MediaWiki\MediaWikiServices;
+use Wikimedia\ScopedCallback;
+use Wikimedia\TestingAccessWrapper;
+
+/**
+ * @ingroup Testing
+ */
+class ParserTestRunner {
+
+ /**
+ * MediaWiki core parser test files, paths
+ * will be prefixed with __DIR__ . '/'
+ *
+ * @var array
+ */
+ private static $coreTestFiles = [
+ 'parserTests.txt',
+ 'extraParserTests.txt',
+ ];
+
+ /**
+ * @var bool $useTemporaryTables Use temporary tables for the temporary database
+ */
+ private $useTemporaryTables = true;
+
+ /**
+ * @var array $setupDone The status of each setup function
+ */
+ private $setupDone = [
+ 'staticSetup' => false,
+ 'perTestSetup' => false,
+ 'setupDatabase' => false,
+ 'setDatabase' => false,
+ 'setupUploads' => false,
+ ];
+
+ /**
+ * Our connection to the database
+ * @var Database
+ */
+ private $db;
+
+ /**
+ * Database clone helper
+ * @var CloneDatabase
+ */
+ private $dbClone;
+
+ /**
+ * @var TidySupport
+ */
+ private $tidySupport;
+
+ /**
+ * @var TidyDriverBase
+ */
+ private $tidyDriver = null;
+
+ /**
+ * @var TestRecorder
+ */
+ private $recorder;
+
+ /**
+ * The upload directory, or null to not set up an upload directory
+ *
+ * @var string|null
+ */
+ private $uploadDir = null;
+
+ /**
+ * The name of the file backend to use, or null to use MockFileBackend.
+ * @var string|null
+ */
+ private $fileBackendName;
+
+ /**
+ * A complete regex for filtering tests.
+ * @var string
+ */
+ private $regex;
+
+ /**
+ * A list of normalization functions to apply to the expected and actual
+ * output.
+ * @var array
+ */
+ private $normalizationFunctions = [];
+
+ /**
+ * @param TestRecorder $recorder
+ * @param array $options
+ */
+ public function __construct( TestRecorder $recorder, $options = [] ) {
+ $this->recorder = $recorder;
+
+ if ( isset( $options['norm'] ) ) {
+ foreach ( $options['norm'] as $func ) {
+ if ( in_array( $func, [ 'removeTbody', 'trimWhitespace' ] ) ) {
+ $this->normalizationFunctions[] = $func;
+ } else {
+ $this->recorder->warning(
+ "Warning: unknown normalization option \"$func\"\n" );
+ }
+ }
+ }
+
+ if ( isset( $options['regex'] ) && $options['regex'] !== false ) {
+ $this->regex = $options['regex'];
+ } else {
+ # Matches anything
+ $this->regex = '//';
+ }
+
+ $this->keepUploads = !empty( $options['keep-uploads'] );
+
+ $this->fileBackendName = isset( $options['file-backend'] ) ?
+ $options['file-backend'] : false;
+
+ $this->runDisabled = !empty( $options['run-disabled'] );
+ $this->runParsoid = !empty( $options['run-parsoid'] );
+
+ $this->tidySupport = new TidySupport( !empty( $options['use-tidy-config'] ) );
+ if ( !$this->tidySupport->isEnabled() ) {
+ $this->recorder->warning(
+ "Warning: tidy is not installed, skipping some tests\n" );
+ }
+
+ if ( isset( $options['upload-dir'] ) ) {
+ $this->uploadDir = $options['upload-dir'];
+ }
+ }
+
+ /**
+ * Get list of filenames to extension and core parser tests
+ *
+ * @return array
+ */
+ public static function getParserTestFiles() {
+ global $wgParserTestFiles;
+
+ // Add core test files
+ $files = array_map( function ( $item ) {
+ return __DIR__ . "/$item";
+ }, self::$coreTestFiles );
+
+ // Plus legacy global files
+ $files = array_merge( $files, $wgParserTestFiles );
+
+ // Auto-discover extension parser tests
+ $registry = ExtensionRegistry::getInstance();
+ foreach ( $registry->getAllThings() as $info ) {
+ $dir = dirname( $info['path'] ) . '/tests/parser';
+ if ( !file_exists( $dir ) ) {
+ continue;
+ }
+ $counter = 1;
+ $dirIterator = new RecursiveIteratorIterator(
+ new RecursiveDirectoryIterator( $dir )
+ );
+ foreach ( $dirIterator as $fileInfo ) {
+ /** @var SplFileInfo $fileInfo */
+ if ( substr( $fileInfo->getFilename(), -4 ) === '.txt' ) {
+ $name = $info['name'] . $counter;
+ while ( isset( $files[$name] ) ) {
+ $name = $info['name'] . '_' . $counter++;
+ }
+ $files[$name] = $fileInfo->getPathname();
+ }
+ }
+ }
+
+ return array_unique( $files );
+ }
+
+ public function getRecorder() {
+ return $this->recorder;
+ }
+
+ /**
+ * Do any setup which can be done once for all tests, independent of test
+ * options, except for database setup.
+ *
+ * Public setup functions in this class return a ScopedCallback object. When
+ * this object is destroyed by going out of scope, teardown of the
+ * corresponding test setup is performed.
+ *
+ * Teardown objects may be chained by passing a ScopedCallback from a
+ * previous setup stage as the $nextTeardown parameter. This enforces the
+ * convention that teardown actions are taken in reverse order to the
+ * corresponding setup actions. When $nextTeardown is specified, a
+ * ScopedCallback will be returned which first tears down the current
+ * setup stage, and then tears down the previous setup stage which was
+ * specified by $nextTeardown.
+ *
+ * @param ScopedCallback|null $nextTeardown
+ * @return ScopedCallback
+ */
+ public function staticSetup( $nextTeardown = null ) {
+ // A note on coding style:
+
+ // The general idea here is to keep setup code together with
+ // corresponding teardown code, in a fine-grained manner. We have two
+ // arrays: $setup and $teardown. The code snippets in the $setup array
+ // are executed at the end of the method, before it returns, and the
+ // code snippets in the $teardown array are executed in reverse order
+ // when the Wikimedia\ScopedCallback object is consumed.
+
+ // Because it is a common operation to save, set and restore global
+ // variables, we have an additional convention: when the array key of
+ // $setup is a string, the string is taken to be the name of the global
+ // variable, and the element value is taken to be the desired new value.
+
+ // It's acceptable to just do the setup immediately, instead of adding
+ // a closure to $setup, except when the setup action depends on global
+ // variable initialisation being done first. In this case, you have to
+ // append a closure to $setup after the global variable is appended.
+
+ // When you add to setup functions in this class, please keep associated
+ // setup and teardown actions together in the source code, and please
+ // add comments explaining why the setup action is necessary.
+
+ $setup = [];
+ $teardown = [];
+
+ $teardown[] = $this->markSetupDone( 'staticSetup' );
+
+ // Some settings which influence HTML output
+ $setup['wgSitename'] = 'MediaWiki';
+ $setup['wgServer'] = 'http://example.org';
+ $setup['wgServerName'] = 'example.org';
+ $setup['wgScriptPath'] = '';
+ $setup['wgScript'] = '/index.php';
+ $setup['wgResourceBasePath'] = '';
+ $setup['wgStylePath'] = '/skins';
+ $setup['wgExtensionAssetsPath'] = '/extensions';
+ $setup['wgArticlePath'] = '/wiki/$1';
+ $setup['wgActionPaths'] = [];
+ $setup['wgVariantArticlePath'] = false;
+ $setup['wgUploadNavigationUrl'] = false;
+ $setup['wgCapitalLinks'] = true;
+ $setup['wgNoFollowLinks'] = true;
+ $setup['wgNoFollowDomainExceptions'] = [ 'no-nofollow.org' ];
+ $setup['wgExternalLinkTarget'] = false;
+ $setup['wgExperimentalHtmlIds'] = false;
+ $setup['wgLocaltimezone'] = 'UTC';
+ $setup['wgHtml5'] = true;
+ $setup['wgDisableLangConversion'] = false;
+ $setup['wgDisableTitleConversion'] = false;
+
+ // "extra language links"
+ // see https://gerrit.wikimedia.org/r/111390
+ $setup['wgExtraInterlanguageLinkPrefixes'] = [ 'mul' ];
+
+ // All FileRepo changes should be done here by injecting services,
+ // there should be no need to change global variables.
+ RepoGroup::setSingleton( $this->createRepoGroup() );
+ $teardown[] = function () {
+ RepoGroup::destroySingleton();
+ };
+
+ // Set up null lock managers
+ $setup['wgLockManagers'] = [ [
+ 'name' => 'fsLockManager',
+ 'class' => NullLockManager::class,
+ ], [
+ 'name' => 'nullLockManager',
+ 'class' => NullLockManager::class,
+ ] ];
+ $reset = function () {
+ LockManagerGroup::destroySingletons();
+ };
+ $setup[] = $reset;
+ $teardown[] = $reset;
+
+ // This allows article insertion into the prefixed DB
+ $setup['wgDefaultExternalStore'] = false;
+
+ // This might slightly reduce memory usage
+ $setup['wgAdaptiveMessageCache'] = true;
+
+ // This is essential and overrides disabling of database messages in TestSetup
+ $setup['wgUseDatabaseMessages'] = true;
+ $reset = function () {
+ MessageCache::destroyInstance();
+ };
+ $setup[] = $reset;
+ $teardown[] = $reset;
+
+ // It's not necessary to actually convert any files
+ $setup['wgSVGConverter'] = 'null';
+ $setup['wgSVGConverters'] = [ 'null' => 'echo "1">$output' ];
+
+ // Fake constant timestamp
+ Hooks::register( 'ParserGetVariableValueTs', function ( &$parser, &$ts ) {
+ $ts = $this->getFakeTimestamp();
+ return true;
+ } );
+ $teardown[] = function () {
+ Hooks::clear( 'ParserGetVariableValueTs' );
+ };
+
+ $this->appendNamespaceSetup( $setup, $teardown );
+
+ // Set up interwikis and append teardown function
+ $teardown[] = $this->setupInterwikis();
+
+ // This affects title normalization in links. It invalidates
+ // MediaWikiTitleCodec objects.
+ $setup['wgLocalInterwikis'] = [ 'local', 'mi' ];
+ $reset = function () {
+ $this->resetTitleServices();
+ };
+ $setup[] = $reset;
+ $teardown[] = $reset;
+
+ // Set up a mock MediaHandlerFactory
+ MediaWikiServices::getInstance()->disableService( 'MediaHandlerFactory' );
+ MediaWikiServices::getInstance()->redefineService(
+ 'MediaHandlerFactory',
+ function ( MediaWikiServices $services ) {
+ $handlers = $services->getMainConfig()->get( 'ParserTestMediaHandlers' );
+ return new MediaHandlerFactory( $handlers );
+ }
+ );
+ $teardown[] = function () {
+ MediaWikiServices::getInstance()->resetServiceForTesting( 'MediaHandlerFactory' );
+ };
+
+ // SqlBagOStuff broke when using temporary tables on r40209 (T17892).
+ // It seems to have been fixed since (r55079?), but regressed at some point before r85701.
+ // This works around it for now...
+ global $wgObjectCaches;
+ $setup['wgObjectCaches'] = [ CACHE_DB => $wgObjectCaches['hash'] ] + $wgObjectCaches;
+ if ( isset( ObjectCache::$instances[CACHE_DB] ) ) {
+ $savedCache = ObjectCache::$instances[CACHE_DB];
+ ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;
+ $teardown[] = function () use ( $savedCache ) {
+ ObjectCache::$instances[CACHE_DB] = $savedCache;
+ };
+ }
+
+ $teardown[] = $this->executeSetupSnippets( $setup );
+
+ // Schedule teardown snippets in reverse order
+ return $this->createTeardownObject( $teardown, $nextTeardown );
+ }
+
+ private function appendNamespaceSetup( &$setup, &$teardown ) {
+ // Add a namespace shadowing a interwiki link, to test
+ // proper precedence when resolving links. (T53680)
+ $setup['wgExtraNamespaces'] = [
+ 100 => 'MemoryAlpha',
+ 101 => 'MemoryAlpha_talk'
+ ];
+ // Changing wgExtraNamespaces invalidates caches in MWNamespace and
+ // any live Language object, both on setup and teardown
+ $reset = function () {
+ MWNamespace::clearCaches();
+ $GLOBALS['wgContLang']->resetNamespaces();
+ };
+ $setup[] = $reset;
+ $teardown[] = $reset;
+ }
+
+ /**
+ * Create a RepoGroup object appropriate for the current configuration
+ * @return RepoGroup
+ */
+ protected function createRepoGroup() {
+ if ( $this->uploadDir ) {
+ if ( $this->fileBackendName ) {
+ throw new MWException( 'You cannot specify both use-filebackend and upload-dir' );
+ }
+ $backend = new FSFileBackend( [
+ 'name' => 'local-backend',
+ 'wikiId' => wfWikiID(),
+ 'basePath' => $this->uploadDir,
+ 'tmpDirectory' => wfTempDir()
+ ] );
+ } elseif ( $this->fileBackendName ) {
+ global $wgFileBackends;
+ $name = $this->fileBackendName;
+ $useConfig = false;
+ foreach ( $wgFileBackends as $conf ) {
+ if ( $conf['name'] === $name ) {
+ $useConfig = $conf;
+ }
+ }
+ if ( $useConfig === false ) {
+ throw new MWException( "Unable to find file backend \"$name\"" );
+ }
+ $useConfig['name'] = 'local-backend'; // swap name
+ unset( $useConfig['lockManager'] );
+ unset( $useConfig['fileJournal'] );
+ $class = $useConfig['class'];
+ $backend = new $class( $useConfig );
+ } else {
+ # Replace with a mock. We do not care about generating real
+ # files on the filesystem, just need to expose the file
+ # informations.
+ $backend = new MockFileBackend( [
+ 'name' => 'local-backend',
+ 'wikiId' => wfWikiID()
+ ] );
+ }
+
+ return new RepoGroup(
+ [
+ 'class' => MockLocalRepo::class,
+ 'name' => 'local',
+ 'url' => 'http://example.com/images',
+ 'hashLevels' => 2,
+ 'transformVia404' => false,
+ 'backend' => $backend
+ ],
+ []
+ );
+ }
+
+ /**
+ * Execute an array in which elements with integer keys are taken to be
+ * callable objects, and other elements are taken to be global variable
+ * set operations, with the key giving the variable name and the value
+ * giving the new global variable value. A closure is returned which, when
+ * executed, sets the global variables back to the values they had before
+ * this function was called.
+ *
+ * @see staticSetup
+ *
+ * @param array $setup
+ * @return closure
+ */
+ protected function executeSetupSnippets( $setup ) {
+ $saved = [];
+ foreach ( $setup as $name => $value ) {
+ if ( is_int( $name ) ) {
+ $value();
+ } else {
+ $saved[$name] = isset( $GLOBALS[$name] ) ? $GLOBALS[$name] : null;
+ $GLOBALS[$name] = $value;
+ }
+ }
+ return function () use ( $saved ) {
+ $this->executeSetupSnippets( $saved );
+ };
+ }
+
+ /**
+ * Take a setup array in the same format as the one given to
+ * executeSetupSnippets(), and return a ScopedCallback which, when consumed,
+ * executes the snippets in the setup array in reverse order. This is used
+ * to create "teardown objects" for the public API.
+ *
+ * @see staticSetup
+ *
+ * @param array $teardown The snippet array
+ * @param ScopedCallback|null $nextTeardown A ScopedCallback to consume
+ * @return ScopedCallback
+ */
+ protected function createTeardownObject( $teardown, $nextTeardown = null ) {
+ return new ScopedCallback( function () use ( $teardown, $nextTeardown ) {
+ // Schedule teardown snippets in reverse order
+ $teardown = array_reverse( $teardown );
+
+ $this->executeSetupSnippets( $teardown );
+ if ( $nextTeardown ) {
+ ScopedCallback::consume( $nextTeardown );
+ }
+ } );
+ }
+
+ /**
+ * Set a setupDone flag to indicate that setup has been done, and return
+ * the teardown closure. If the flag was already set, throw an exception.
+ *
+ * @param string $funcName The setup function name
+ * @return closure
+ */
+ protected function markSetupDone( $funcName ) {
+ if ( $this->setupDone[$funcName] ) {
+ throw new MWException( "$funcName is already done" );
+ }
+ $this->setupDone[$funcName] = true;
+ return function () use ( $funcName ) {
+ $this->setupDone[$funcName] = false;
+ };
+ }
+
+ /**
+ * Ensure a given setup stage has been done, throw an exception if it has
+ * not.
+ * @param string $funcName
+ * @param string|null $funcName2
+ */
+ protected function checkSetupDone( $funcName, $funcName2 = null ) {
+ if ( !$this->setupDone[$funcName]
+ && ( $funcName === null || !$this->setupDone[$funcName2] )
+ ) {
+ throw new MWException( "$funcName must be called before calling " .
+ wfGetCaller() );
+ }
+ }
+
+ /**
+ * Determine whether a particular setup function has been run
+ *
+ * @param string $funcName
+ * @return bool
+ */
+ public function isSetupDone( $funcName ) {
+ return isset( $this->setupDone[$funcName] ) ? $this->setupDone[$funcName] : false;
+ }
+
+ /**
+ * Insert hardcoded interwiki in the lookup table.
+ *
+ * This function insert a set of well known interwikis that are used in
+ * the parser tests. They can be considered has fixtures are injected in
+ * the interwiki cache by using the 'InterwikiLoadPrefix' hook.
+ * Since we are not interested in looking up interwikis in the database,
+ * the hook completely replace the existing mechanism (hook returns false).
+ *
+ * @return closure for teardown
+ */
+ private function setupInterwikis() {
+ # Hack: insert a few Wikipedia in-project interwiki prefixes,
+ # for testing inter-language links
+ Hooks::register( 'InterwikiLoadPrefix', function ( $prefix, &$iwData ) {
+ static $testInterwikis = [
+ 'local' => [
+ 'iw_url' => 'http://doesnt.matter.org/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 0 ],
+ 'wikipedia' => [
+ 'iw_url' => 'http://en.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 0 ],
+ 'meatball' => [
+ 'iw_url' => 'http://www.usemod.com/cgi-bin/mb.pl?$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 0 ],
+ 'memoryalpha' => [
+ 'iw_url' => 'http://www.memory-alpha.org/en/index.php/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 0 ],
+ 'zh' => [
+ 'iw_url' => 'http://zh.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ 'es' => [
+ 'iw_url' => 'http://es.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ 'fr' => [
+ 'iw_url' => 'http://fr.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ 'ru' => [
+ 'iw_url' => 'http://ru.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ 'mi' => [
+ 'iw_url' => 'http://mi.wikipedia.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ 'mul' => [
+ 'iw_url' => 'http://wikisource.org/wiki/$1',
+ 'iw_api' => '',
+ 'iw_wikiid' => '',
+ 'iw_local' => 1 ],
+ ];
+ if ( array_key_exists( $prefix, $testInterwikis ) ) {
+ $iwData = $testInterwikis[$prefix];
+ }
+
+ // We only want to rely on the above fixtures
+ return false;
+ } );// hooks::register
+
+ // Reset the service in case any other tests already cached some prefixes.
+ MediaWikiServices::getInstance()->resetServiceForTesting( 'InterwikiLookup' );
+
+ return function () {
+ // Tear down
+ Hooks::clear( 'InterwikiLoadPrefix' );
+ MediaWikiServices::getInstance()->resetServiceForTesting( 'InterwikiLookup' );
+ };
+ }
+
+ /**
+ * Reset the Title-related services that need resetting
+ * for each test
+ */
+ private function resetTitleServices() {
+ $services = MediaWikiServices::getInstance();
+ $services->resetServiceForTesting( 'TitleFormatter' );
+ $services->resetServiceForTesting( 'TitleParser' );
+ $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
+ $services->resetServiceForTesting( 'LinkRenderer' );
+ $services->resetServiceForTesting( 'LinkRendererFactory' );
+ }
+
+ /**
+ * Remove last character if it is a newline
+ * @param string $s
+ * @return string
+ */
+ public static function chomp( $s ) {
+ if ( substr( $s, -1 ) === "\n" ) {
+ return substr( $s, 0, -1 );
+ } else {
+ return $s;
+ }
+ }
+
+ /**
+ * Run a series of tests listed in the given text files.
+ * Each test consists of a brief description, wikitext input,
+ * and the expected HTML output.
+ *
+ * Prints status updates on stdout and counts up the total
+ * number and percentage of passed tests.
+ *
+ * Handles all setup and teardown.
+ *
+ * @param array $filenames Array of strings
+ * @return bool True if passed all tests, false if any tests failed.
+ */
+ public function runTestsFromFiles( $filenames ) {
+ $ok = false;
+
+ $teardownGuard = $this->staticSetup();
+ $teardownGuard = $this->setupDatabase( $teardownGuard );
+ $teardownGuard = $this->setupUploads( $teardownGuard );
+
+ $this->recorder->start();
+ try {
+ $ok = true;
+
+ foreach ( $filenames as $filename ) {
+ $testFileInfo = TestFileReader::read( $filename, [
+ 'runDisabled' => $this->runDisabled,
+ 'runParsoid' => $this->runParsoid,
+ 'regex' => $this->regex ] );
+
+ // Don't start the suite if there are no enabled tests in the file
+ if ( !$testFileInfo['tests'] ) {
+ continue;
+ }
+
+ $this->recorder->startSuite( $filename );
+ $ok = $this->runTests( $testFileInfo ) && $ok;
+ $this->recorder->endSuite( $filename );
+ }
+
+ $this->recorder->report();
+ } catch ( DBError $e ) {
+ $this->recorder->warning( $e->getMessage() );
+ }
+ $this->recorder->end();
+
+ ScopedCallback::consume( $teardownGuard );
+
+ return $ok;
+ }
+
+ /**
+ * Determine whether the current parser has the hooks registered in it
+ * that are required by a file read by TestFileReader.
+ * @param array $requirements
+ * @return bool
+ */
+ public function meetsRequirements( $requirements ) {
+ foreach ( $requirements as $requirement ) {
+ switch ( $requirement['type'] ) {
+ case 'hook':
+ $ok = $this->requireHook( $requirement['name'] );
+ break;
+ case 'functionHook':
+ $ok = $this->requireFunctionHook( $requirement['name'] );
+ break;
+ case 'transparentHook':
+ $ok = $this->requireTransparentHook( $requirement['name'] );
+ break;
+ }
+ if ( !$ok ) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Run the tests from a single file. staticSetup() and setupDatabase()
+ * must have been called already.
+ *
+ * @param array $testFileInfo Parsed file info returned by TestFileReader
+ * @return bool True if passed all tests, false if any tests failed.
+ */
+ public function runTests( $testFileInfo ) {
+ $ok = true;
+
+ $this->checkSetupDone( 'staticSetup' );
+
+ // Don't add articles from the file if there are no enabled tests from the file
+ if ( !$testFileInfo['tests'] ) {
+ return true;
+ }
+
+ // If any requirements are not met, mark all tests from the file as skipped
+ if ( !$this->meetsRequirements( $testFileInfo['requirements'] ) ) {
+ foreach ( $testFileInfo['tests'] as $test ) {
+ $this->recorder->startTest( $test );
+ $this->recorder->skipped( $test, 'required extension not enabled' );
+ }
+ return true;
+ }
+
+ // Add articles
+ $this->addArticles( $testFileInfo['articles'] );
+
+ // Run tests
+ foreach ( $testFileInfo['tests'] as $test ) {
+ $this->recorder->startTest( $test );
+ $result =
+ $this->runTest( $test );
+ if ( $result !== false ) {
+ $ok = $ok && $result->isSuccess();
+ $this->recorder->record( $test, $result );
+ }
+ }
+
+ return $ok;
+ }
+
+ /**
+ * Get a Parser object
+ *
+ * @param string $preprocessor
+ * @return Parser
+ */
+ function getParser( $preprocessor = null ) {
+ global $wgParserConf;
+
+ $class = $wgParserConf['class'];
+ $parser = new $class( [ 'preprocessorClass' => $preprocessor ] + $wgParserConf );
+ ParserTestParserHook::setup( $parser );
+
+ return $parser;
+ }
+
+ /**
+ * Run a given wikitext input through a freshly-constructed wiki parser,
+ * and compare the output against the expected results.
+ * Prints status and explanatory messages to stdout.
+ *
+ * staticSetup() and setupWikiData() must be called before this function
+ * is entered.
+ *
+ * @param array $test The test parameters:
+ * - test: The test name
+ * - desc: The subtest description
+ * - input: Wikitext to try rendering
+ * - options: Array of test options
+ * - config: Overrides for global variables, one per line
+ *
+ * @return ParserTestResult or false if skipped
+ */
+ public function runTest( $test ) {
+ wfDebug( __METHOD__.": running {$test['desc']}" );
+ $opts = $this->parseOptions( $test['options'] );
+ $teardownGuard = $this->perTestSetup( $test );
+
+ $context = RequestContext::getMain();
+ $user = $context->getUser();
+ $options = ParserOptions::newFromContext( $context );
+ $options->setTimestamp( $this->getFakeTimestamp() );
+
+ if ( isset( $opts['tidy'] ) ) {
+ if ( !$this->tidySupport->isEnabled() ) {
+ $this->recorder->skipped( $test, 'tidy extension is not installed' );
+ return false;
+ } else {
+ $options->setTidy( true );
+ }
+ }
+
+ if ( isset( $opts['title'] ) ) {
+ $titleText = $opts['title'];
+ } else {
+ $titleText = 'Parser test';
+ }
+
+ $local = isset( $opts['local'] );
+ $preprocessor = isset( $opts['preprocessor'] ) ? $opts['preprocessor'] : null;
+ $parser = $this->getParser( $preprocessor );
+ $title = Title::newFromText( $titleText );
+
+ if ( isset( $opts['styletag'] ) ) {
+ // For testing the behavior of <style> (including those deduplicated
+ // into <link> tags), add tag hooks to allow them to be generated.
+ $parser->setHook( 'style', function ( $content, $attributes, $parser ) {
+ $marker = Parser::MARKER_PREFIX . '-style-' . md5( $content ) . Parser::MARKER_SUFFIX;
+ $parser->mStripState->addNoWiki( $marker, $content );
+ return Html::inlineStyle( $marker, 'all', $attributes );
+ } );
+ $parser->setHook( 'link', function ( $content, $attributes, $parser ) {
+ return Html::element( 'link', $attributes );
+ } );
+ }
+
+ if ( isset( $opts['pst'] ) ) {
+ $out = $parser->preSaveTransform( $test['input'], $title, $user, $options );
+ $output = $parser->getOutput();
+ } elseif ( isset( $opts['msg'] ) ) {
+ $out = $parser->transformMsg( $test['input'], $options, $title );
+ } elseif ( isset( $opts['section'] ) ) {
+ $section = $opts['section'];
+ $out = $parser->getSection( $test['input'], $section );
+ } elseif ( isset( $opts['replace'] ) ) {
+ $section = $opts['replace'][0];
+ $replace = $opts['replace'][1];
+ $out = $parser->replaceSection( $test['input'], $section, $replace );
+ } elseif ( isset( $opts['comment'] ) ) {
+ $out = Linker::formatComment( $test['input'], $title, $local );
+ } elseif ( isset( $opts['preload'] ) ) {
+ $out = $parser->getPreloadText( $test['input'], $title, $options );
+ } else {
+ $output = $parser->parse( $test['input'], $title, $options, true, true, 1337 );
+ $out = $output->getText( [
+ 'allowTOC' => !isset( $opts['notoc'] ),
+ 'unwrap' => !isset( $opts['wrap'] ),
+ ] );
+ if ( isset( $opts['tidy'] ) ) {
+ $out = preg_replace( '/\s+$/', '', $out );
+ }
+
+ if ( isset( $opts['showtitle'] ) ) {
+ if ( $output->getTitleText() ) {
+ $title = $output->getTitleText();
+ }
+
+ $out = "$title\n$out";
+ }
+
+ if ( isset( $opts['showindicators'] ) ) {
+ $indicators = '';
+ foreach ( $output->getIndicators() as $id => $content ) {
+ $indicators .= "$id=$content\n";
+ }
+ $out = $indicators . $out;
+ }
+
+ if ( isset( $opts['ill'] ) ) {
+ $out = implode( ' ', $output->getLanguageLinks() );
+ } elseif ( isset( $opts['cat'] ) ) {
+ $out = '';
+ foreach ( $output->getCategories() as $name => $sortkey ) {
+ if ( $out !== '' ) {
+ $out .= "\n";
+ }
+ $out .= "cat=$name sort=$sortkey";
+ }
+ }
+ }
+
+ if ( isset( $output ) && isset( $opts['showflags'] ) ) {
+ $actualFlags = array_keys( TestingAccessWrapper::newFromObject( $output )->mFlags );
+ sort( $actualFlags );
+ $out .= "\nflags=" . implode( ', ', $actualFlags );
+ }
+
+ ScopedCallback::consume( $teardownGuard );
+
+ $expected = $test['result'];
+ if ( count( $this->normalizationFunctions ) ) {
+ $expected = ParserTestResultNormalizer::normalize(
+ $test['expected'], $this->normalizationFunctions );
+ $out = ParserTestResultNormalizer::normalize( $out, $this->normalizationFunctions );
+ }
+
+ $testResult = new ParserTestResult( $test, $expected, $out );
+ return $testResult;
+ }
+
+ /**
+ * Use a regex to find out the value of an option
+ * @param string $key Name of option val to retrieve
+ * @param array $opts Options array to look in
+ * @param mixed $default Default value returned if not found
+ * @return mixed
+ */
+ private static function getOptionValue( $key, $opts, $default ) {
+ $key = strtolower( $key );
+
+ if ( isset( $opts[$key] ) ) {
+ return $opts[$key];
+ } else {
+ return $default;
+ }
+ }
+
+ /**
+ * Given the options string, return an associative array of options.
+ * @todo Move this to TestFileReader
+ *
+ * @param string $instring
+ * @return array
+ */
+ private function parseOptions( $instring ) {
+ $opts = [];
+ // foo
+ // foo=bar
+ // foo="bar baz"
+ // foo=[[bar baz]]
+ // foo=bar,"baz quux"
+ // foo={...json...}
+ $defs = '(?(DEFINE)
+ (?<qstr> # Quoted string
+ "
+ (?:[^\\\\"] | \\\\.)*
+ "
+ )
+ (?<json>
+ \{ # Open bracket
+ (?:
+ [^"{}] | # Not a quoted string or object, or
+ (?&qstr) | # A quoted string, or
+ (?&json) # A json object (recursively)
+ )*
+ \} # Close bracket
+ )
+ (?<value>
+ (?:
+ (?&qstr) # Quoted val
+ |
+ \[\[
+ [^]]* # Link target
+ \]\]
+ |
+ [\w-]+ # Plain word
+ |
+ (?&json) # JSON object
+ )
+ )
+ )';
+ $regex = '/' . $defs . '\b
+ (?<k>[\w-]+) # Key
+ \b
+ (?:\s*
+ = # First sub-value
+ \s*
+ (?<v>
+ (?&value)
+ (?:\s*
+ , # Sub-vals 1..N
+ \s*
+ (?&value)
+ )*
+ )
+ )?
+ /x';
+ $valueregex = '/' . $defs . '(?&value)/x';
+
+ if ( preg_match_all( $regex, $instring, $matches, PREG_SET_ORDER ) ) {
+ foreach ( $matches as $bits ) {
+ $key = strtolower( $bits['k'] );
+ if ( !isset( $bits['v'] ) ) {
+ $opts[$key] = true;
+ } else {
+ preg_match_all( $valueregex, $bits['v'], $vmatches );
+ $opts[$key] = array_map( [ $this, 'cleanupOption' ], $vmatches[0] );
+ if ( count( $opts[$key] ) == 1 ) {
+ $opts[$key] = $opts[$key][0];
+ }
+ }
+ }
+ }
+ return $opts;
+ }
+
+ private function cleanupOption( $opt ) {
+ if ( substr( $opt, 0, 1 ) == '"' ) {
+ return stripcslashes( substr( $opt, 1, -1 ) );
+ }
+
+ if ( substr( $opt, 0, 2 ) == '[[' ) {
+ return substr( $opt, 2, -2 );
+ }
+
+ if ( substr( $opt, 0, 1 ) == '{' ) {
+ return FormatJson::decode( $opt, true );
+ }
+ return $opt;
+ }
+
+ /**
+ * Do any required setup which is dependent on test options.
+ *
+ * @see staticSetup() for more information about setup/teardown
+ *
+ * @param array $test Test info supplied by TestFileReader
+ * @param callable|null $nextTeardown
+ * @return ScopedCallback
+ */
+ public function perTestSetup( $test, $nextTeardown = null ) {
+ $teardown = [];
+
+ $this->checkSetupDone( 'setupDatabase', 'setDatabase' );
+ $teardown[] = $this->markSetupDone( 'perTestSetup' );
+
+ $opts = $this->parseOptions( $test['options'] );
+ $config = $test['config'];
+
+ // Find out values for some special options.
+ $langCode =
+ self::getOptionValue( 'language', $opts, 'en' );
+ $variant =
+ self::getOptionValue( 'variant', $opts, false );
+ $maxtoclevel =
+ self::getOptionValue( 'wgMaxTocLevel', $opts, 999 );
+ $linkHolderBatchSize =
+ self::getOptionValue( 'wgLinkHolderBatchSize', $opts, 1000 );
+
+ // Default to fallback skin, but allow it to be overridden
+ $skin = self::getOptionValue( 'skin', $opts, 'fallback' );
+
+ $setup = [
+ 'wgEnableUploads' => self::getOptionValue( 'wgEnableUploads', $opts, true ),
+ 'wgLanguageCode' => $langCode,
+ 'wgRawHtml' => self::getOptionValue( 'wgRawHtml', $opts, false ),
+ 'wgNamespacesWithSubpages' => array_fill_keys(
+ MWNamespace::getValidNamespaces(), isset( $opts['subpage'] )
+ ),
+ 'wgMaxTocLevel' => $maxtoclevel,
+ 'wgAllowExternalImages' => self::getOptionValue( 'wgAllowExternalImages', $opts, true ),
+ 'wgThumbLimits' => [ self::getOptionValue( 'thumbsize', $opts, 180 ) ],
+ 'wgDefaultLanguageVariant' => $variant,
+ 'wgLinkHolderBatchSize' => $linkHolderBatchSize,
+ // Set as a JSON object like:
+ // wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
+ 'wgEnableMagicLinks' => self::getOptionValue( 'wgEnableMagicLinks', $opts, [] )
+ + [ 'ISBN' => true, 'PMID' => true, 'RFC' => true ],
+ // Test with legacy encoding by default until HTML5 is very stable and default
+ 'wgFragmentMode' => [ 'legacy' ],
+ ];
+
+ if ( $config ) {
+ $configLines = explode( "\n", $config );
+
+ foreach ( $configLines as $line ) {
+ list( $var, $value ) = explode( '=', $line, 2 );
+ $setup[$var] = eval( "return $value;" );
+ }
+ }
+
+ /** @since 1.20 */
+ Hooks::run( 'ParserTestGlobals', [ &$setup ] );
+
+ // Create tidy driver
+ if ( isset( $opts['tidy'] ) ) {
+ // Cache a driver instance
+ if ( $this->tidyDriver === null ) {
+ $this->tidyDriver = MWTidy::factory( $this->tidySupport->getConfig() );
+ }
+ $tidy = $this->tidyDriver;
+ } else {
+ $tidy = false;
+ }
+ MWTidy::setInstance( $tidy );
+ $teardown[] = function () {
+ MWTidy::destroySingleton();
+ };
+
+ // Set content language. This invalidates the magic word cache and title services
+ $lang = Language::factory( $langCode );
+ $lang->resetNamespaces();
+ $setup['wgContLang'] = $lang;
+ $reset = function () {
+ MagicWord::clearCache();
+ $this->resetTitleServices();
+ };
+ $setup[] = $reset;
+ $teardown[] = $reset;
+
+ // Make a user object with the same language
+ $user = new User;
+ $user->setOption( 'language', $langCode );
+ $setup['wgLang'] = $lang;
+
+ // We (re)set $wgThumbLimits to a single-element array above.
+ $user->setOption( 'thumbsize', 0 );
+
+ $setup['wgUser'] = $user;
+
+ // And put both user and language into the context
+ $context = RequestContext::getMain();
+ $context->setUser( $user );
+ $context->setLanguage( $lang );
+ // And the skin!
+ $oldSkin = $context->getSkin();
+ $skinFactory = MediaWikiServices::getInstance()->getSkinFactory();
+ $context->setSkin( $skinFactory->makeSkin( $skin ) );
+ $context->setOutput( new OutputPage( $context ) );
+ $setup['wgOut'] = $context->getOutput();
+ $teardown[] = function () use ( $context, $oldSkin ) {
+ // Clear language conversion tables
+ $wrapper = TestingAccessWrapper::newFromObject(
+ $context->getLanguage()->getConverter()
+ );
+ $wrapper->reloadTables();
+ // Reset context to the restored globals
+ $context->setUser( $GLOBALS['wgUser'] );
+ $context->setLanguage( $GLOBALS['wgContLang'] );
+ $context->setSkin( $oldSkin );
+ $context->setOutput( $GLOBALS['wgOut'] );
+ };
+
+ $teardown[] = $this->executeSetupSnippets( $setup );
+
+ return $this->createTeardownObject( $teardown, $nextTeardown );
+ }
+
+ /**
+ * List of temporary tables to create, without prefix.
+ * Some of these probably aren't necessary.
+ * @return array
+ */
+ private function listTables() {
+ global $wgCommentTableSchemaMigrationStage, $wgActorTableSchemaMigrationStage;
+
+ $tables = [ 'user', 'user_properties', 'user_former_groups', 'page', 'page_restrictions',
+ 'protected_titles', 'revision', 'ip_changes', 'text', 'pagelinks', 'imagelinks',
+ 'categorylinks', 'templatelinks', 'externallinks', 'langlinks', 'iwlinks',
+ 'site_stats', 'ipblocks', 'image', 'oldimage',
+ 'recentchanges', 'watchlist', 'interwiki', 'logging', 'log_search',
+ 'querycache', 'objectcache', 'job', 'l10n_cache', 'redirect', 'querycachetwo',
+ 'archive', 'user_groups', 'page_props', 'category'
+ ];
+
+ if ( $wgCommentTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+ // The new tables for comments are in use
+ $tables[] = 'comment';
+ $tables[] = 'revision_comment_temp';
+ $tables[] = 'image_comment_temp';
+ }
+
+ if ( $wgActorTableSchemaMigrationStage >= MIGRATION_WRITE_BOTH ) {
+ // The new tables for actors are in use
+ $tables[] = 'actor';
+ $tables[] = 'revision_actor_temp';
+ }
+
+ if ( in_array( $this->db->getType(), [ 'mysql', 'sqlite', 'oracle' ] ) ) {
+ array_push( $tables, 'searchindex' );
+ }
+
+ // Allow extensions to add to the list of tables to duplicate;
+ // may be necessary if they hook into page save or other code
+ // which will require them while running tests.
+ Hooks::run( 'ParserTestTables', [ &$tables ] );
+
+ return $tables;
+ }
+
+ public function setDatabase( IDatabase $db ) {
+ $this->db = $db;
+ $this->setupDone['setDatabase'] = true;
+ }
+
+ /**
+ * Set up temporary DB tables.
+ *
+ * For best performance, call this once only for all tests. However, it can
+ * be called at the start of each test if more isolation is desired.
+ *
+ * @todo: This is basically an unrefactored copy of
+ * MediaWikiTestCase::setupAllTestDBs. They should be factored out somehow.
+ *
+ * Do not call this function from a MediaWikiTestCase subclass, since
+ * MediaWikiTestCase does its own DB setup. Instead use setDatabase().
+ *
+ * @see staticSetup() for more information about setup/teardown
+ *
+ * @param ScopedCallback|null $nextTeardown The next teardown object
+ * @return ScopedCallback The teardown object
+ */
+ public function setupDatabase( $nextTeardown = null ) {
+ global $wgDBprefix;
+
+ $this->db = wfGetDB( DB_MASTER );
+ $dbType = $this->db->getType();
+
+ if ( $dbType == 'oracle' ) {
+ $suspiciousPrefixes = [ 'pt_', MediaWikiTestCase::ORA_DB_PREFIX ];
+ } else {
+ $suspiciousPrefixes = [ 'parsertest_', MediaWikiTestCase::DB_PREFIX ];
+ }
+ if ( in_array( $wgDBprefix, $suspiciousPrefixes ) ) {
+ throw new MWException( "\$wgDBprefix=$wgDBprefix suggests DB setup is already done" );
+ }
+
+ $teardown = [];
+
+ $teardown[] = $this->markSetupDone( 'setupDatabase' );
+
+ # CREATE TEMPORARY TABLE breaks if there is more than one server
+ if ( wfGetLB()->getServerCount() != 1 ) {
+ $this->useTemporaryTables = false;
+ }
+
+ $temporary = $this->useTemporaryTables || $dbType == 'postgres';
+ $prefix = $dbType != 'oracle' ? 'parsertest_' : 'pt_';
+
+ $this->dbClone = new CloneDatabase( $this->db, $this->listTables(), $prefix );
+ $this->dbClone->useTemporaryTables( $temporary );
+ $this->dbClone->cloneTableStructure();
+
+ if ( $dbType == 'oracle' ) {
+ $this->db->query( 'BEGIN FILL_WIKI_INFO; END;' );
+ # Insert 0 user to prevent FK violations
+
+ # Anonymous user
+ $this->db->insert( 'user', [
+ 'user_id' => 0,
+ 'user_name' => 'Anonymous' ] );
+ }
+
+ $teardown[] = function () {
+ $this->teardownDatabase();
+ };
+
+ // Wipe some DB query result caches on setup and teardown
+ $reset = function () {
+ LinkCache::singleton()->clear();
+
+ // Clear the message cache
+ MessageCache::singleton()->clear();
+ };
+ $reset();
+ $teardown[] = $reset;
+ return $this->createTeardownObject( $teardown, $nextTeardown );
+ }
+
+ /**
+ * Add data about uploads to the new test DB, and set up the upload
+ * directory. This should be called after either setDatabase() or
+ * setupDatabase().
+ *
+ * @param ScopedCallback|null $nextTeardown The next teardown object
+ * @return ScopedCallback The teardown object
+ */
+ public function setupUploads( $nextTeardown = null ) {
+ $teardown = [];
+
+ $this->checkSetupDone( 'setupDatabase', 'setDatabase' );
+ $teardown[] = $this->markSetupDone( 'setupUploads' );
+
+ // Create the files in the upload directory (or pretend to create them
+ // in a MockFileBackend). Append teardown callback.
+ $teardown[] = $this->setupUploadBackend();
+
+ // Create a user
+ $user = User::createNew( 'WikiSysop' );
+
+ // Register the uploads in the database
+
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Foobar.jpg' ) );
+ # note that the size/width/height/bits/etc of the file
+ # are actually set by inspecting the file itself; the arguments
+ # to recordUpload2 have no effect. That said, we try to make things
+ # match up so it is less confusing to readers of the code & tests.
+ $image->recordUpload2( '', 'Upload of some lame file', 'Some lame file', [
+ 'size' => 7881,
+ 'width' => 1941,
+ 'height' => 220,
+ 'bits' => 8,
+ 'media_type' => MEDIATYPE_BITMAP,
+ 'mime' => 'image/jpeg',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '1', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123500' ), $user );
+
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Thumb.png' ) );
+ # again, note that size/width/height below are ignored; see above.
+ $image->recordUpload2( '', 'Upload of some lame thumbnail', 'Some lame thumbnail', [
+ 'size' => 22589,
+ 'width' => 135,
+ 'height' => 135,
+ 'bits' => 8,
+ 'media_type' => MEDIATYPE_BITMAP,
+ 'mime' => 'image/png',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '2', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20130225203040' ), $user );
+
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Foobar.svg' ) );
+ $image->recordUpload2( '', 'Upload of some lame SVG', 'Some lame SVG', [
+ 'size' => 12345,
+ 'width' => 240,
+ 'height' => 180,
+ 'bits' => 0,
+ 'media_type' => MEDIATYPE_DRAWING,
+ 'mime' => 'image/svg+xml',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123500' ), $user );
+
+ # This image will be blacklisted in [[MediaWiki:Bad image list]]
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Bad.jpg' ) );
+ $image->recordUpload2( '', 'zomgnotcensored', 'Borderline image', [
+ 'size' => 12345,
+ 'width' => 320,
+ 'height' => 240,
+ 'bits' => 24,
+ 'media_type' => MEDIATYPE_BITMAP,
+ 'mime' => 'image/jpeg',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '3', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123500' ), $user );
+
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Video.ogv' ) );
+ $image->recordUpload2( '', 'A pretty movie', 'Will it play', [
+ 'size' => 12345,
+ 'width' => 320,
+ 'height' => 240,
+ 'bits' => 0,
+ 'media_type' => MEDIATYPE_VIDEO,
+ 'mime' => 'application/ogg',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123500' ), $user );
+
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Audio.oga' ) );
+ $image->recordUpload2( '', 'An awesome hitsong', 'Will it play', [
+ 'size' => 12345,
+ 'width' => 0,
+ 'height' => 0,
+ 'bits' => 0,
+ 'media_type' => MEDIATYPE_AUDIO,
+ 'mime' => 'application/ogg',
+ 'metadata' => serialize( [] ),
+ 'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123500' ), $user );
+
+ # A DjVu file
+ $image = wfLocalFile( Title::makeTitle( NS_FILE, 'LoremIpsum.djvu' ) );
+ $image->recordUpload2( '', 'Upload a DjVu', 'A DjVu', [
+ 'size' => 3249,
+ 'width' => 2480,
+ 'height' => 3508,
+ 'bits' => 0,
+ 'media_type' => MEDIATYPE_BITMAP,
+ 'mime' => 'image/vnd.djvu',
+ 'metadata' => '<?xml version="1.0" ?>
+<!DOCTYPE DjVuXML PUBLIC "-//W3C//DTD DjVuXML 1.1//EN" "pubtext/DjVuXML-s.dtd">
+<DjVuXML>
+<HEAD></HEAD>
+<BODY><OBJECT height="3508" width="2480">
+<PARAM name="DPI" value="300" />
+<PARAM name="GAMMA" value="2.2" />
+</OBJECT>
+<OBJECT height="3508" width="2480">
+<PARAM name="DPI" value="300" />
+<PARAM name="GAMMA" value="2.2" />
+</OBJECT>
+<OBJECT height="3508" width="2480">
+<PARAM name="DPI" value="300" />
+<PARAM name="GAMMA" value="2.2" />
+</OBJECT>
+<OBJECT height="3508" width="2480">
+<PARAM name="DPI" value="300" />
+<PARAM name="GAMMA" value="2.2" />
+</OBJECT>
+<OBJECT height="3508" width="2480">
+<PARAM name="DPI" value="300" />
+<PARAM name="GAMMA" value="2.2" />
+</OBJECT>
+</BODY>
+</DjVuXML>',
+ 'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
+ 'fileExists' => true
+ ], $this->db->timestamp( '20010115123600' ), $user );
+
+ return $this->createTeardownObject( $teardown, $nextTeardown );
+ }
+
+ /**
+ * Helper for database teardown, called from the teardown closure. Destroy
+ * the database clone and fix up some things that CloneDatabase doesn't fix.
+ *
+ * @todo Move most things here to CloneDatabase
+ */
+ private function teardownDatabase() {
+ $this->checkSetupDone( 'setupDatabase' );
+
+ $this->dbClone->destroy();
+ $this->databaseSetupDone = false;
+
+ if ( $this->useTemporaryTables ) {
+ if ( $this->db->getType() == 'sqlite' ) {
+ # Under SQLite the searchindex table is virtual and need
+ # to be explicitly destroyed. See T31912
+ # See also MediaWikiTestCase::destroyDB()
+ wfDebug( __METHOD__ . " explicitly destroying sqlite virtual table parsertest_searchindex\n" );
+ $this->db->query( "DROP TABLE `parsertest_searchindex`" );
+ }
+ # Don't need to do anything
+ return;
+ }
+
+ $tables = $this->listTables();
+
+ foreach ( $tables as $table ) {
+ if ( $this->db->getType() == 'oracle' ) {
+ $this->db->query( "DROP TABLE pt_$table DROP CONSTRAINTS" );
+ } else {
+ $this->db->query( "DROP TABLE `parsertest_$table`" );
+ }
+ }
+
+ if ( $this->db->getType() == 'oracle' ) {
+ $this->db->query( 'BEGIN FILL_WIKI_INFO; END;' );
+ }
+ }
+
+ /**
+ * Upload test files to the backend created by createRepoGroup().
+ *
+ * @return callable The teardown callback
+ */
+ private function setupUploadBackend() {
+ global $IP;
+
+ $repo = RepoGroup::singleton()->getLocalRepo();
+ $base = $repo->getZonePath( 'public' );
+ $backend = $repo->getBackend();
+ $backend->prepare( [ 'dir' => "$base/3/3a" ] );
+ $backend->store( [
+ 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg",
+ 'dst' => "$base/3/3a/Foobar.jpg"
+ ] );
+ $backend->prepare( [ 'dir' => "$base/e/ea" ] );
+ $backend->store( [
+ 'src' => "$IP/tests/phpunit/data/parser/wiki.png",
+ 'dst' => "$base/e/ea/Thumb.png"
+ ] );
+ $backend->prepare( [ 'dir' => "$base/0/09" ] );
+ $backend->store( [
+ 'src' => "$IP/tests/phpunit/data/parser/headbg.jpg",
+ 'dst' => "$base/0/09/Bad.jpg"
+ ] );
+ $backend->prepare( [ 'dir' => "$base/5/5f" ] );
+ $backend->store( [
+ 'src' => "$IP/tests/phpunit/data/parser/LoremIpsum.djvu",
+ 'dst' => "$base/5/5f/LoremIpsum.djvu"
+ ] );
+
+ // No helpful SVG file to copy, so make one ourselves
+ $data = '<?xml version="1.0" encoding="utf-8"?>' .
+ '<svg xmlns="http://www.w3.org/2000/svg"' .
+ ' version="1.1" width="240" height="180"/>';
+
+ $backend->prepare( [ 'dir' => "$base/f/ff" ] );
+ $backend->quickCreate( [
+ 'content' => $data, 'dst' => "$base/f/ff/Foobar.svg"
+ ] );
+
+ return function () use ( $backend ) {
+ if ( $backend instanceof MockFileBackend ) {
+ // In memory backend, so dont bother cleaning them up.
+ return;
+ }
+ $this->teardownUploadBackend();
+ };
+ }
+
+ /**
+ * Remove the dummy uploads directory
+ */
+ private function teardownUploadBackend() {
+ if ( $this->keepUploads ) {
+ return;
+ }
+
+ $repo = RepoGroup::singleton()->getLocalRepo();
+ $public = $repo->getZonePath( 'public' );
+
+ $this->deleteFiles(
+ [
+ "$public/3/3a/Foobar.jpg",
+ "$public/e/ea/Thumb.png",
+ "$public/0/09/Bad.jpg",
+ "$public/5/5f/LoremIpsum.djvu",
+ "$public/f/ff/Foobar.svg",
+ "$public/0/00/Video.ogv",
+ "$public/4/41/Audio.oga",
+ ]
+ );
+ }
+
+ /**
+ * Delete the specified files and their parent directories
+ * @param array $files File backend URIs mwstore://...
+ */
+ private function deleteFiles( $files ) {
+ // Delete the files
+ $backend = RepoGroup::singleton()->getLocalRepo()->getBackend();
+ foreach ( $files as $file ) {
+ $backend->delete( [ 'src' => $file ], [ 'force' => 1 ] );
+ }
+
+ // Delete the parent directories
+ foreach ( $files as $file ) {
+ $tmp = FileBackend::parentStoragePath( $file );
+ while ( $tmp ) {
+ if ( !$backend->clean( [ 'dir' => $tmp ] )->isOK() ) {
+ break;
+ }
+ $tmp = FileBackend::parentStoragePath( $tmp );
+ }
+ }
+ }
+
+ /**
+ * Add articles to the test DB.
+ *
+ * @param array $articles Article info array from TestFileReader
+ */
+ public function addArticles( $articles ) {
+ global $wgContLang;
+ $setup = [];
+ $teardown = [];
+
+ // Be sure ParserTestRunner::addArticle has correct language set,
+ // so that system messages get into the right language cache
+ if ( $wgContLang->getCode() !== 'en' ) {
+ $setup['wgLanguageCode'] = 'en';
+ $setup['wgContLang'] = Language::factory( 'en' );
+ }
+
+ // Add special namespaces, in case that hasn't been done by staticSetup() yet
+ $this->appendNamespaceSetup( $setup, $teardown );
+
+ // wgCapitalLinks obviously needs initialisation
+ $setup['wgCapitalLinks'] = true;
+
+ $teardown[] = $this->executeSetupSnippets( $setup );
+
+ foreach ( $articles as $info ) {
+ $this->addArticle( $info['name'], $info['text'], $info['file'], $info['line'] );
+ }
+
+ // Wipe WANObjectCache process cache, which is invalidated by article insertion
+ // due to T144706
+ ObjectCache::getMainWANInstance()->clearProcessCache();
+
+ $this->executeSetupSnippets( $teardown );
+ }
+
+ /**
+ * Insert a temporary test article
+ * @param string $name The title, including any prefix
+ * @param string $text The article text
+ * @param string $file The input file name
+ * @param int|string $line The input line number, for reporting errors
+ * @throws Exception
+ * @throws MWException
+ */
+ private function addArticle( $name, $text, $file, $line ) {
+ $text = self::chomp( $text );
+ $name = self::chomp( $name );
+
+ $title = Title::newFromText( $name );
+ wfDebug( __METHOD__ . ": adding $name" );
+
+ if ( is_null( $title ) ) {
+ throw new MWException( "invalid title '$name' at $file:$line\n" );
+ }
+
+ $newContent = ContentHandler::makeContent( $text, $title );
+
+ $page = WikiPage::factory( $title );
+ $page->loadPageData( 'fromdbmaster' );
+
+ if ( $page->exists() ) {
+ $content = $page->getContent( Revision::RAW );
+ // Only reject the title, if the content/content model is different.
+ // This makes it easier to create Template:(( or Template:)) in different extensions
+ if ( $newContent->equals( $content ) ) {
+ return;
+ }
+ throw new MWException(
+ "duplicate article '$name' with different content at $file:$line\n"
+ );
+ }
+
+ // Use mock parser, to make debugging of actual parser tests simpler.
+ // But initialise the MessageCache clone first, don't let MessageCache
+ // get a reference to the mock object.
+ MessageCache::singleton()->getParser();
+ $restore = $this->executeSetupSnippets( [ 'wgParser' => new ParserTestMockParser ] );
+ try {
+ $status = $page->doEditContent(
+ $newContent,
+ '',
+ EDIT_NEW | EDIT_INTERNAL
+ );
+ } finally {
+ $restore();
+ }
+
+ if ( !$status->isOK() ) {
+ throw new MWException( $status->getWikiText( false, false, 'en' ) );
+ }
+
+ // The RepoGroup cache is invalidated by the creation of file redirects
+ if ( $title->inNamespace( NS_FILE ) ) {
+ RepoGroup::singleton()->clearCache( $title );
+ }
+ }
+
+ /**
+ * Check if a hook is installed
+ *
+ * @param string $name
+ * @return bool True if tag hook is present
+ */
+ public function requireHook( $name ) {
+ global $wgParser;
+
+ $wgParser->firstCallInit(); // make sure hooks are loaded.
+ if ( isset( $wgParser->mTagHooks[$name] ) ) {
+ return true;
+ } else {
+ $this->recorder->warning( " This test suite requires the '$name' hook " .
+ "extension, skipping." );
+ return false;
+ }
+ }
+
+ /**
+ * Check if a function hook is installed
+ *
+ * @param string $name
+ * @return bool True if function hook is present
+ */
+ public function requireFunctionHook( $name ) {
+ global $wgParser;
+
+ $wgParser->firstCallInit(); // make sure hooks are loaded.
+
+ if ( isset( $wgParser->mFunctionHooks[$name] ) ) {
+ return true;
+ } else {
+ $this->recorder->warning( " This test suite requires the '$name' function " .
+ "hook extension, skipping." );
+ return false;
+ }
+ }
+
+ /**
+ * Check if a transparent tag hook is installed
+ *
+ * @param string $name
+ * @return bool True if function hook is present
+ */
+ public function requireTransparentHook( $name ) {
+ global $wgParser;
+
+ $wgParser->firstCallInit(); // make sure hooks are loaded.
+
+ if ( isset( $wgParser->mTransparentTagHooks[$name] ) ) {
+ return true;
+ } else {
+ $this->recorder->warning( " This test suite requires the '$name' transparent " .
+ "hook extension, skipping.\n" );
+ return false;
+ }
+ }
+
+ /**
+ * Fake constant timestamp to make sure time-related parser
+ * functions give a persistent value.
+ *
+ * - Parser::getVariableValue (via ParserGetVariableValueTs hook)
+ * - Parser::preSaveTransform (via ParserOptions)
+ */
+ private function getFakeTimestamp() {
+ // parsed as '1970-01-01T00:02:03Z'
+ return 123;
+ }
+}
diff --git a/www/wiki/tests/parser/PhpunitTestRecorder.php b/www/wiki/tests/parser/PhpunitTestRecorder.php
new file mode 100644
index 00000000..1a2cfc91
--- /dev/null
+++ b/www/wiki/tests/parser/PhpunitTestRecorder.php
@@ -0,0 +1,18 @@
+<?php
+
+class PhpunitTestRecorder extends TestRecorder {
+ private $testCase;
+
+ public function setTestCase( PHPUnit\Framework\TestCase $testCase ) {
+ $this->testCase = $testCase;
+ }
+
+ /**
+ * Mark a test skipped
+ * @param string $test
+ * @param string $reason
+ */
+ public function skipped( $test, $reason ) {
+ $this->testCase->markTestSkipped( "SKIPPED: $reason" );
+ }
+}
diff --git a/www/wiki/tests/parser/README b/www/wiki/tests/parser/README
new file mode 100644
index 00000000..a62db5ac
--- /dev/null
+++ b/www/wiki/tests/parser/README
@@ -0,0 +1,12 @@
+Parser tests can be run either via PHPUnit or by using the standalone
+parserTests.php in this directory. The standalone version provides more
+options.
+
+To run parser tests via PHPUnit:
+
+ $ cd tests/phpunit
+ ./phpunit.php --testsuite parsertests
+
+You can optionally filter by title using --filter, e.g.
+
+ ./phpunit.php --testsuite parsertests --filter="T6400"
diff --git a/www/wiki/tests/parser/TestFileEditor.php b/www/wiki/tests/parser/TestFileEditor.php
new file mode 100644
index 00000000..1bee31ea
--- /dev/null
+++ b/www/wiki/tests/parser/TestFileEditor.php
@@ -0,0 +1,196 @@
+<?php
+
+class TestFileEditor {
+ private $lines;
+ private $numLines;
+ private $deletions;
+ private $changes;
+ private $pos;
+ private $warningCallback;
+ private $result;
+
+ public static function edit( $text, array $deletions, array $changes, $warningCallback = null ) {
+ $editor = new self( $text, $deletions, $changes, $warningCallback );
+ $editor->execute();
+ return $editor->result;
+ }
+
+ private function __construct( $text, array $deletions, array $changes, $warningCallback ) {
+ $this->lines = explode( "\n", $text );
+ $this->numLines = count( $this->lines );
+ $this->deletions = array_flip( $deletions );
+ $this->changes = $changes;
+ $this->pos = 0;
+ $this->warningCallback = $warningCallback;
+ $this->result = '';
+ }
+
+ private function execute() {
+ while ( $this->pos < $this->numLines ) {
+ $line = $this->lines[$this->pos];
+ switch ( $this->getHeading( $line ) ) {
+ case 'test':
+ $this->parseTest();
+ break;
+ case 'hooks':
+ case 'functionhooks':
+ case 'transparenthooks':
+ $this->parseHooks();
+ break;
+ default:
+ if ( $this->pos < $this->numLines - 1 ) {
+ $line .= "\n";
+ }
+ $this->emitComment( $line );
+ $this->pos++;
+ }
+ }
+ foreach ( $this->deletions as $deletion => $unused ) {
+ $this->warning( "Could not find test \"$deletion\" to delete it" );
+ }
+ foreach ( $this->changes as $test => $sectionChanges ) {
+ foreach ( $sectionChanges as $section => $change ) {
+ $this->warning( "Could not find section \"$section\" in test \"$test\" " .
+ "to {$change['op']} it" );
+ }
+ }
+ }
+
+ private function warning( $text ) {
+ $cb = $this->warningCallback;
+ if ( $cb ) {
+ $cb( $text );
+ }
+ }
+
+ private function getHeading( $line ) {
+ if ( preg_match( '/^!!\s*(\S+)/', $line, $m ) ) {
+ return $m[1];
+ } else {
+ return false;
+ }
+ }
+
+ private function parseTest() {
+ $test = [];
+ $line = $this->lines[$this->pos++];
+ $heading = $this->getHeading( $line );
+ $section = [
+ 'name' => $heading,
+ 'headingLine' => $line,
+ 'contents' => ''
+ ];
+
+ while ( $this->pos < $this->numLines ) {
+ $line = $this->lines[$this->pos++];
+ $nextHeading = $this->getHeading( $line );
+ if ( $nextHeading === 'end' ) {
+ $test[] = $section;
+
+ // Add trailing line breaks to the "end" section, to allow for neat deletions
+ $trail = '';
+ for ( $i = 0; $i < $this->numLines - $this->pos - 1; $i++ ) {
+ if ( $this->lines[$this->pos + $i] === '' ) {
+ $trail .= "\n";
+ } else {
+ break;
+ }
+ }
+ $this->pos += strlen( $trail );
+
+ $test[] = [
+ 'name' => 'end',
+ 'headingLine' => $line,
+ 'contents' => $trail
+ ];
+ $this->emitTest( $test );
+ return;
+ } elseif ( $nextHeading !== false ) {
+ $test[] = $section;
+ $heading = $nextHeading;
+ $section = [
+ 'name' => $heading,
+ 'headingLine' => $line,
+ 'contents' => ''
+ ];
+ } else {
+ $section['contents'] .= "$line\n";
+ }
+ }
+
+ throw new Exception( 'Unexpected end of file' );
+ }
+
+ private function parseHooks() {
+ $line = $this->lines[$this->pos++];
+ $heading = $this->getHeading( $line );
+ $expectedEnd = 'end' . $heading;
+ $contents = "$line\n";
+
+ do {
+ $line = $this->lines[$this->pos++];
+ $nextHeading = $this->getHeading( $line );
+ $contents .= "$line\n";
+ } while ( $this->pos < $this->numLines && $nextHeading !== $expectedEnd );
+
+ if ( $nextHeading !== $expectedEnd ) {
+ throw new Exception( 'Unexpected end of file' );
+ }
+ $this->emitHooks( $heading, $contents );
+ }
+
+ protected function emitComment( $contents ) {
+ $this->result .= $contents;
+ }
+
+ protected function emitTest( $test ) {
+ $testName = false;
+ foreach ( $test as $section ) {
+ if ( $section['name'] === 'test' ) {
+ $testName = rtrim( $section['contents'], "\n" );
+ }
+ }
+ if ( isset( $this->deletions[$testName] ) ) {
+ // Acknowledge deletion
+ unset( $this->deletions[$testName] );
+ return;
+ }
+ if ( isset( $this->changes[$testName] ) ) {
+ $changes =& $this->changes[$testName];
+ foreach ( $test as $i => $section ) {
+ $sectionName = $section['name'];
+ if ( isset( $changes[$sectionName] ) ) {
+ $change = $changes[$sectionName];
+ switch ( $change['op'] ) {
+ case 'rename':
+ $test[$i]['name'] = $change['value'];
+ $test[$i]['headingLine'] = "!! {$change['value']}";
+ break;
+ case 'update':
+ $test[$i]['contents'] = $change['value'];
+ break;
+ case 'delete':
+ $test[$i]['deleted'] = true;
+ break;
+ default:
+ throw new Exception( "Unknown op: ${change['op']}" );
+ }
+ // Acknowledge
+ // Note that we use the old section name for the rename op
+ unset( $changes[$sectionName] );
+ }
+ }
+ }
+ foreach ( $test as $section ) {
+ if ( isset( $section['deleted'] ) ) {
+ continue;
+ }
+ $this->result .= $section['headingLine'] . "\n";
+ $this->result .= $section['contents'];
+ }
+ }
+
+ protected function emitHooks( $heading, $contents ) {
+ $this->result .= $contents;
+ }
+}
diff --git a/www/wiki/tests/parser/TestFileReader.php b/www/wiki/tests/parser/TestFileReader.php
new file mode 100644
index 00000000..a96485d4
--- /dev/null
+++ b/www/wiki/tests/parser/TestFileReader.php
@@ -0,0 +1,335 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+class TestFileReader {
+ private $file;
+ private $fh;
+ private $section = null;
+ /** String|null: current test section being analyzed */
+ private $sectionData = [];
+ private $sectionLineNum = [];
+ private $lineNum = 0;
+ private $runDisabled;
+ private $runParsoid;
+ private $regex;
+
+ private $articles = [];
+ private $requirements = [];
+ private $tests = [];
+
+ public static function read( $file, array $options = [] ) {
+ $reader = new self( $file, $options );
+ $reader->execute();
+
+ $requirements = [];
+ foreach ( $reader->requirements as $type => $reqsOfType ) {
+ foreach ( $reqsOfType as $name => $unused ) {
+ $requirements[] = [
+ 'type' => $type,
+ 'name' => $name
+ ];
+ }
+ }
+
+ return [
+ 'requirements' => $requirements,
+ 'tests' => $reader->tests,
+ 'articles' => $reader->articles
+ ];
+ }
+
+ private function __construct( $file, $options ) {
+ $this->file = $file;
+ $this->fh = fopen( $this->file, "rt" );
+
+ if ( !$this->fh ) {
+ throw new MWException( "Couldn't open file '$file'\n" );
+ }
+
+ $options = $options + [
+ 'runDisabled' => false,
+ 'runParsoid' => false,
+ 'regex' => '//',
+ ];
+ $this->runDisabled = $options['runDisabled'];
+ $this->runParsoid = $options['runParsoid'];
+ $this->regex = $options['regex'];
+ }
+
+ private function addCurrentTest() {
+ // "input" and "result" are old section names allowed
+ // for backwards-compatibility.
+ $input = $this->checkSection( [ 'wikitext', 'input' ], false );
+ $nonTidySection = $this->checkSection(
+ [ 'html/php', 'html/*', 'html', 'result' ], false );
+ // Some tests have "with tidy" and "without tidy" variants
+ $tidySection = $this->checkSection( [ 'html/php+tidy', 'html+tidy' ], false );
+
+ // Remove trailing newline
+ $data = array_map( 'ParserTestRunner::chomp', $this->sectionData );
+
+ // Apply defaults
+ $data += [
+ 'options' => '',
+ 'config' => ''
+ ];
+
+ if ( $input === false ) {
+ throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+ "lacks input section" );
+ }
+
+ if ( preg_match( '/\\bdisabled\\b/i', $data['options'] ) && !$this->runDisabled ) {
+ // Disabled
+ return;
+ }
+
+ if ( $tidySection === false && $nonTidySection === false ) {
+ if ( isset( $data['html/parsoid'] ) || isset( $data['wikitext/edited'] ) ) {
+ // Parsoid only
+ return;
+ } else {
+ throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+ "lacks result section" );
+ }
+ }
+
+ if ( preg_match( '/\\bparsoid\\b/i', $data['options'] ) && $nonTidySection === 'html'
+ && !$this->runParsoid
+ ) {
+ // A test which normally runs on Parsoid but can optionally be run with MW
+ return;
+ }
+
+ if ( !preg_match( $this->regex, $data['test'] ) ) {
+ // Filtered test
+ return;
+ }
+
+ $commonInfo = [
+ 'test' => $data['test'],
+ 'desc' => $data['test'],
+ 'input' => $data[$input],
+ 'options' => $data['options'],
+ 'config' => $data['config'],
+ 'line' => $this->sectionLineNum['test'],
+ 'file' => $this->file
+ ];
+
+ if ( $nonTidySection !== false ) {
+ // Add non-tidy test
+ $this->tests[] = [
+ 'result' => $data[$nonTidySection],
+ 'resultSection' => $nonTidySection
+ ] + $commonInfo;
+
+ if ( $tidySection !== false ) {
+ // Add tidy subtest
+ $this->tests[] = [
+ 'desc' => $data['test'] . ' (with tidy)',
+ 'result' => $data[$tidySection],
+ 'resultSection' => $tidySection,
+ 'options' => $data['options'] . ' tidy',
+ 'isSubtest' => true,
+ ] + $commonInfo;
+ }
+ } elseif ( $tidySection !== false ) {
+ // No need to override desc when there is no subtest
+ $this->tests[] = [
+ 'result' => $data[$tidySection],
+ 'resultSection' => $tidySection,
+ 'options' => $data['options'] . ' tidy'
+ ] + $commonInfo;
+ } else {
+ throw new MWException( "Test at {$this->file}:{$this->sectionLineNum['test']} " .
+ "lacks result section" );
+ }
+ }
+
+ private function execute() {
+ while ( false !== ( $line = fgets( $this->fh ) ) ) {
+ $this->lineNum++;
+ $matches = [];
+
+ if ( preg_match( '/^!!\s*(\S+)/', $line, $matches ) ) {
+ $this->section = strtolower( $matches[1] );
+
+ if ( $this->section == 'endarticle' ) {
+ $this->checkSection( 'text' );
+ $this->checkSection( 'article' );
+
+ $this->addArticle(
+ ParserTestRunner::chomp( $this->sectionData['article'] ),
+ $this->sectionData['text'], $this->lineNum );
+
+ $this->clearSection();
+
+ continue;
+ }
+
+ if ( $this->section == 'endhooks' ) {
+ $this->checkSection( 'hooks' );
+
+ foreach ( explode( "\n", $this->sectionData['hooks'] ) as $line ) {
+ $line = trim( $line );
+
+ if ( $line ) {
+ $this->addRequirement( 'hook', $line );
+ }
+ }
+
+ $this->clearSection();
+
+ continue;
+ }
+
+ if ( $this->section == 'endfunctionhooks' ) {
+ $this->checkSection( 'functionhooks' );
+
+ foreach ( explode( "\n", $this->sectionData['functionhooks'] ) as $line ) {
+ $line = trim( $line );
+
+ if ( $line ) {
+ $this->addRequirement( 'functionHook', $line );
+ }
+ }
+
+ $this->clearSection();
+
+ continue;
+ }
+
+ if ( $this->section == 'endtransparenthooks' ) {
+ $this->checkSection( 'transparenthooks' );
+
+ foreach ( explode( "\n", $this->sectionData['transparenthooks'] ) as $line ) {
+ $line = trim( $line );
+
+ if ( $line ) {
+ $this->addRequirement( 'transparentHook', $line );
+ }
+ }
+
+ $this->clearSection();
+
+ continue;
+ }
+
+ if ( $this->section == 'end' ) {
+ $this->checkSection( 'test' );
+ $this->addCurrentTest();
+ $this->clearSection();
+ continue;
+ }
+
+ if ( isset( $this->sectionData[$this->section] ) ) {
+ throw new MWException( "duplicate section '$this->section' "
+ . "at line {$this->lineNum} of $this->file\n" );
+ }
+
+ $this->sectionLineNum[$this->section] = $this->lineNum;
+ $this->sectionData[$this->section] = '';
+
+ continue;
+ }
+
+ if ( $this->section ) {
+ $this->sectionData[$this->section] .= $line;
+ }
+ }
+ }
+
+ /**
+ * Clear section name and its data
+ */
+ private function clearSection() {
+ $this->sectionLineNum = [];
+ $this->sectionData = [];
+ $this->section = null;
+ }
+
+ /**
+ * Verify the current section data has some value for the given token
+ * name(s) (first parameter).
+ * Throw an exception if it is not set, referencing current section
+ * and adding the current file name and line number
+ *
+ * @param string|array $tokens Expected token(s) that should have been
+ * mentioned before closing this section
+ * @param bool $fatal True iff an exception should be thrown if
+ * the section is not found.
+ * @return bool|string
+ * @throws MWException
+ */
+ private function checkSection( $tokens, $fatal = true ) {
+ if ( is_null( $this->section ) ) {
+ throw new MWException( __METHOD__ . " can not verify a null section!\n" );
+ }
+ if ( !is_array( $tokens ) ) {
+ $tokens = [ $tokens ];
+ }
+ if ( count( $tokens ) == 0 ) {
+ throw new MWException( __METHOD__ . " can not verify zero sections!\n" );
+ }
+
+ $data = $this->sectionData;
+ $tokens = array_filter( $tokens, function ( $token ) use ( $data ) {
+ return isset( $data[$token] );
+ } );
+
+ if ( count( $tokens ) == 0 ) {
+ if ( !$fatal ) {
+ return false;
+ }
+ throw new MWException( sprintf(
+ "'%s' without '%s' at line %s of %s\n",
+ $this->section,
+ implode( ',', $tokens ),
+ $this->lineNum,
+ $this->file
+ ) );
+ }
+ if ( count( $tokens ) > 1 ) {
+ throw new MWException( sprintf(
+ "'%s' with unexpected tokens '%s' at line %s of %s\n",
+ $this->section,
+ implode( ',', $tokens ),
+ $this->lineNum,
+ $this->file
+ ) );
+ }
+
+ return array_values( $tokens )[0];
+ }
+
+ private function addArticle( $name, $text, $line ) {
+ $this->articles[] = [
+ 'name' => $name,
+ 'text' => $text,
+ 'line' => $line,
+ 'file' => $this->file
+ ];
+ }
+
+ private function addRequirement( $type, $name ) {
+ $this->requirements[$type][$name] = true;
+ }
+}
diff --git a/www/wiki/tests/parser/TestRecorder.php b/www/wiki/tests/parser/TestRecorder.php
new file mode 100644
index 00000000..2731c4c5
--- /dev/null
+++ b/www/wiki/tests/parser/TestRecorder.php
@@ -0,0 +1,93 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+/**
+ * Interface to record parser test results.
+ *
+ * The TestRecorder is an class hierarchy to record the result of
+ * MediaWiki parser tests. One should call start() before running the
+ * full parser tests and end() once all the tests have been finished.
+ * After each test, you should use record() to keep track of your tests
+ * results. Finally, report() is used to generate a summary of your
+ * test run, one could dump it to the console for human consumption or
+ * register the result in a database for tracking purposes.
+ *
+ * @since 1.22
+ */
+class TestRecorder {
+
+ /**
+ * Called at beginning of the parser test run
+ */
+ public function start() {
+ }
+
+ /**
+ * Called before starting a test
+ */
+ public function startTest( $test ) {
+ }
+
+ /**
+ * Called before starting an input file
+ */
+ public function startSuite( $path ) {
+ }
+
+ /**
+ * Called after ending an input file
+ */
+ public function endSuite( $path ) {
+ }
+
+ /**
+ * Called after each test
+ * @param array $test
+ * @param ParserTestResult $result
+ */
+ public function record( $test, ParserTestResult $result ) {
+ }
+
+ /**
+ * Show a warning to the user
+ */
+ public function warning( $message ) {
+ }
+
+ /**
+ * Mark a test skipped
+ */
+ public function skipped( $test, $subtest ) {
+ }
+
+ /**
+ * Called before finishing the test run
+ */
+ public function report() {
+ }
+
+ /**
+ * Called at the end of the parser test run
+ */
+ public function end() {
+ }
+
+}
diff --git a/www/wiki/tests/parser/TidySupport.php b/www/wiki/tests/parser/TidySupport.php
new file mode 100644
index 00000000..559960de
--- /dev/null
+++ b/www/wiki/tests/parser/TidySupport.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+/**
+ * Initialize and detect the tidy support
+ */
+class TidySupport {
+ private $enabled;
+ private $config;
+
+ /**
+ * Determine if there is a usable tidy.
+ * @param bool $useConfiguration
+ */
+ public function __construct( $useConfiguration = false ) {
+ global $wgUseTidy, $wgTidyBin, $wgTidyInternal, $wgTidyConfig,
+ $wgTidyConf, $wgTidyOpts;
+
+ $this->enabled = true;
+ if ( $useConfiguration ) {
+ if ( $wgTidyConfig !== null ) {
+ $this->config = $wgTidyConfig;
+ } elseif ( $wgUseTidy ) {
+ $this->config = [
+ 'tidyConfigFile' => $wgTidyConf,
+ 'debugComment' => false,
+ 'tidyBin' => $wgTidyBin,
+ 'tidyCommandLine' => $wgTidyOpts
+ ];
+ if ( $wgTidyInternal ) {
+ $this->config['driver'] = wfIsHHVM() ? 'RaggettInternalHHVM' : 'RaggettInternalPHP';
+ } else {
+ $this->config['driver'] = 'RaggettExternal';
+ }
+ } else {
+ $this->enabled = false;
+ }
+ } else {
+ $this->config = [ 'driver' => 'RemexHtml' ];
+ }
+ if ( !$this->enabled ) {
+ $this->config = [ 'driver' => 'disabled' ];
+ }
+ }
+
+ /**
+ * Returns true if tidy is usable
+ *
+ * @return bool
+ */
+ public function isEnabled() {
+ return $this->enabled;
+ }
+
+ public function getConfig() {
+ return $this->config;
+ }
+}
diff --git a/www/wiki/tests/parser/editTests.php b/www/wiki/tests/parser/editTests.php
new file mode 100644
index 00000000..3e18370a
--- /dev/null
+++ b/www/wiki/tests/parser/editTests.php
@@ -0,0 +1,488 @@
+<?php
+
+require __DIR__.'/../../maintenance/Maintenance.php';
+
+define( 'MW_PARSER_TEST', true );
+
+/**
+ * Interactive parser test runner and test file editor
+ */
+class ParserEditTests extends Maintenance {
+ private $termWidth;
+ private $testFiles;
+ private $testCount;
+ private $recorder;
+ private $runner;
+ private $numExecuted;
+ private $numSkipped;
+ private $numFailed;
+
+ function __construct() {
+ parent::__construct();
+ $this->addOption( 'session-data', 'internal option, do not use', false, true );
+ $this->addOption( 'use-tidy-config',
+ 'Use the wiki\'s Tidy configuration instead of known-good' .
+ 'defaults.' );
+ }
+
+ public function finalSetup() {
+ parent::finalSetup();
+ self::requireTestsAutoloader();
+ TestSetup::applyInitialConfig();
+ }
+
+ public function execute() {
+ $this->termWidth = $this->getTermSize()[0] - 1;
+
+ $this->recorder = new TestRecorder();
+ $this->setupFileData();
+
+ if ( $this->hasOption( 'session-data' ) ) {
+ $this->session = json_decode( $this->getOption( 'session-data' ), true );
+ } else {
+ $this->session = [ 'options' => [] ];
+ }
+ if ( $this->hasOption( 'use-tidy-config' ) ) {
+ $this->session['options']['use-tidy-config'] = true;
+ }
+ $this->runner = new ParserTestRunner( $this->recorder, $this->session['options'] );
+
+ $this->runTests();
+
+ if ( $this->numFailed === 0 ) {
+ if ( $this->numSkipped === 0 ) {
+ print "All tests passed!\n";
+ } else {
+ print "All tests passed (but skipped {$this->numSkipped})\n";
+ }
+ return;
+ }
+ print "{$this->numFailed} test(s) failed.\n";
+ $this->showResults();
+ }
+
+ protected function setupFileData() {
+ $this->testFiles = [];
+ $this->testCount = 0;
+ foreach ( ParserTestRunner::getParserTestFiles() as $file ) {
+ $fileInfo = TestFileReader::read( $file );
+ $this->testFiles[$file] = $fileInfo;
+ $this->testCount += count( $fileInfo['tests'] );
+ }
+ }
+
+ protected function runTests() {
+ $teardown = $this->runner->staticSetup();
+ $teardown = $this->runner->setupDatabase( $teardown );
+ $teardown = $this->runner->setupUploads( $teardown );
+
+ print "Running tests...\n";
+ $this->results = [];
+ $this->numExecuted = 0;
+ $this->numSkipped = 0;
+ $this->numFailed = 0;
+ foreach ( $this->testFiles as $fileName => $fileInfo ) {
+ $this->runner->addArticles( $fileInfo['articles'] );
+ foreach ( $fileInfo['tests'] as $testInfo ) {
+ $result = $this->runner->runTest( $testInfo );
+ if ( $result === false ) {
+ $this->numSkipped++;
+ } elseif ( !$result->isSuccess() ) {
+ $this->results[$fileName][$testInfo['desc']] = $result;
+ $this->numFailed++;
+ }
+ $this->numExecuted++;
+ $this->showProgress();
+ }
+ }
+ print "\n";
+ }
+
+ protected function showProgress() {
+ $done = $this->numExecuted;
+ $total = $this->testCount;
+ $width = $this->termWidth - 9;
+ $pos = round( $width * $done / $total );
+ printf( '│' . str_repeat( '█', $pos ) . str_repeat( '-', $width - $pos ) .
+ "│ %5.1f%%\r", $done / $total * 100 );
+ }
+
+ protected function showResults() {
+ if ( isset( $this->session['startFile'] ) ) {
+ $startFile = $this->session['startFile'];
+ $startTest = $this->session['startTest'];
+ $foundStart = false;
+ } else {
+ $startFile = false;
+ $startTest = false;
+ $foundStart = true;
+ }
+
+ $testIndex = 0;
+ foreach ( $this->testFiles as $fileName => $fileInfo ) {
+ if ( !isset( $this->results[$fileName] ) ) {
+ continue;
+ }
+ if ( !$foundStart && $startFile !== false && $fileName !== $startFile ) {
+ $testIndex += count( $this->results[$fileName] );
+ continue;
+ }
+ foreach ( $fileInfo['tests'] as $testInfo ) {
+ if ( !isset( $this->results[$fileName][$testInfo['desc']] ) ) {
+ continue;
+ }
+ $result = $this->results[$fileName][$testInfo['desc']];
+ $testIndex++;
+ if ( !$foundStart && $startTest !== false ) {
+ if ( $testInfo['desc'] !== $startTest ) {
+ continue;
+ }
+ $foundStart = true;
+ }
+
+ $this->handleFailure( $testIndex, $testInfo, $result );
+ }
+ }
+
+ if ( !$foundStart ) {
+ print "Could not find the test after a restart, did you rename it?";
+ unset( $this->session['startFile'] );
+ unset( $this->session['startTest'] );
+ $this->showResults();
+ }
+ print "All done\n";
+ }
+
+ protected function heading( $text ) {
+ $term = new AnsiTermColorer;
+ $heading = "─── $text ";
+ $heading .= str_repeat( '─', $this->termWidth - mb_strlen( $heading ) );
+ $heading = $term->color( 34 ) . $heading . $term->reset() . "\n";
+ return $heading;
+ }
+
+ protected function unifiedDiff( $left, $right ) {
+ $fromLines = explode( "\n", $left );
+ $toLines = explode( "\n", $right );
+ $formatter = new UnifiedDiffFormatter;
+ return $formatter->format( new Diff( $fromLines, $toLines ) );
+ }
+
+ protected function handleFailure( $index, $testInfo, $result ) {
+ $term = new AnsiTermColorer;
+ $div1 = $term->color( 34 ) . str_repeat( '━', $this->termWidth ) .
+ $term->reset() . "\n";
+ $div2 = $term->color( 34 ) . str_repeat( '─', $this->termWidth ) .
+ $term->reset() . "\n";
+
+ print $div1;
+ print "Failure $index/{$this->numFailed}: {$testInfo['file']} line {$testInfo['line']}\n" .
+ "{$testInfo['desc']}\n";
+
+ print $this->heading( 'Input' );
+ print "{$testInfo['input']}\n";
+
+ print $this->heading( 'Alternating expected/actual output' );
+ print $this->alternatingAligned( $result->expected, $result->actual );
+
+ print $this->heading( 'Diff' );
+
+ $dwdiff = $this->dwdiff( $result->expected, $result->actual );
+ if ( $dwdiff !== false ) {
+ $diff = $dwdiff;
+ } else {
+ $diff = $this->unifiedDiff( $result->expected, $result->actual );
+ }
+ print $diff;
+
+ if ( $testInfo['options'] || $testInfo['config'] ) {
+ print $this->heading( 'Options / Config' );
+ if ( $testInfo['options'] ) {
+ print $testInfo['options'] . "\n";
+ }
+ if ( $testInfo['config'] ) {
+ print $testInfo['config'] . "\n";
+ }
+ }
+
+ print $div2;
+ print "What do you want to do?\n";
+ $specs = [
+ '[R]eload code and run again',
+ '[U]pdate source file, copy actual to expected',
+ '[I]gnore' ];
+
+ if ( strpos( $testInfo['options'], ' tidy' ) === false ) {
+ if ( empty( $testInfo['isSubtest'] ) ) {
+ $specs[] = "Enable [T]idy";
+ }
+ } else {
+ $specs[] = 'Disable [T]idy';
+ }
+
+ if ( !empty( $testInfo['isSubtest'] ) ) {
+ $specs[] = 'Delete [s]ubtest';
+ }
+ $specs[] = '[D]elete test';
+ $specs[] = '[Q]uit';
+
+ $options = [];
+ foreach ( $specs as $spec ) {
+ if ( !preg_match( '/^(.*\[)(.)(\].*)$/', $spec, $m ) ) {
+ throw new MWException( 'Invalid option spec: ' . $spec );
+ }
+ print '* ' . $m[1] . $term->color( 35 ) . $m[2] . $term->color( 0 ) . $m[3] . "\n";
+ $options[strtoupper( $m[2] )] = true;
+ }
+
+ do {
+ $response = $this->readconsole();
+ $cmdResult = false;
+ if ( $response === false ) {
+ exit( 0 );
+ }
+
+ $response = strtoupper( trim( $response ) );
+ if ( !isset( $options[$response] ) ) {
+ print "Invalid response, please enter a single letter from the list above\n";
+ continue;
+ }
+
+ switch ( strtoupper( trim( $response ) ) ) {
+ case 'R':
+ $cmdResult = $this->reload( $testInfo );
+ break;
+ case 'U':
+ $cmdResult = $this->update( $testInfo, $result );
+ break;
+ case 'I':
+ return;
+ case 'T':
+ $cmdResult = $this->switchTidy( $testInfo );
+ break;
+ case 'S':
+ $cmdResult = $this->deleteSubtest( $testInfo );
+ break;
+ case 'D':
+ $cmdResult = $this->deleteTest( $testInfo );
+ break;
+ case 'Q':
+ exit( 0 );
+ }
+ } while ( !$cmdResult );
+ }
+
+ protected function dwdiff( $expected, $actual ) {
+ if ( !is_executable( '/usr/bin/dwdiff' ) ) {
+ return false;
+ }
+
+ $markers = [
+ "\n" => '¶',
+ ' ' => '·',
+ "\t" => '→'
+ ];
+ $markedExpected = strtr( $expected, $markers );
+ $markedActual = strtr( $actual, $markers );
+ $diff = $this->unifiedDiff( $markedExpected, $markedActual );
+
+ $tempFile = tmpfile();
+ fwrite( $tempFile, $diff );
+ fseek( $tempFile, 0 );
+ $pipes = [];
+ $proc = proc_open( '/usr/bin/dwdiff -Pc --diff-input',
+ [ 0 => $tempFile, 1 => [ 'pipe', 'w' ], 2 => STDERR ],
+ $pipes );
+
+ if ( !$proc ) {
+ return false;
+ }
+
+ $result = stream_get_contents( $pipes[1] );
+ proc_close( $proc );
+ fclose( $tempFile );
+ return $result;
+ }
+
+ protected function alternatingAligned( $expectedStr, $actualStr ) {
+ $expectedLines = explode( "\n", $expectedStr );
+ $actualLines = explode( "\n", $actualStr );
+ $maxLines = max( count( $expectedLines ), count( $actualLines ) );
+ $result = '';
+ for ( $i = 0; $i < $maxLines; $i++ ) {
+ if ( $i < count( $expectedLines ) ) {
+ $expectedLine = $expectedLines[$i];
+ $expectedChunks = str_split( $expectedLine, $this->termWidth - 3 );
+ } else {
+ $expectedChunks = [];
+ }
+
+ if ( $i < count( $actualLines ) ) {
+ $actualLine = $actualLines[$i];
+ $actualChunks = str_split( $actualLine, $this->termWidth - 3 );
+ } else {
+ $actualChunks = [];
+ }
+
+ $maxChunks = max( count( $expectedChunks ), count( $actualChunks ) );
+
+ for ( $j = 0; $j < $maxChunks; $j++ ) {
+ if ( isset( $expectedChunks[$j] ) ) {
+ $result .= "E: " . $expectedChunks[$j];
+ if ( $j === count( $expectedChunks ) - 1 ) {
+ $result .= "¶";
+ }
+ $result .= "\n";
+ } else {
+ $result .= "E:\n";
+ }
+ $result .= "\33[4m" . // underline
+ "A: ";
+ if ( isset( $actualChunks[$j] ) ) {
+ $result .= $actualChunks[$j];
+ if ( $j === count( $actualChunks ) - 1 ) {
+ $result .= "¶";
+ }
+ }
+ $result .= "\33[0m\n"; // reset
+ }
+ }
+ return $result;
+ }
+
+ protected function reload( $testInfo ) {
+ global $argv;
+ pcntl_exec( PHP_BINARY, [
+ $argv[0],
+ '--session-data',
+ json_encode( [
+ 'startFile' => $testInfo['file'],
+ 'startTest' => $testInfo['desc']
+ ] + $this->session ) ] );
+
+ print "pcntl_exec() failed\n";
+ return false;
+ }
+
+ protected function findTest( $file, $testInfo ) {
+ $initialPart = '';
+ for ( $i = 1; $i < $testInfo['line']; $i++ ) {
+ $line = fgets( $file );
+ if ( $line === false ) {
+ print "Error reading from file\n";
+ return false;
+ }
+ $initialPart .= $line;
+ }
+
+ $line = fgets( $file );
+ if ( !preg_match( '/^!!\s*test/', $line ) ) {
+ print "Test has moved, cannot edit\n";
+ return false;
+ }
+
+ $testPart = $line;
+
+ $desc = fgets( $file );
+ if ( trim( $desc ) !== $testInfo['desc'] ) {
+ print "Description does not match, cannot edit\n";
+ return false;
+ }
+ $testPart .= $desc;
+ return [ $initialPart, $testPart ];
+ }
+
+ protected function getOutputFileName( $inputFileName ) {
+ if ( is_writable( $inputFileName ) ) {
+ $outputFileName = $inputFileName;
+ } else {
+ $outputFileName = wfTempDir() . '/' . basename( $inputFileName );
+ print "Cannot write to input file, writing to $outputFileName instead\n";
+ }
+ return $outputFileName;
+ }
+
+ protected function editTest( $fileName, $deletions, $changes ) {
+ $text = file_get_contents( $fileName );
+ if ( $text === false ) {
+ print "Unable to open test file!";
+ return false;
+ }
+ $result = TestFileEditor::edit( $text, $deletions, $changes,
+ function ( $msg ) {
+ print "$msg\n";
+ }
+ );
+ if ( is_writable( $fileName ) ) {
+ file_put_contents( $fileName, $result );
+ print "Wrote updated file\n";
+ } else {
+ print "Cannot write updated file, here is a patch you can paste:\n\n";
+ print "--- {$fileName}\n" .
+ "+++ {$fileName}~\n" .
+ $this->unifiedDiff( $text, $result ) .
+ "\n";
+ }
+ }
+
+ protected function update( $testInfo, $result ) {
+ $this->editTest( $testInfo['file'],
+ [], // deletions
+ [ // changes
+ $testInfo['test'] => [
+ $testInfo['resultSection'] => [
+ 'op' => 'update',
+ 'value' => $result->actual . "\n"
+ ]
+ ]
+ ]
+ );
+ }
+
+ protected function deleteTest( $testInfo ) {
+ $this->editTest( $testInfo['file'],
+ [ $testInfo['test'] ], // deletions
+ [] // changes
+ );
+ }
+
+ protected function switchTidy( $testInfo ) {
+ $resultSection = $testInfo['resultSection'];
+ if ( in_array( $resultSection, [ 'html/php', 'html/*', 'html', 'result' ] ) ) {
+ $newSection = 'html+tidy';
+ } elseif ( in_array( $resultSection, [ 'html/php+tidy', 'html+tidy' ] ) ) {
+ $newSection = 'html';
+ } else {
+ print "Unrecognised result section name \"$resultSection\"";
+ return;
+ }
+
+ $this->editTest( $testInfo['file'],
+ [], // deletions
+ [ // changes
+ $testInfo['test'] => [
+ $resultSection => [
+ 'op' => 'rename',
+ 'value' => $newSection
+ ]
+ ]
+ ]
+ );
+ }
+
+ protected function deleteSubtest( $testInfo ) {
+ $this->editTest( $testInfo['file'],
+ [], // deletions
+ [ // changes
+ $testInfo['test'] => [
+ $testInfo['resultSection'] => [
+ 'op' => 'delete'
+ ]
+ ]
+ ]
+ );
+ }
+}
+
+$maintClass = 'ParserEditTests';
+require RUN_MAINTENANCE_IF_MAIN;
diff --git a/www/wiki/tests/parser/extraParserTests.txt b/www/wiki/tests/parser/extraParserTests.txt
new file mode 100644
index 00000000..50d1bc9e
--- /dev/null
+++ b/www/wiki/tests/parser/extraParserTests.txt
Binary files differ
diff --git a/www/wiki/tests/parser/fuzzTest.php b/www/wiki/tests/parser/fuzzTest.php
new file mode 100644
index 00000000..eb4181c7
--- /dev/null
+++ b/www/wiki/tests/parser/fuzzTest.php
@@ -0,0 +1,202 @@
+<?php
+
+use Wikimedia\ScopedCallback;
+
+require __DIR__ . '/../../maintenance/Maintenance.php';
+
+// Make RequestContext::resetMain() happy
+define( 'MW_PARSER_TEST', 1 );
+
+class ParserFuzzTest extends Maintenance {
+ private $parserTest;
+ private $maxFuzzTestLength = 300;
+ private $memoryLimit = 100;
+ private $seed;
+
+ function __construct() {
+ parent::__construct();
+ $this->addDescription( 'Run a fuzz test on the parser, until it segfaults ' .
+ 'or throws an exception' );
+ $this->addOption( 'file', 'Use the specified file as a dictionary, ' .
+ ' or leave blank to use parserTests.txt', false, true, true );
+
+ $this->addOption( 'seed', 'Start the fuzz test from the specified seed', false, true );
+ }
+
+ function finalSetup() {
+ self::requireTestsAutoloader();
+ TestSetup::applyInitialConfig();
+ }
+
+ function execute() {
+ $files = $this->getOption( 'file', [ __DIR__ . '/parserTests.txt' ] );
+ $this->seed = intval( $this->getOption( 'seed', 1 ) ) - 1;
+ $this->parserTest = new ParserTestRunner(
+ new MultiTestRecorder,
+ [] );
+ $this->fuzzTest( $files );
+ }
+
+ /**
+ * Run a fuzz test series
+ * Draw input from a set of test files
+ * @param array $filenames
+ */
+ function fuzzTest( $filenames ) {
+ $dict = $this->getFuzzInput( $filenames );
+ $dictSize = strlen( $dict );
+ $logMaxLength = log( $this->maxFuzzTestLength );
+
+ $teardown = $this->parserTest->staticSetup();
+ $teardown = $this->parserTest->setupDatabase( $teardown );
+ $teardown = $this->parserTest->setupUploads( $teardown );
+
+ $fakeTest = [
+ 'test' => '',
+ 'desc' => '',
+ 'input' => '',
+ 'result' => '',
+ 'options' => '',
+ 'config' => ''
+ ];
+
+ ini_set( 'memory_limit', $this->memoryLimit * 1048576 * 2 );
+
+ $numTotal = 0;
+ $numSuccess = 0;
+ $user = new User;
+ $opts = ParserOptions::newFromUser( $user );
+ $title = Title::makeTitle( NS_MAIN, 'Parser_test' );
+
+ while ( true ) {
+ // Generate test input
+ mt_srand( ++$this->seed );
+ $totalLength = mt_rand( 1, $this->maxFuzzTestLength );
+ $input = '';
+
+ while ( strlen( $input ) < $totalLength ) {
+ $logHairLength = mt_rand( 0, 1000000 ) / 1000000 * $logMaxLength;
+ $hairLength = min( intval( exp( $logHairLength ) ), $dictSize );
+ $offset = mt_rand( 0, $dictSize - $hairLength );
+ $input .= substr( $dict, $offset, $hairLength );
+ }
+
+ $perTestTeardown = $this->parserTest->perTestSetup( $fakeTest );
+ $parser = $this->parserTest->getParser();
+
+ // Run the test
+ try {
+ $parser->parse( $input, $title, $opts );
+ $fail = false;
+ } catch ( Exception $exception ) {
+ $fail = true;
+ }
+
+ if ( $fail ) {
+ echo "Test failed with seed {$this->seed}\n";
+ echo "Input:\n";
+ printf( "string(%d) \"%s\"\n\n", strlen( $input ), $input );
+ echo "$exception\n";
+ } else {
+ $numSuccess++;
+ }
+
+ $numTotal++;
+ ScopedCallback::consume( $perTestTeardown );
+
+ if ( $numTotal % 100 == 0 ) {
+ $usage = intval( memory_get_usage( true ) / $this->memoryLimit / 1048576 * 100 );
+ echo "{$this->seed}: $numSuccess/$numTotal (mem: $usage%)\n";
+ if ( $usage >= 100 ) {
+ echo "Out of memory:\n";
+ $memStats = $this->getMemoryBreakdown();
+
+ foreach ( $memStats as $name => $usage ) {
+ echo "$name: $usage\n";
+ }
+ if ( function_exists( 'hphpd_break' ) ) {
+ hphpd_break();
+ }
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * Get a memory usage breakdown
+ * @return array
+ */
+ function getMemoryBreakdown() {
+ $memStats = [];
+
+ foreach ( $GLOBALS as $name => $value ) {
+ $memStats['$' . $name] = $this->guessVarSize( $value );
+ }
+
+ $classes = get_declared_classes();
+
+ foreach ( $classes as $class ) {
+ $rc = new ReflectionClass( $class );
+ $props = $rc->getStaticProperties();
+ $memStats[$class] = $this->guessVarSize( $props );
+ $methods = $rc->getMethods();
+
+ foreach ( $methods as $method ) {
+ $memStats[$class] += $this->guessVarSize( $method->getStaticVariables() );
+ }
+ }
+
+ $functions = get_defined_functions();
+
+ foreach ( $functions['user'] as $function ) {
+ $rf = new ReflectionFunction( $function );
+ $memStats["$function()"] = $this->guessVarSize( $rf->getStaticVariables() );
+ }
+
+ asort( $memStats );
+
+ return $memStats;
+ }
+
+ /**
+ * Estimate the size of the input variable
+ */
+ function guessVarSize( $var ) {
+ $length = 0;
+ try {
+ Wikimedia\suppressWarnings();
+ $length = strlen( serialize( $var ) );
+ Wikimedia\restoreWarnings();
+ } catch ( Exception $e ) {
+ }
+ return $length;
+ }
+
+ /**
+ * Get an input dictionary from a set of parser test files
+ * @param array $filenames
+ * @return string
+ */
+ function getFuzzInput( $filenames ) {
+ $dict = '';
+
+ foreach ( $filenames as $filename ) {
+ $contents = file_get_contents( $filename );
+ preg_match_all(
+ '/!!\s*(input|wikitext)\n(.*?)\n!!\s*(result|html|html\/\*|html\/php)/s',
+ $contents,
+ $matches
+ );
+
+ foreach ( $matches[1] as $match ) {
+ $dict .= $match . "\n";
+ }
+ }
+
+ return $dict;
+ }
+}
+
+$maintClass = 'ParserFuzzTest';
+require RUN_MAINTENANCE_IF_MAIN;
diff --git a/www/wiki/tests/parser/parserTests.php b/www/wiki/tests/parser/parserTests.php
new file mode 100644
index 00000000..6a423d5c
--- /dev/null
+++ b/www/wiki/tests/parser/parserTests.php
@@ -0,0 +1,199 @@
+<?php
+/**
+ * MediaWiki parser test suite
+ *
+ * Copyright © 2004 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Testing
+ */
+
+// Some methods which are discouraged for normal code throw exceptions unless
+// we declare this is just a test.
+define( 'MW_PARSER_TEST', true );
+
+require __DIR__ . '/../../maintenance/Maintenance.php';
+
+use MediaWiki\MediaWikiServices;
+
+class ParserTestsMaintenance extends Maintenance {
+ function __construct() {
+ parent::__construct();
+ $this->addDescription( 'Run parser tests' );
+
+ $this->addOption( 'quick', 'Suppress diff output of failed tests' );
+ $this->addOption( 'quiet', 'Suppress notification of passed tests (shows only failed tests)' );
+ $this->addOption( 'show-output', 'Show expected and actual output' );
+ $this->addOption( 'color', '[=yes|no] Override terminal detection and force ' .
+ 'color output on or off. Use wgCommandLineDarkBg = true; if your term is dark',
+ false, true );
+ $this->addOption( 'regex', 'Only run tests whose descriptions which match given regex',
+ false, true );
+ $this->addOption( 'filter', 'Alias for --regex', false, true );
+ $this->addOption( 'file', 'Run test cases from a custom file instead of parserTests.txt',
+ false, true, false, true );
+ $this->addOption( 'record', 'Record tests in database' );
+ $this->addOption( 'compare', 'Compare with recorded results, without updating the database.' );
+ $this->addOption( 'setversion', 'When using --record, set the version string to use (useful' .
+ 'with "git rev-parse HEAD" to get the exact revision)',
+ false, true );
+ $this->addOption( 'keep-uploads', 'Re-use the same upload directory for each ' .
+ 'test, don\'t delete it' );
+ $this->addOption( 'file-backend', 'Use the file backend with the given name,' .
+ 'and upload files to it, instead of creating a mock file backend.', false, true );
+ $this->addOption( 'upload-dir', 'Specify the upload directory to use. Useful in ' .
+ 'conjunction with --keep-uploads. Causes a real (non-mock) file backend to ' .
+ 'be used.', false, true );
+ $this->addOption( 'run-disabled', 'run disabled tests' );
+ $this->addOption( 'run-parsoid', 'run parsoid tests (normally disabled)' );
+ $this->addOption( 'dwdiff', 'Use dwdiff to display diff output' );
+ $this->addOption( 'mark-ws', 'Mark whitespace in diffs by replacing it with symbols' );
+ $this->addOption( 'norm', 'Apply a comma-separated list of normalization functions to ' .
+ 'both the expected and actual output in order to resolve ' .
+ 'irrelevant differences. The accepted normalization functions ' .
+ 'are: removeTbody to remove <tbody> tags; and trimWhitespace ' .
+ 'to trim whitespace from the start and end of text nodes.',
+ false, true );
+ $this->addOption( 'use-tidy-config',
+ 'Use the wiki\'s Tidy configuration instead of known-good' .
+ 'defaults.' );
+ }
+
+ public function finalSetup() {
+ parent::finalSetup();
+ self::requireTestsAutoloader();
+ TestSetup::applyInitialConfig();
+ }
+
+ public function execute() {
+ global $wgDBtype;
+
+ // Cases of weird db corruption were encountered when running tests on earlyish
+ // versions of SQLite
+ if ( $wgDBtype == 'sqlite' ) {
+ $db = wfGetDB( DB_MASTER );
+ $version = $db->getServerVersion();
+ if ( version_compare( $version, '3.6' ) < 0 ) {
+ die( "Parser tests require SQLite version 3.6 or later, you have $version\n" );
+ }
+ }
+
+ // Print out software version to assist with locating regressions
+ $version = SpecialVersion::getVersion( 'nodb' );
+ echo "This is MediaWiki version {$version}.\n\n";
+
+ // Only colorize output if stdout is a terminal.
+ $color = !wfIsWindows() && Maintenance::posix_isatty( 1 );
+
+ if ( $this->hasOption( 'color' ) ) {
+ switch ( $this->getOption( 'color' ) ) {
+ case 'no':
+ $color = false;
+ break;
+ case 'yes':
+ default:
+ $color = true;
+ break;
+ }
+ }
+
+ $record = $this->hasOption( 'record' );
+ $compare = $this->hasOption( 'compare' );
+
+ $regex = $this->getOption( 'filter', $this->getOption( 'regex', false ) );
+ if ( $regex !== false ) {
+ $regex = "/$regex/i";
+
+ if ( $record ) {
+ echo "Warning: --record cannot be used with --regex, disabling --record\n";
+ $record = false;
+ }
+ }
+
+ $term = $color
+ ? new AnsiTermColorer()
+ : new DummyTermColorer();
+
+ $recorder = new MultiTestRecorder;
+
+ $recorder->addRecorder( new ParserTestPrinter(
+ $term,
+ [
+ 'showDiffs' => !$this->hasOption( 'quick' ),
+ 'showProgress' => !$this->hasOption( 'quiet' ),
+ 'showFailure' => !$this->hasOption( 'quiet' )
+ || ( !$record && !$compare ), // redundant output
+ 'showOutput' => $this->hasOption( 'show-output' ),
+ 'useDwdiff' => $this->hasOption( 'dwdiff' ),
+ 'markWhitespace' => $this->hasOption( 'mark-ws' ),
+ ]
+ ) );
+
+ $recorderLB = false;
+ if ( $record || $compare ) {
+ $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+ $recorderLB = $lbFactory->newMainLB();
+ // This connection will have the wiki's table prefix, not parsertest_
+ $recorderDB = $recorderLB->getConnection( DB_MASTER );
+
+ // Add recorder before previewer because recorder will create the
+ // DB table if it doesn't exist
+ if ( $record ) {
+ $recorder->addRecorder( new DbTestRecorder( $recorderDB ) );
+ }
+ $recorder->addRecorder( new DbTestPreviewer(
+ $recorderDB,
+ function ( $name ) use ( $regex ) {
+ // Filter reports of old tests by the filter regex
+ if ( $regex === false ) {
+ return true;
+ } else {
+ return (bool)preg_match( $regex, $name );
+ }
+ } ) );
+ }
+
+ // Default parser tests and any set from extensions or local config
+ $files = $this->getOption( 'file', ParserTestRunner::getParserTestFiles() );
+
+ $norm = $this->hasOption( 'norm' ) ? explode( ',', $this->getOption( 'norm' ) ) : [];
+
+ $tester = new ParserTestRunner( $recorder, [
+ 'norm' => $norm,
+ 'regex' => $regex,
+ 'keep-uploads' => $this->hasOption( 'keep-uploads' ),
+ 'run-disabled' => $this->hasOption( 'run-disabled' ),
+ 'run-parsoid' => $this->hasOption( 'run-parsoid' ),
+ 'use-tidy-config' => $this->hasOption( 'use-tidy-config' ),
+ 'file-backend' => $this->getOption( 'file-backend' ),
+ 'upload-dir' => $this->getOption( 'upload-dir' ),
+ ] );
+
+ $ok = $tester->runTestsFromFiles( $files );
+ if ( $recorderLB ) {
+ $recorderLB->closeAll();
+ }
+ if ( !$ok ) {
+ exit( 1 );
+ }
+ }
+}
+
+$maintClass = 'ParserTestsMaintenance';
+require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/www/wiki/tests/parser/parserTests.txt b/www/wiki/tests/parser/parserTests.txt
new file mode 100644
index 00000000..451c50f5
--- /dev/null
+++ b/www/wiki/tests/parser/parserTests.txt
@@ -0,0 +1,30829 @@
+# MediaWiki Parser test cases
+# Some taken from https://meta.wikimedia.org/wiki/Parser_testing
+# All (C) their respective authors and released under the GPL
+#
+# The syntax should be fairly self-explanatory.
+#
+# Currently supported test options:
+# One of the following three:
+#
+# (default) generate HTML output
+# pst apply pre-save transform
+# msg apply message transform
+#
+# Plus any combination of these:
+#
+# cat add category links
+# (ignored by Parsoid, since it emits <link>s)
+# ill add inter-language links
+# (ignored by Parsoid, since it emits <link>s)
+# subpage enable subpages (disabled by default)
+# title=[[XXX]] run test using article title XXX
+# language=XXX set content language to XXX for this test
+# variant=XXX set the variant of language for this test (eg zh-tw)
+# disabled do not run test
+# parsoid parsoid-specific options (not run by PHP parser unless
+# the test includes an html/php section)
+# php php-only test (not run by the parsoid parser unless
+# the test includes an html/parsoid section)
+# showtitle make the first line the title
+# showindicators make the first lines the page status indicators
+# comment run through Linker::formatComment() instead of main parser
+# local format section links in edit comment text as local links
+# notoc disable table of contents
+# thumbsize=NNN set the default thumb size to NNNpx for this test
+# wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
+#
+# You can also set the following parser properties via test options:
+# wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
+# wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
+# wgEnableMagicLinks
+#
+# For testing purposes, temporary articles can created:
+# !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
+# where '/' denotes a newline.
+
+# This is the standard article assumed to exist.
+!! article
+Main Page
+!! text
+blah blah
+!! endarticle
+
+!!article
+Foo
+!!text
+FOO
+!!endarticle
+
+!!article
+Template:Foo
+!!text
+FOO
+!!endarticle
+
+!! article
+Template:Blank
+!! text
+!! endarticle
+
+!! article
+Template:pipe
+!! text
+|
+!! endarticle
+
+!! article
+Template:=
+!! text
+<nowiki>=</nowiki>
+!! endarticle
+
+!!article
+MediaWiki:bad image list
+!!text
+* [[File:Bad.jpg]] except [[Nasty page]]
+!!endarticle
+
+!! article
+Template:inner list
+!! text
+* item 1
+!! endarticle
+
+!! article
+Template:tbl-start
+!! text
+{|
+!! endarticle
+
+!! article
+Template:tbl-end
+!! text
+|}
+!! endarticle
+
+!! article
+Template:echo
+!! text
+{{{1}}}
+!! endarticle
+
+// For Serbian; localize Template namespace
+!! article
+Шаблон:Echo
+!! text
+{{{1}}}
+!! endarticle
+
+!! article
+Template:echo_with_span
+!! text
+<span>{{{1}}}</span>
+!! endarticle
+
+!! article
+Template:echo_with_div
+!! text
+<div>{{{1}}}</div>
+!! endarticle
+
+!! article
+Template:blank_param
+!! text
+{{{1}}}
+{{{}}}
+!! endarticle
+
+!! article
+Template:table_attribs
+!! text
+<noinclude>
+|</noinclude>style="color:red;"|Foo
+!! endarticle
+
+!! article
+Template:table_attribs_2
+!! text
+<noinclude>
+|</noinclude>style="color:red;"|Foo
+|Bar||Baz
+!! endarticle
+
+!! article
+Template:table_attribs_3
+!! text
+<noinclude>
+|</noinclude>style{{=}}"background:&#35;f9f9f9;"|Foo
+!! endarticle
+
+!! article
+Template:table_attribs_4
+!! text
+| style="background-color:#DC241f;" width="10px" |
+!! endarticle
+
+!! article
+Template:table_attribs_5
+!! text
+<noinclude>
+|</noinclude>style="color:red;"||Bar
+!! endarticle
+
+!! article
+Template:table_attribs_6
+!! text
+style="background: <nowiki>
+
+
+red;</nowiki>" |
+!! endarticle
+
+!! article
+Template:table_attribs_7
+!! text
+<noinclude>
+|</noinclude>style{{=}}"background:&#35;f9f9f9;"|Foo<ref>foo</ref>
+!! endarticle
+
+!! article
+Template:table_header_cells
+!! text
+{{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
+!! endarticle
+
+!! article
+Template:table_cells
+!! text
+{{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
+!! endarticle
+
+!! article
+Template:PartialTable
+!! text
+{|
+|-
+!! endarticle
+
+!! article
+Template:image_attribs
+!! text
+<noinclude>
+[[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
+!! endarticle
+
+## See T48811 for details
+!! article
+Template:mixed_attr_content_template
+!! text
+style="color:red;" title="T48811"
+|-
+|foo
+!! endarticle
+
+!! article
+Template:definition_list
+!! text
+one
+::two
+!! endarticle
+
+!! article
+A?b
+!! text
+Weirdo titles!
+!! endarticle
+
+!!article
+Template:Bullet
+!!text
+* Bar
+!!endarticle
+
+!!article
+Template:OpenTable
+!!text
+{|
+!!endarticle
+
+!!article
+Template:EmptyLITest
+!!text
+*a
+*
+*
+*b
+!!endarticle
+
+!!article
+Template:EmptyTRTest
+!!text
+{|
+|-
+|-
+|foo
+|-
+|-
+|bar
+|}
+!!endarticle
+
+!!article
+Template:EmptyTRWithHTMLAttrTest
+!!text
+<table>
+<tr align="center"></tr>
+<tr><td>foo</td></tr>
+<tr align="center"></tr>
+<tr><td>bar</td></tr>
+</table>
+!!endarticle
+
+!! article
+Template:With: Colon
+!! text
+Template with colon
+!! endarticle
+
+###
+### Basic tests
+###
+
+!! test
+Blank input
+!! wikitext
+!! html
+!! end
+
+!! test
+Simple paragraph
+!! wikitext
+This is a simple paragraph.
+!! html
+<p>This is a simple paragraph.
+</p>
+!! end
+
+!! test
+Paragraphs with extra newline spacing
+!! wikitext
+foo
+
+bar
+
+
+baz
+
+
+
+booz
+!! html
+<p>foo
+</p><p>bar
+</p><p><br />
+baz
+</p><p><br />
+</p><p>booz
+</p>
+!! end
+
+!! test
+Paragraphs with newline spacing with comment lines in between
+!! wikitext
+----
+a
+<!--foo-->
+b
+----
+a
+<!--foo--><!--More than 1 comment, still stripped-->
+b
+----
+a
+ <!--foo--> <!----> <!-- bar -->
+b
+----
+a
+<!--foo-->
+
+b
+----
+a
+
+<!--foo-->
+b
+----
+a
+<!--foo-->
+
+
+b
+----
+a
+
+
+<!--foo-->
+b
+----
+!! html
+<hr />
+<p>a
+b
+</p>
+<hr />
+<p>a
+b
+</p>
+<hr />
+<p>a
+b
+</p>
+<hr />
+<p>a
+</p><p>b
+</p>
+<hr />
+<p>a
+</p><p>b
+</p>
+<hr />
+<p>a
+</p><p><br />
+b
+</p>
+<hr />
+<p>a
+</p><p><br />
+b
+</p>
+<hr />
+
+!! end
+
+!! test
+Paragraphs with newline spacing with non-empty white-space lines in between
+!! wikitext
+----
+a
+
+b
+----
+a
+
+
+b
+----
+!! html
+<hr />
+<p>a
+</p><p>b
+</p>
+<hr />
+<p>a
+</p><p><br />
+b
+</p>
+<hr />
+
+!! end
+
+!! test
+Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
+!! wikitext
+----
+a
+ <!--foo-->
+b
+----
+a
+ <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
+b
+----
+a
+
+<!--foo-->
+ <!--bar-->
+b
+----
+a
+
+ <!--foo-->
+ <!--bar-->
+
+b
+----
+!! html
+<hr />
+<p>a
+b
+</p>
+<hr />
+<p>a
+b
+</p>
+<hr />
+<p>a
+</p><p>b
+</p>
+<hr />
+<p>a
+</p><p><br />
+b
+</p>
+<hr />
+
+!! end
+
+!! test
+Extra newlines: More paragraphs with indented comment
+!! wikitext
+a
+
+ <!--boo-->
+
+b
+!! html
+<p>a
+</p><p><br />
+b
+</p>
+!!end
+
+!! test
+Extra newlines followed by heading
+!! wikitext
+a
+
+
+
+=b=
+[[a]]
+
+
+=b=
+!! html
+<p>a
+</p><p><br />
+</p>
+<h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<p><a href="/index.php?title=A&amp;action=edit&amp;redlink=1" class="new" title="A (page does not exist)">a</a>
+</p><p><br />
+</p>
+<h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+
+!! end
+
+!! test
+Extra newlines between heading and content are swallowed
+!! wikitext
+=b=
+
+
+
+[[a]]
+!! html
+<h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<p><a href="/index.php?title=A&amp;action=edit&amp;redlink=1" class="new" title="A (page does not exist)">a</a>
+</p>
+!! end
+
+!! test
+Heading with line break in nowiki
+!! options
+parsoid=wt2html
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+==A <nowiki>B
+C</nowiki>==
+!! html/php
+<h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
+C">A B
+C</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: A B&#10;C">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<h2 id="A_B
+C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
+C</span></h2>
+!! end
+
+!! test
+Parsing an URL
+!! wikitext
+http://fr.wikipedia.org/wiki/🍺
+<!-- EasterEgg we love beer, better be able be able to link to it -->
+!! html
+<p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
+</p>
+!! end
+
+!! test
+Simple list
+!! wikitext
+*Item 1
+*Item 2
+!! html
+<ul><li>Item 1</li>
+<li>Item 2</li></ul>
+
+!! end
+
+!! test
+Italics and bold
+!! wikitext
+*plain
+*plain''italic''plain
+*plain''italic''plain''italic''plain
+*plain'''bold'''plain
+*plain'''bold'''plain'''bold'''plain
+*plain''italic''plain'''bold'''plain
+*plain'''bold'''plain''italic''plain
+*plain''italic'''bold-italic'''italic''plain
+*plain'''bold''bold-italic''bold'''plain
+*plain'''''bold-italic'''italic''plain
+*plain'''''bold-italic''bold'''plain
+*plain''italic'''bold-italic'''''plain
+*plain'''bold''bold-italic'''''plain
+*plain l'''italic''plain
+*plain l''''bold''' plain
+!! html
+<ul><li>plain</li>
+<li>plain<i>italic</i>plain</li>
+<li>plain<i>italic</i>plain<i>italic</i>plain</li>
+<li>plain<b>bold</b>plain</li>
+<li>plain<b>bold</b>plain<b>bold</b>plain</li>
+<li>plain<i>italic</i>plain<b>bold</b>plain</li>
+<li>plain<b>bold</b>plain<i>italic</i>plain</li>
+<li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
+<li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
+<li>plain<i><b>bold-italic</b>italic</i>plain</li>
+<li>plain<b><i>bold-italic</i>bold</b>plain</li>
+<li>plain<i>italic<b>bold-italic</b></i>plain</li>
+<li>plain<b>bold<i>bold-italic</i></b>plain</li>
+<li>plain l'<i>italic</i>plain</li>
+<li>plain l'<b>bold</b> plain</li></ul>
+
+!! end
+
+# this example taken from the [[simple:Moon]] article (T49326)
+!! test
+Italics and possessives (1)
+!! wikitext
+obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
+!! html
+<p>obtained by <i><a href="/index.php?title=Lunar_Prospector&amp;action=edit&amp;redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
+</p>
+!! end
+
+# this example taken from [[en:Flaming Pie]] (T51926)
+!! test
+Italics and possessives (2)
+!! wikitext
+'''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
+!! html
+<p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
+</p>
+!! end
+
+# this example taken from [[en:Dictionary]] (T51926)
+!! test
+Italics and possessives (3)
+!! wikitext
+The first monolingual dictionary written in a Romance language was ''Sebastián Covarrubias''' ''Tesoro de la lengua castellana o española'', published in 1611 in Madrid. In 1612 the first edition of the ''Vocabolario dell'[[Accademia della Crusca]]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.
+!! html
+<p>The first monolingual dictionary written in a Romance language was <i>Sebastián Covarrubias'</i> <i>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i>Vocabolario dell'<a href="/index.php?title=Accademia_della_Crusca&amp;action=edit&amp;redlink=1" class="new" title="Accademia della Crusca (page does not exist)">Accademia della Crusca</a></i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i>Dictionnaire Universel</i>.
+</p>
+!! end
+
+
+###
+### 2-quote opening sequence tests
+###
+!! test
+Italics and bold: 2-quote opening sequence: (2,2)
+!! wikitext
+''foo''
+!! html
+<p><i>foo</i>
+</p>
+!!end
+
+!! test
+Italics and bold: 2-quote opening sequence: (2,3)
+!! wikitext
+''foo'''
+!! html/*
+<p><i>foo'</i>
+</p>
+!!end
+
+!! test
+Italics and bold: 2-quote opening sequence: (2,4)
+!! options
+parsoid=wt2html
+!! wikitext
+''foo''''
+!! html/*
+<p><i>foo''</i>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
+!! wikitext
+''foo<nowiki>''</nowiki>''
+!! html
+<p><i>foo''</i>
+</p>
+!! end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+Italics and bold: 2-quote opening sequence: (2,5)
+!! options
+parsoid=wt2html
+!! wikitext
+''foo'''''
+!! html/php
+<p><i>foo</i>
+</p>
+!! html/parsoid
+<p><i>foo</i><b></b>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
+!! wikitext
+''foo'''''<nowiki/>'''
+!! html/php
+<p><i>foo</i>
+</p>
+!! html/parsoid
+<p><i>foo</i><b></b>
+</p>
+!! end
+
+
+###
+### 3-quote opening sequence tests
+###
+
+!! test
+Italics and bold: 3-quote opening sequence: (3,2)
+!! wikitext
+'''foo''
+!! html/*
+<p>'<i>foo</i>
+</p>
+!!end
+
+!! test
+Italics and bold: 3-quote opening sequence: (3,3)
+!! wikitext
+'''foo'''
+!! html
+<p><b>foo</b>
+</p>
+!!end
+
+!! test
+Italics and bold: 3-quote opening sequence: (3,4)
+!! wikitext
+'''foo''''
+!! html/*
+<p><b>foo'</b>
+</p>
+!!end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+Italics and bold: 3-quote opening sequence: (3,5)
+!! options
+parsoid=wt2html
+!! wikitext
+'''foo'''''
+!! html/php
+<p><b>foo</b>
+</p>
+!! html/parsoid
+<p><b>foo</b><i></i>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
+!! wikitext
+'''foo'''''<nowiki/>''
+!! html/php
+<p><b>foo</b>
+</p>
+!! html/parsoid
+<p><b>foo</b><i></i>
+</p>
+!! end
+
+
+###
+### 4-quote opening sequence tests
+###
+
+!! test
+Italics and bold: 4-quote opening sequence: (4,2)
+!! options
+parsoid=wt2html
+!! wikitext
+''''foo''
+!! html/*
+<p>''<i>foo</i>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
+!! wikitext
+<nowiki>''</nowiki>''foo''
+!! html
+<p>''<i>foo</i>
+</p>
+!! end
+
+!! test
+Italics and bold: 4-quote opening sequence: (4,3)
+!! wikitext
+''''foo'''
+!! html/*
+<p>'<b>foo</b>
+</p>
+!!end
+
+!! test
+Italics and bold: 4-quote opening sequence: (4,4)
+!! options
+parsoid=wt2html
+!! wikitext
+''''foo''''
+!! html/*
+<p>'<b>foo'</b>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
+!! wikitext
+'<nowiki/>'''foo''''
+!! html
+<p>'<b>foo'</b>
+</p>
+!! end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+Italics and bold: 4-quote opening sequence: (4,5)
+!! options
+parsoid=wt2html
+!! wikitext
+''''foo'''''
+!! html/php
+<p>'<b>foo</b>
+</p>
+!! html/parsoid
+<p>'<b>foo</b><i></i>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
+!! wikitext
+'<nowiki/>'''foo'''''<nowiki/>''
+!! html/php
+<p>'<b>foo</b>
+</p>
+!! html/parsoid
+<p>'<b>foo</b><i></i>
+</p>
+!! end
+
+
+###
+### 5-quote opening sequence tests
+###
+
+!! test
+Italics and bold: 5-quote opening sequence: (5,2)
+!! options
+parsoid=wt2html
+!! wikitext
+'''''foo''
+!! html/*
+<p><b><i>foo</i></b>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 5-quote opening sequence: (5,2+3)
+!! wikitext
+'''''foo'''''
+!! html/*
+<p><i><b>foo</b></i>
+</p>
+!! end
+
+!! test
+Italics and bold: 5-quote opening sequence: (5,3)
+!! options
+parsoid=wt2html
+!! wikitext
+'''''foo'''
+!! html/*
+<p><i><b>foo</b></i>
+</p>
+!!end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 5-quote opening sequence: (5,3+2)
+!! wikitext
+'''''foo'''''
+!! html
+<p><i><b>foo</b></i>
+</p>
+!! end
+
+!! test
+Italics and bold: 5-quote opening sequence: (5,4)
+!! options
+parsoid=wt2html
+!! wikitext
+'''''foo''''
+!! html/*
+<p><i><b>foo'</b></i>
+</p>
+!!end
+
+!! test
+Italics and bold: 5-quote opening sequence: (5,5)
+!! wikitext
+'''''foo'''''
+!! html
+<p><i><b>foo</b></i>
+</p>
+!!end
+
+!! test
+Italics and bold: 5-quote opening sequence: (5,6)
+!! wikitext
+'''''foo''''''
+!! html/*
+<p><i><b>foo'</b></i>
+</p>
+!! end
+
+###
+### multiple quote sequences in a line
+###
+
+!! test
+Italics and bold: multiple quote sequences: (2,4,2)
+!! options
+parsoid=wt2html
+!! wikitext
+''foo''''bar''
+!! html/*
+<p><i>foo'<b>bar</b></i>
+</p>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
+!! wikitext
+''foo'<nowiki/>'''bar'''''
+!! html
+<p><i>foo'<b>bar</b></i>
+</p>
+!! end
+
+!! test
+Italics and bold: multiple quote sequences: (2,4,3)
+!! options
+parsoid=wt2html
+!! wikitext
+''foo''''bar'''
+!! html/*
+<p><i>foo'<b>bar</b></i>
+</p>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
+!! wikitext
+''foo'<nowiki/>'''bar'''''
+!! html
+<p><i>foo'<b>bar</b></i>
+</p>
+!! end
+
+!! test
+Italics and bold: multiple quote sequences: (2,4,4)
+!! options
+parsoid=wt2html
+!! wikitext
+''foo''''bar''''
+!! html/*
+<p><i>foo'<b>bar'</b></i>
+</p>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
+!! wikitext
+''foo'<nowiki/>'''bar'<nowiki/>'''''
+!! html
+<p><i>foo'<b>bar'</b></i>
+</p>
+!! end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+Italics and bold: multiple quote sequences: (3,4,2)
+!! options
+parsoid=wt2html
+!! wikitext
+'''foo''''bar''
+!! html/php
+<p><b>foo'</b>bar
+</p>
+!! html/parsoid
+<p><b>foo'</b>bar<i></i>
+</p>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
+!! wikitext
+'''foo''''bar''<nowiki/>''
+!! html/php
+<p><b>foo'</b>bar
+</p>
+!! html/parsoid
+<p><b>foo'</b>bar<i></i>
+</p>
+!! end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+Italics and bold: multiple quote sequences: (3,4,3)
+!! options
+parsoid=wt2html
+!! wikitext
+'''foo''''bar'''
+!! html/php
+<p><b>foo'</b>bar
+</p>
+!! html/parsoid
+<p><b>foo'</b>bar<b></b>
+</p>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
+!! wikitext
+'''foo''''bar'''<nowiki/>'''
+!! html/php
+<p><b>foo'</b>bar
+</p>
+!! html/parsoid
+<p><b>foo'</b>bar<b></b>
+</p>
+!! end
+
+###
+### other quote tests
+###
+!! test
+Italics and bold: other quote tests: (2,3,5)
+!! wikitext
+''this is about '''foo's family'''''
+!! html
+<p><i>this is about <b>foo's family</b></i>
+</p>
+!!end
+
+
+!! test
+Italics and bold: other quote tests: (2,(3,3),2)
+!! wikitext
+''this is about '''foo's''' family''
+!! html
+<p><i>this is about <b>foo's</b> family</i>
+</p>
+!!end
+
+
+!! test
+Italics and bold: other quote tests: (3,2,3,2)
+!! options
+parsoid=wt2html
+!! wikitext
+'''this is about ''foo'''s family''
+!! html/*
+<p><b>this is about <i>foo</i></b><i>s family</i>
+</p>
+!!end
+
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: other quote tests: (3,2,3+2+2,2)
+!! wikitext
+'''this is about ''foo'''''<nowiki/>''s family''
+!! html
+<p><b>this is about <i>foo</i></b><i>s family</i>
+</p>
+!! end
+
+
+!! test
+Italics and bold: other quote tests: (3,2,3,3)
+!! wikitext
+'''this is about ''foo'''s family'''
+!! html/*
+<p>'<i>this is about </i>foo<b>s family</b>
+</p>
+!!end
+
+
+!! test
+Italics and bold: other quote tests: (3,(2,2),3)
+!! wikitext
+'''this is about ''foo's'' family'''
+!! html
+<p><b>this is about <i>foo's</i> family</b>
+</p>
+!!end
+
+
+!! test
+Italicized possessive
+!! wikitext
+The ''[[Main Page]]'''s talk page.
+!! html/php
+<p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
+</p>
+!! html/parsoid
+<p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
+!! end
+
+!! test
+Quote balancing context should be restricted to td/th cells on the same wikitext line
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+{|
+!''a!!''b
+|''a||''b
+|}
+!! html+tidy
+<table>
+<tbody><tr>
+<th><i>a</i></th>
+<th><i>b</i>
+</th>
+<td><i>a</i></td>
+<td><i>b</i>
+</td></tr></tbody></table>
+!! end
+
+###
+### Non-html5 tags
+###
+
+!! test
+Non-html5 tags should be accepted
+!! wikitext
+<center>''foo''</center>
+<big>''foo''</big>
+<font>''foo''</font>
+<strike>''foo''</strike>
+<tt>''foo''</tt>
+!! html
+<center><i>foo</i></center>
+<p><big><i>foo</i></big>
+<font><i>foo</i></font>
+<strike><i>foo</i></strike>
+<tt><i>foo</i></tt>
+</p>
+!! end
+
+!! test
+<wbr> is valid wikitext (T54468)
+!! wikitext
+<wbr>
+!! html
+<p><wbr />
+</p>
+!! end
+
+# <strike> is HTML4, <s> is HTML4/5.
+!! test
+<s> or <strike> for strikethrough
+!! wikitext
+<strike>strike</strike>
+
+<s>s</s>
+!! html
+<p><strike>strike</strike>
+</p><p><s>s</s>
+</p>
+!! end
+
+## a not permitted
+## i,b,br omitted
+!! test
+Text-level semantic html elements in wikitext
+!! wikitext
+<em>text</em>
+<strong>text</strong>
+<small>text</small>
+<s>text</s>
+<cite>text</cite>
+<q>text</q>
+<dfn>text</dfn>
+<abbr>text</abbr>
+<data>text</data>
+<time>text</time>
+<code>text</code>
+<var>text</var>
+<samp>text</samp>
+<kbd>text</kbd>
+<sub>text</sub>
+<u>text</u>
+<mark>text</mark>
+<ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
+<bdi>text</bdi>
+<bdo>text</bdo>
+<span>text</span>
+<wbr />
+!! html
+<p><em>text</em>
+<strong>text</strong>
+<small>text</small>
+<s>text</s>
+<cite>text</cite>
+<q>text</q>
+<dfn>text</dfn>
+<abbr>text</abbr>
+<data>text</data>
+<time>text</time>
+<code>text</code>
+<var>text</var>
+<samp>text</samp>
+<kbd>text</kbd>
+<sub>text</sub>
+<u>text</u>
+<mark>text</mark>
+<ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
+<bdi>text</bdi>
+<bdo>text</bdo>
+<span>text</span>
+<wbr />
+</p>
+!! end
+
+# test cases taken from
+# https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
+!! test
+Ruby markup (W3C-style)
+!! wikitext
+;Mono-ruby for individual base characters
+:<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
+;Group ruby
+:<ruby>今日<rt>きょう</rt></ruby>
+;Jukugo ruby
+:<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
+;Inline ruby
+:<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
+;Double-sided ruby
+:<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
+
+<ruby>
+<rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
+<rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
+<rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
+</ruby>
+!! html
+<dl><dt>Mono-ruby for individual base characters</dt>
+<dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
+<dt>Group ruby</dt>
+<dd><ruby>今日<rt>きょう</rt></ruby></dd>
+<dt>Jukugo ruby</dt>
+<dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
+<dt>Inline ruby</dt>
+<dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
+<dt>Double-sided ruby</dt>
+<dd><ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby></dd></dl>
+<p><ruby>
+<rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
+<rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
+<rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
+</ruby>
+</p>
+!! end
+
+# The next two test different paths in the sanitizer.
+!! test
+Non-word characters don't terminate tag names (T19663, T42670, T54022)
+!! wikitext
+<blockquote|>a</blockquote>
+
+<b→> doesn't terminate </b→>
+
+<bä> doesn't terminate </bä>
+
+<boo> doesn't terminate </boo>
+
+<s.foo> doesn't terminate </s.foo>
+
+<sub-ID#1>
+!! html
+<p>&lt;blockquote|&gt;a&lt;/blockquote&gt;
+</p><p>&lt;b→&gt; doesn't terminate &lt;/b→&gt;
+</p><p>&lt;bä&gt; doesn't terminate &lt;/bä&gt;
+</p><p>&lt;boo&gt; doesn't terminate &lt;/boo&gt;
+</p><p>&lt;s.foo&gt; doesn't terminate &lt;/s.foo&gt;
+</p><p>&lt;sub-ID#1&gt;
+</p>
+!! end
+
+!! test
+Non-word characters don't terminate tag names
+!! wikitext
+<blockquote|>a</blockquote>
+
+<b→> doesn't terminate </b→>
+
+<bä> doesn't terminate </bä>
+
+<boo> doesn't terminate </boo>
+
+<s.foo> doesn't terminate </s.foo>
+
+<sub-ID#1>
+!! html+tidy
+<p>&lt;blockquote|&gt;a
+</p><p>&lt;b→&gt; doesn't terminate &lt;/b→&gt;
+</p><p>&lt;bä&gt; doesn't terminate &lt;/bä&gt;
+</p><p>&lt;boo&gt; doesn't terminate &lt;/boo&gt;
+</p><p>&lt;s.foo&gt; doesn't terminate &lt;/s.foo&gt;
+</p><p>&lt;sub-ID#1&gt;
+</p>
+!! end
+
+###
+### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
+### This checks that HTML5 tags (with non-word characters in the tag
+### name) make it safely through the parser -- the Sanitizer will
+### munge them later, as it should.
+###
+!! test
+Non-word characters are valid in extension tags (T19663)
+!! wikitext
+<tåg>tåg</tåg>
+!! html/php
+<pre>
+'tåg'
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+!! test
+Isolated close tags should be treated as literal text (T54760)
+!! options
+parsoid=wt2html
+!! wikitext
+</b>
+
+<s.foo>s</s>
+!! html/php+tidy
+<p class="mw-empty-elt">
+</p><p>&lt;s.foo&gt;s
+</p>
+!! html/parsoid
+<p>&lt;s.foo&gt;s</p>
+!! end
+
+###
+### Special characters
+###
+
+!! test
+Bare pipe character (T54363)
+!! wikitext
+|
+!! html
+<p>|
+</p>
+!! end
+
+!! test
+Bare pipe character from a template (T54363)
+!! wikitext
+{{pipe}}
+!! html
+<p>|
+</p>
+!! end
+
+###
+### <nowiki> test cases
+###
+
+!! test
+<nowiki> unordered list
+!! wikitext
+<nowiki>* This is not an unordered list item.</nowiki>
+!! html/php
+<p>* This is not an unordered list item.
+</p>
+!! html/parsoid
+<p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
+!! end
+
+!! test
+<nowiki> spacing
+!! wikitext
+<nowiki>Lorem ipsum dolor
+
+sed abit.
+ sed nullum.
+
+:and a colon
+</nowiki>
+!! html/php
+<p>Lorem ipsum dolor
+
+sed abit.
+ sed nullum.
+
+:and a colon
+
+</p>
+!! html/parsoid
+<p><span typeof="mw:Nowiki">Lorem ipsum dolor
+
+sed abit.
+ sed nullum.
+
+:and a colon
+</span></p>
+!! end
+
+!! test
+Don't parse <nowiki><span class="error"></nowiki> (T149622)
+!! wikitext
+<nowiki><span class="error"></nowiki>
+!! html/php
+<p>&lt;span class="error"&gt;
+</p>
+!! html/parsoid
+<p><span typeof="mw:Nowiki">&lt;span class="error"></span></p>
+!! end
+
+!! test
+nowiki 3
+!! wikitext
+:There is not nowiki.
+:There is <nowiki>nowiki</nowiki>.
+
+#There is not nowiki.
+#There is <nowiki>nowiki</nowiki>.
+
+*There is not nowiki.
+*There is <nowiki>nowiki</nowiki>.
+!! html/php
+<dl><dd>There is not nowiki.</dd>
+<dd>There is nowiki.</dd></dl>
+<ol><li>There is not nowiki.</li>
+<li>There is nowiki.</li></ol>
+<ul><li>There is not nowiki.</li>
+<li>There is nowiki.</li></ul>
+
+!! html/parsoid
+<dl><dd data-parsoid='{}'>There is not nowiki.</dd>
+<dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
+
+<ol><li data-parsoid='{}'>There is not nowiki.</li>
+<li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
+
+<ul><li data-parsoid='{}'>There is not nowiki.</li>
+<li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
+!! end
+
+!! test
+Entities inside <nowiki>
+!! wikitext
+<nowiki>&lt;</nowiki>
+!! html/php
+<p>&lt;
+</p>
+!! html/parsoid
+<p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&amp;lt;","srcContent":"&lt;"}'>&lt;</span></span></p>
+!! end
+
+!! test
+Entities inside template parameters
+!! wikitext
+{{echo|&ndash;}}
+!! html/php+tidy
+<p>&#8211;
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion mw:Entity" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&amp;ndash;"}},"i":0}}]}'>&ndash;</span></p>
+!! end
+
+!! test
+Properly escape nowiki when combined with other wiki markup
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>* &lt;/nowiki&gt; tag</p>
+!! wikitext
+<nowiki>*</nowiki> <nowiki>&lt;/nowiki&gt;</nowiki> tag
+!! end
+
+!! test
+T93824: Put escaped HTML tags inside nowiki
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;h2&gt;foo&lt;/h2&gt;</p>
+!! wikitext
+<nowiki><h2>foo</h2></nowiki>
+!! end
+
+!! test
+T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
+This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
+This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
+!! wikitext
+This text: L'[[Foo]]
+This text: L<nowiki>''</nowiki>[[Foo]]
+This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
+!! end
+
+# This test fails because wikitext whitespace is not normalized before comparing.
+!! test
+T71950: 2. Put nowiki as close to cause as possible, after ' :'
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
+</p>
+!! wikitext
+This text : L<nowiki>''</nowiki>[[Foo]]
+!! end
+
+# This test and the next one are html2wt only as they test that incorrect wikitext
+# passed in template arguments gets escaped or wrapped in nowikis where required.
+!! test
+T71482: Use {{!}} instead of nowiki for single pipe in template argument
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo|bar&quot;}},&quot;i&quot;:0}}]}" about="#mwt1"></span>
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo|bar |[[&quot;}},&quot;i&quot;:0}}]}" about="#mwt2"></p>
+!! wikitext
+{{echo|foo{{!}}bar}}
+{{echo|<nowiki>foo|bar |[[</nowiki>}}
+!! end
+
+!! test
+T53961: Output correct nowikis in template arguments
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;a [ b&quot;}},&quot;i&quot;:0}}]}" about="#mwt1"></span>
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;a }} b&quot;}},&quot;i&quot;:0}}]}" about="#mwt2"></span>
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;a [[ b&quot;}},&quot;i&quot;:0}}]}" about="#mwt3"></span>
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;a | {{ ]]&quot;}},&quot;i&quot;:0}}]}" about="#mwt4"></span>
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;a }&quot;}},&quot;i&quot;:0}}]}" about="#mwt5"></span></p>
+!! wikitext
+{{echo|a [ b}}
+{{echo|<nowiki>a }} b</nowiki>}}
+{{echo|<nowiki>a [[ b</nowiki>}}
+{{echo|<nowiki>a | {{ ]]</nowiki>}}
+{{echo|a <nowiki>}</nowiki>}}
+!! end
+
+!! test
+Cases where "!!" needs nowiki protection
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+<tr><th>this needs protection !! here</th></tr>
+</table>
+
+<table>
+<tr><th>this does not need
+protection !! here</th></tr>
+</table>
+!! wikitext
+{|
+!<nowiki>this needs protection !! here</nowiki>
+|}
+
+{|
+!this does not need
+protection !! here
+|}
+!! end
+
+###
+### Comments
+###
+!! test
+Comments and Indent-Pre
+!! wikitext
+<!-- comment 1 --> asdf
+
+<!-- comment 1 --> asdf
+<!-- comment 2 -->
+
+<!-- comment 1 --> asdf
+<!-- comment 2 -->xyz
+
+<!-- comment 1 --> asdf
+<!-- comment 2 --> xyz
+!! html
+<pre>asdf
+</pre>
+<pre>asdf
+</pre>
+<pre>asdf
+</pre>
+<p>xyz
+</p>
+<pre>asdf
+xyz
+</pre>
+!! end
+
+!! test
+Comment test 2a
+!! wikitext
+asdf
+<!-- comment 1 -->
+jkl
+!! html
+<p>asdf
+jkl
+</p>
+!! end
+
+!! test
+Comment test 2b
+!! wikitext
+asdf
+<!-- comment 1 -->
+
+jkl
+!! html
+<p>asdf
+</p><p>jkl
+</p>
+!! end
+
+!! test
+Comment test 3
+!! wikitext
+asdf
+<!-- comment 1 -->
+<!-- comment 2 -->
+jkl
+!! html
+<p>asdf
+jkl
+</p>
+!! end
+
+!! test
+Comment test 4
+!! wikitext
+asdf<!-- comment 1 -->jkl
+!! html
+<p>asdfjkl
+</p>
+!! end
+
+!! test
+Comment spacing
+!! wikitext
+a
+ <!-- foo --> b <!-- bar -->
+c
+!! html
+<p>a
+</p>
+<pre> b
+</pre>
+<p>c
+</p>
+!! end
+
+!! test
+Comment whitespace
+!! wikitext
+<!-- returns a single newline, not nothing, since the newline after > is not stripped -->
+!! html
+
+!! end
+
+!! test
+Comment semantics and delimiters
+!! wikitext
+<!-- --><!----><!-----><!------>
+!! html/php
+
+!! html/parsoid
+<!-- --><!----><!--&#x2D;--><!--&#x2D;&#x2D;-->
+!! end
+
+!! test
+Comment semantics and delimiters, redux
+!! wikitext
+<!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
+-- foo -- funky huh? ... -->
+!! html/php
+
+!! html/parsoid
+<!-- In SGML every "foo" here would actually show up in the text &#x2D;&#x2D; foo &#x2D;&#x2D; bar
+&#x2D;&#x2D; foo &#x2D;&#x2D; funky huh? ... -->
+!! end
+
+!! test
+Comment semantics and delimiters: directors cut
+!! wikitext
+<!-- ... However we like to keep things simple and somewhat XML-ish so we eat
+everything starting with < followed by !-- until the first -- and > we see,
+that wouldn't be valid XML however, since in XML -- has to terminate a comment
+-->-->
+!! html/php
+<p>--&gt;
+</p>
+!! html/parsoid
+<!-- ... However we like to keep things simple and somewhat XML&#x2D;ish so we eat
+everything starting with < followed by !&#x2D;&#x2D; until the first &#x2D;&#x2D; and &#x3E; we see,
+that wouldn't be valid XML however, since in XML &#x2D;&#x2D; has to terminate a comment
+--><p>--></p>
+!! end
+
+!! test
+Comment semantics: nesting
+!! wikitext
+<!--<!-- no, we're not going to do anything fancy here -->-->
+!! html/php
+<p>--&gt;
+</p>
+!! html/parsoid
+<!--<!&#x2D;&#x2D; no, we're not going to do anything fancy here --><p>--></p>
+!! end
+
+# Parsoid closes the unclosed comment, even if it means a slight
+# round-trip diff.
+!! test
+Comment semantics: unclosed comment at end
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<!--This comment will run out to the end of the document
+!! html/php
+
+!! html/parsoid
+<!--This comment will run out to the end of the document-->
+!! end
+
+!! test
+Comment semantics: normalize comments to play nice with XML and browsers
+!! wikitext
+<!-- Browsers --!> think this is closed -->
+<!--> This would normally be text -->
+<!---> As would this -->
+<!-- XML doesn't like trailing dashes -------->
+<!-- Nor doubled hyphens -- anywhere in the data -->
+But this is not a comment.
+!! html/php
+<p>But this is not a comment.
+</p>
+!! html/parsoid
+<!-- Browsers &#x2D;&#x2D;!&#x3E; think this is closed -->
+<!--&#x3E; This would normally be text -->
+<!--&#x2D;&#x3E; As would this -->
+<!-- XML doesn't like trailing dashes &#x2D;&#x2D;&#x2D;&#x2D;&#x2D;&#x2D;-->
+<!-- Nor doubled hyphens &#x2D;&#x2D; anywhere in the data -->
+<p>But this is not a comment.</p>
+!! end
+
+!! test
+Comment semantics: round-trip even text which contains encoded -->
+!! wikitext
+<!-- hello & goodbye - > --&gt; --&amp;gt; --&xx -->
+!! html/parsoid
+<!-- hello &#x26; goodbye &#x2D; &#x3E; &#x2D;&#x2D;&#x3E; &#x2D;&#x2D;&#x26;gt; &#x2D;&#x2D;&#x26;xx -->
+!! end
+
+!! test
+Comment in template title
+!! wikitext
+{{f<!---->oo}}
+!! html
+<p>FOO
+</p>
+!! end
+
+!! test
+Comment on its own line post-expand
+!! wikitext
+a
+{{blank}}<!---->
+b
+!! html
+<p>a
+</p><p>b
+</p>
+!! end
+
+!! test
+Comment on its own line post-expand with non-significant whitespace
+!! wikitext
+a
+ {{blank}} <!---->
+b
+!! html
+<p>a
+</p><p>b
+</p>
+!! end
+
+!! test
+Multiple comments should still parse as SOL-transparent
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+<!--c1-->*a
+<!--c2--><!--c3--><!--c4-->*b
+!! html/php
+<ul><li>a</li>
+<li>b</li></ul>
+
+!! html/parsoid
+<!--c1--><ul>
+<li>a
+</li>
+<!--c2--><!--c3--><!--c4-->
+<li>b
+</li>
+</ul>
+!! end
+
+## Make sure ">" gets escaped in comments to avoid XSS
+!! test
+IE conditional comments
+!! wikitext
+<!--[if lt IE 9]>
+ <script>alert('hi');</script>
+<![endif]-->
+!! html/parsoid
+<!--[if lt IE 9]&#x3E;
+ <script&#x3E;alert('hi');</script&#x3E;
+<![endif]-->
+!! end
+
+###
+### paragraph wrapping tests
+###
+
+!! test
+No block tags
+!! wikitext
+a
+
+b
+!! html
+<p>a
+</p><p>b
+</p>
+!! end
+
+!! test
+Block tag on one line (<div>)
+!! wikitext
+a <div>foo</div>
+
+b
+!! html
+a <div>foo</div>
+<p>b
+</p>
+!! html+tidy
+<p>a </p><div>foo</div>
+<p>b
+</p>
+!! end
+
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out during p-wrapping.
+!! test
+No p-wrappable content
+!! wikitext
+<span><div>x</div></span>
+<span><s><div>x</div></s></span>
+<small><em></em></small><span><s><div>x</div></s></span>
+!! html/php+tidy
+<span><div>x</div></span>
+<span><s><div>x</div></s></span>
+<p><small><em></em></small></p><span><s><div>x</div></s></span>
+!! html/parsoid
+<span><div>x</div></span>
+<span><s><div>x</div></s></span>
+<small><em></em></small><span><s><div>x</div></s></span>
+!! end
+
+# T177612: Parsoid-only test
+!! test
+Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
+!! wikitext
+{{echo|<span><div>x</div></span>}}
+x
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;span>&lt;div>x&lt;/div>&lt;/span>"}},"i":0}}]}'><div>x</div></span>
+<p>x</p>
+!! end
+
+!! test
+Block tag on one line (<blockquote>)
+!! wikitext
+a <blockquote>foo</blockquote>
+
+b
+!! html
+a <blockquote>foo</blockquote>
+<p>b
+</p>
+!! html+tidy
+<p>a </p><blockquote><p>foo</p></blockquote>
+<p>b
+</p>
+!! end
+
+!! test
+Block tag on both lines (<div>)
+!! wikitext
+a <div>foo</div>
+
+b <div>foo</div>
+!! html
+a <div>foo</div>
+b <div>foo</div>
+
+!! html+tidy
+<p>a </p><div>foo</div><p>
+b </p><div>foo</div>
+!! end
+
+!! test
+Block tag on both lines (<blockquote>)
+!! wikitext
+a <blockquote>foo</blockquote>
+
+b <blockquote>foo</blockquote>
+!! html
+a <blockquote>foo</blockquote>
+b <blockquote>foo</blockquote>
+
+!! html+tidy
+<p>a </p><blockquote><p>foo</p></blockquote><p>
+b </p><blockquote><p>foo</p></blockquote>
+!! end
+
+!! test
+Multiple lines without block tags
+!! wikitext
+<div>foo</div> a
+b
+c
+d<!--foo--> e
+x <div>foo</div> z
+!! html
+<div>foo</div> a
+<p>b
+c
+d e
+</p>
+x <div>foo</div> z
+
+!! html+tidy
+<div>foo</div><p> a
+</p><p>b
+c
+d e
+</p><p>
+x </p><div>foo</div><p> z
+</p>
+!! end
+
+# The difference between Parsoid & Remex here
+# is because of Parsoid's Tidy-emulation code
+# for p-wrapping. We'll start work to remove this
+# emulation code in Parsoid sooner than later.
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out in a separate pass.
+!! test
+Empty lines between lines with block tags
+!! wikitext
+<div></div>
+
+
+<div></div>a
+
+b
+<div>a</div>b
+
+<div>b</div>d
+
+
+<div>e</div>
+!! html
+<div></div>
+<p><br />
+</p>
+<div></div>a
+<p>b
+</p>
+<div>a</div>b
+<div>b</div>d
+<p><br />
+</p>
+<div>e</div>
+
+!! html+tidy
+<div></div>
+<p><br />
+</p>
+<div></div><p>a
+</p><p>b
+</p>
+<div>a</div><p>b
+</p><div>b</div><p>d
+</p><p><br />
+</p>
+<div>e</div>
+!! html/parsoid
+<div data-parsoid='{"stx":"html"}'></div>
+
+<p><br /></p>
+<div data-parsoid='{"stx":"html"}'></div><p>a</p>
+
+<p>b</p>
+<div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
+
+<div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
+
+<p><br /></p>
+<div data-parsoid='{"stx":"html"}'>e</div>
+!! end
+
+!! test
+Unclosed HTML p-tags should be handled properly
+!! wikitext
+<div><p>foo</div>
+a
+
+b
+!! html/php+tidy
+<div><p>foo</p></div>
+<p>a
+</p><p>b
+</p>
+!! html/parsoid
+<div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
+<p>a</p>
+<p>b</p>
+!! end
+
+## SSS FIXME: I can come up with other scenarios where this doesn't work because
+## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
+## them for now.
+!! test
+1. P-wrapping should leave sol-transparent tags outside p-tags where possible
+!! options
+parsoid=wt2html
+!! wikitext
+a [[Category:A1]] [[Category:A2]]
+[[Category:A3]]
+[[Category:A4]]
+!! html/parsoid
+<p>a</p>
+<link rel="mw:PageProp/Category" href="./Category:A1"/> <link rel="mw:PageProp/Category" href="./Category:A2"/> <link rel="mw:PageProp/Category" href="./Category:A3"/> <link rel="mw:PageProp/Category" href="./Category:A4"/>
+!! end
+
+!! test
+2. P-wrapping should leave sol-transparent tags outside p-tags where possible
+!! options
+parsoid=wt2html
+!! wikitext
+[[Category:A1]]a
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
+!! end
+
+!! test
+No paragraph necessary for SOL transparent template
+!! wikitext
+<span><div>foo</div></span>
+[[Category:Foo]]
+
+<span><div>foo</div></span>
+{{echo|[[Category:Foo]]}}
+!! html/php
+<span><div>foo</div></span>
+<span><div>foo</div></span>
+
+!! html/parsoid
+<span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
+<link rel="mw:PageProp/Category" href="./Category:Foo"/>
+
+<span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
+<link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]"}},"i":0}}]}'/>
+!! end
+
+!! test
+Avoid expanding multiline sol transparent template ranges unnecessarily
+!! wikitext
+hi
+
+
+{{echo|<br/>
+}}
+
+[[Category:Ho]]
+!! html/php
+<p>hi
+</p><p><br />
+<br />
+</p>
+!! html/parsoid
+<p>hi</p>
+
+<p><br />
+<br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;br/>\n"}},"i":0}}]}'/><span about="#mwt1">
+</span></p>
+
+<link rel="mw:PageProp/Category" href="./Category:Ho" />
+!! end
+
+###
+### Preformatted text
+###
+
+!! test
+Preformatted text
+!! wikitext
+ This is some
+ Preformatted text
+ With ''italic''
+ And '''bold'''
+ And a [[Main Page|link]]
+!! html
+<pre>This is some
+Preformatted text
+With <i>italic</i>
+And <b>bold</b>
+And a <a href="/wiki/Main_Page" title="Main Page">link</a>
+</pre>
+!! end
+
+!! test
+Tabs don't trigger preformatted text
+!! wikitext
+ This is not
+ preformatted text.
+ This is preformatted text.
+ So is this.
+!! html/php
+<p> This is not
+ preformatted text.
+</p>
+<pre>This is preformatted text.
+ So is this.
+</pre>
+!! html/parsoid
+<p> This is not
+ preformatted text.</p>
+<pre>This is preformatted text.
+ So is this.</pre>
+!! end
+
+!! test
+Space before tab needs nowiki pre protection
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p> a</p>
+!! wikitext
+<nowiki> </nowiki> a
+!! end
+
+!! test
+Ident preformatting with inline content
+!! wikitext
+ a
+ ''b''
+!! html
+<pre>a
+<i>b</i>
+</pre>
+!! end
+
+!! test
+<pre> with <nowiki> inside (compatibility with 1.6 and earlier)
+!! wikitext
+<pre><nowiki>
+<b>
+<cite>
+<em>
+</nowiki></pre>
+!! html
+<pre>
+&lt;b&gt;
+&lt;cite&gt;
+&lt;em&gt;
+</pre>
+
+!! end
+
+!! test
+Regression with preformatted in <center>
+!! wikitext
+<center>
+ Blah
+</center>
+!! html
+<center>
+<pre>Blah
+</pre>
+</center>
+
+!! end
+
+!! test
+T54763: Preformatted in <blockquote>
+!! wikitext
+<blockquote>
+ Blah
+{|
+|
+ indented cell (no pre-wrapping!)
+|}
+</blockquote>
+!! html
+<blockquote>
+<p> Blah
+</p>
+<table>
+<tr>
+<td>
+<p> indented cell (no pre-wrapping!)
+</p>
+</td></tr></table>
+</blockquote>
+
+!! end
+
+!! test
+T53086: Double newlines in blockquotes should be turned into paragraphs
+!! wikitext
+<blockquote>
+Foo
+
+Bar
+</blockquote>
+!! html
+<blockquote>
+<p>Foo
+</p><p>Bar
+</p>
+</blockquote>
+
+!! end
+
+!! test
+T17491: <ins>/<del> in blockquote
+!! wikitext
+<blockquote>
+Foo <del>bar</del> <ins>baz</ins> quux
+</blockquote>
+!! html
+<blockquote>
+<p>Foo <del>bar</del> <ins>baz</ins> quux
+</p>
+</blockquote>
+
+!! html+tidy
+<blockquote>
+<p>Foo <del>bar</del> <ins>baz</ins> quux
+</p>
+</blockquote>
+!! end
+
+!! test
+T17491: <ins>/<del> in blockquote (2)
+!! wikitext
+<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
+</blockquote>
+!! html
+<blockquote>Foo <del>bar</del> <ins>baz</ins> quux
+</blockquote>
+
+!! html+tidy
+<blockquote><p>Foo <del>bar</del> <ins>baz</ins> quux
+</p></blockquote>
+!! end
+
+!! test
+<pre> with attributes (T5202)
+!! wikitext
+<pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
+!! html
+<pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
+
+!! end
+
+!! test
+<pre> with width attribute (T5202)
+!! wikitext
+<pre width="8">Narrow screen goodies</pre>
+!! html
+<pre width="8">Narrow screen goodies</pre>
+
+!! end
+
+!! test
+<pre> with forbidden attribute (T5202)
+!! wikitext
+<pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
+!! html
+<pre width="8">Narrow screen goodies</pre>
+
+!! end
+
+!! test
+Entities inside <pre>
+!! wikitext
+<pre>&lt;</pre>
+!! html
+<pre>&lt;</pre>
+
+!! end
+
+!! test
+<pre> with forbidden attribute values (T5202)
+!! wikitext
+<pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
+!! html
+<pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
+
+!! end
+
+!! test
+<nowiki> inside <pre> (T15238)
+!! wikitext
+<pre>
+<nowiki>
+</pre>
+<pre>
+<nowiki></nowiki>
+</pre>
+<pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
+!! html
+<pre>
+&lt;nowiki&gt;
+</pre>
+<pre>
+
+</pre>
+<pre>&lt;nowiki&gt;Foo&lt;/nowiki&gt;</pre>
+
+!! end
+
+!! test
+<nowiki> inside of #tag:pre
+!! wikitext
+{{#tag:pre|Foo <nowiki>&rarr;bar</nowiki>}}
+!! html/php
+<pre>Foo &#8594;bar</pre>
+
+!! html/parsoid
+<pre about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:pre","function":"tag"},"params":{"1":{"wt":"Foo &lt;nowiki>&amp;rarr;bar&lt;/nowiki>"}},"i":0}}]}'>Foo <span typeof="mw:Entity">→</span>bar</pre>
+!! end
+
+## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
+## aren't enclosed in nowikis.
+!! test
+<nowiki> and <pre> preference (first one wins)
+!! options
+parsoid=wt2html
+!! wikitext
+<pre>
+<nowiki>
+</pre>
+</nowiki>
+</pre>
+
+<nowiki>
+<pre>
+<nowiki>
+</pre>
+</nowiki>
+</pre>
+
+!! html/php
+<pre>
+&lt;nowiki&gt;
+</pre>
+<p>&lt;/nowiki&gt;
+&lt;/pre&gt;
+</p><p>
+&lt;pre&gt;
+&lt;nowiki&gt;
+&lt;/pre&gt;
+
+&lt;/pre&gt;
+</p>
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n&lt;nowiki>\n"}}'>&lt;nowiki>
+</pre>
+<p>&lt;/nowiki></p>
+
+
+<p><span typeof="mw:Nowiki">
+&lt;pre>
+&lt;nowiki>
+&lt;/pre>
+</span></p>
+!! end
+
+!! test
+</pre> inside nowiki
+!! wikitext
+<nowiki></pre></nowiki>
+!! html
+<p>&lt;/pre&gt;
+</p>
+!! end
+
+!! test
+Empty pre; pre inside other HTML tags (T56946)
+!! wikitext
+a
+
+<div><pre>
+foo
+</pre></div>
+<pre></pre>
+!! html/php+tidy
+<p>a
+</p>
+<div><pre>foo
+</pre></div>
+<pre></pre>
+!! html/parsoid
+<p>a</p>
+
+<div data-parsoid='{"stx":"html"}'><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
+</pre></div>
+<pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
+!! end
+
+!! test
+HTML pre followed by indent-pre
+!! wikitext
+<pre>foo</pre>
+ bar
+!! html
+<pre>foo</pre>
+<pre>bar
+</pre>
+!! end
+
+!! test
+Block tag pre
+!! wikitext
+<p><pre>foo</pre></p>
+!! html/php+tidy
+<p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
+!! html/parsoid
+<p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
+!! end
+
+!!test
+Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
+!! wikitext
+ {{echo|}}
+!! html
+
+!!end
+
+!!test
+Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
+!! wikitext
+ {{echo|
+foo}}
+!! html
+<p>foo
+</p>
+!!end
+
+!! test
+Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
+!! wikitext
+ {{echo|a
+b}}
+!! html
+<pre>a
+</pre>
+<p>b
+</p>
+!!end
+
+!! test
+Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
+!! wikitext
+ {{echo|a
+b
+c
+ d
+e
+}}
+!! html
+<pre>a
+</pre>
+<p>b
+c
+</p>
+<pre>d
+</pre>
+<p>e
+</p>
+!!end
+
+!!test
+Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
+!! wikitext
+{{echo| foo}}
+
+{{echo| foo}}{{echo| bar}}
+
+{{echo| foo}}
+{{echo| bar}}
+
+{{echo|<!--cmt--> foo}}
+
+<!--cmt-->{{echo| foo}}
+
+{{echo|{{echo| }}bar}}
+!! html
+<pre>foo
+</pre>
+<pre>foo bar
+</pre>
+<pre>foo
+bar
+</pre>
+<pre>foo
+</pre>
+<pre>foo
+</pre>
+<pre>bar
+</pre>
+!!end
+
+!! test
+Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
+!! wikitext
+{{echo| }}a
+
+{{echo|
+ }}a
+
+{{echo|
+ b}}
+
+{{echo|a
+ }}b
+
+{{echo|a
+}} b
+!! html
+<pre>a
+</pre>
+<p><br />
+</p>
+<pre>a
+</pre>
+<p><br />
+</p>
+<pre>b
+</pre>
+<p>a
+</p>
+<pre>b
+</pre>
+<p>a
+</p>
+<pre>b
+</pre>
+!!end
+
+## Hmm, should Parsoid rt this?
+!! test
+Pres with newline attributes
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<pre class="one
+two">hi</pre>
+!! html/php
+<pre class="one two">hi</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
+!! end
+
+!! test
+Things that look like <pre> tags aren't treated as such
+!! wikitext
+Barack Obama <President> of the United States
+<President></President>
+!! html
+<p>Barack Obama &lt;President&gt; of the United States
+&lt;President&gt;&lt;/President&gt;
+</p>
+!! end
+
+!! test
+Handle broken pre-like tags (T66025)
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|<pre <pre>x</pre>}}
+
+<table><pre </table>
+!! html/php
+<pre>x</pre>
+<table>&lt;pre </table>
+
+!! html/php+tidy
+<pre>x</pre>
+&lt;pre <table></table>
+!! html/parsoid
+<pre about="#mwt1" typeof="mw:Transclusion mw:Extension/pre" data-parsoid='{"a":{"&lt;pre":null},"sa":{"&lt;pre":""},"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;pre &lt;pre>x&lt;/pre>"}},"i":0}}]}'>x</pre>
+
+
+<p>&lt;pre </p>
+
+<table></table>
+!! end
+
+!! test
+Parsoid: handle pre with space after attribute
+!! options
+parsoid=wt2html
+!! wikitext
+<pre style="width:50%;" >{{echo|foo}}</pre>
+!! html/php
+<pre style="width:50%;">{{echo|foo}}</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" style="width:50%;" data-mw='{"name":"pre","attrs":{"style":"width:50%;"},"body":{"extsrc":"{{echo|foo}}"}}'>{{echo|foo}}</pre>
+!! end
+
+# TODO / maybe: fix wt2wt for this
+!! test
+Parsoid: Don't paragraph-wrap fosterable content
+!! options
+parsoid=wt2html
+!! wikitext
+{|
+<td></td>
+<td></td>
+
+
+
+|}
+!! html
+<table>
+
+<tbody>
+<tr>
+<td></td>
+
+<td></td></tr>
+
+
+
+</tbody></table>
+!! end
+
+!! test
+Self-closed pre
+!! wikitext
+<pre />
+!! html/php
+<pre></pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
+!! end
+
+!! test
+Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
+!! options
+parsoid=wt2html
+!! wikitext
+{|
+<td>
+<td>
+</td>
+
+
+
+|}
+!! html
+<table>
+
+<tbody>
+<tr>
+<td></td>
+
+<td>
+</td></tr>
+
+
+
+</tbody></table>
+!! end
+
+
+#--------------------------------------------------------------------
+# Transclusion parameter whitespace stripping tests
+# Behavior is different for positional and named parameters
+#--------------------------------------------------------------------
+!! test
+Templates: Strip leading and trailing whitespace from named-param values
+!! wikitext
+{{echo|1= a }}
+
+{{echo|1= {{echo|b}} }}
+
+{{echo| 1 =
+ c }}
+
+{{echo| 1 =
+* d
+}}
+!! html
+<p>a
+</p><p>b
+</p><p>c
+</p>
+<ul><li>d</li></ul>
+
+!! end
+
+!! test
+Templates: Don't strip whitespace from positional-param values
+!! wikitext
+{{echo|a }}
+
+{{echo|{{echo|b}} }}
+
+{{echo| c
+}}
+
+{{echo| {{echo|d}}
+}}
+
+{{echo|
+ e}}
+
+{{echo|
+*f}}
+
+{{echo|
+ }}g
+!! html
+<p>a
+</p><p>b
+</p>
+<pre>c
+</pre>
+<p><br />
+</p>
+<pre>d
+</pre>
+<p><br />
+</p>
+<pre>e
+</pre>
+<p><br />
+</p>
+<ul><li>f</li></ul>
+<p><br />
+</p>
+<pre>g
+</pre>
+!! end
+
+!! test
+Templates: Don't recognize targets split by newlines
+!! options
+parsoid=wt2html
+!! wikitext
+{{ech
+o|foo}}
+!! html/php
+<p>{{ech
+o|foo}}
+</p>
+!! html/parsoid
+<p>{{ech
+o|foo}}</p>
+!! end
+
+!! test
+Templates: Recognize targets when newlines and comments don't split the target
+!! options
+parsoid=wt2html
+!! wikitext
+{{
+ <!--X--> ech<!--X-->o<!--X-->
+ <!--X--> <!--X-->
+
+ |foo}}
+!! html/php
+<p>foo
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"ech&lt;!--X-->o&lt;!--X--> \n &lt;!--X--> &lt;!--X-->\n\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+!! end
+
+!! test
+Templates: Handle empty comment-and-ws-only lines correctly
+!! wikitext
+{{echo|foo
+<!--should be ignored-->
+ <!--should be ignored as well-->
+bar}}
+!! html/php
+<p>foo
+bar
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n&lt;!--should be ignored-->\n &lt;!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
+!! end
+
+!! test
+Templates: Handle comments in the target
+!! wikitext
+{{echo
+<!-- should be ignored -->
+|foo}}
+
+{{echo
+<!-- should be ignored and spaces on next line should not trip us up (T147742) -->
+ |foo}}
+
+{{echo<!-- should be ignored -->
+|foo}}
+
+{{echo<!-- should be ignored -->|foo}}
+
+{{<!-- should be ignored -->echo|foo}}
+!! html/php
+<p>foo
+</p><p>foo
+</p><p>foo
+</p><p>foo
+</p><p>foo
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n&lt;!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n&lt;!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n ","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo&lt;!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo&lt;!-- should be ignored -->","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+!! end
+
+!! test
+Templates: Handle comments in parameter names (T69657)
+!! wikitext
+{{echo|1
+<!-- should be ignored -->
+=foo}}
+
+{{echo|
+<!-- should be ignored -->
+1 = foo}}
+
+{{echo|1<!-- should be ignored -->=foo}}
+
+{{echo|<!-- should be ignored -->1=foo}}
+!! html/php
+<p>foo
+</p><p>foo
+</p><p>foo
+</p><p>foo
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n&lt;!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"&lt;!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1&lt;!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
+
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"&lt;!-- should be ignored -->1"}}},"i":0}}]}'>foo</p>
+!! end
+
+!! test
+Templates: Other wikitext in parameter names (T69657)
+!! wikitext
+{{echo|''1''=foo}}
+!! html/php
+<p>{{{1}}}
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"&#39;&#39;1&#39;&#39;":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
+!! end
+
+!! test
+Templates: With colons
+!! wikitext
+{{With: Colon}}
+!! html/php
+<p>Template with colon
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"With: Colon","href":"./Template:With:_Colon"},"params":{},"i":0}}]}'>Template with colon</p>
+!! end
+
+#--------------------------------------------------------------------
+# Transclusion parameter escaping tests
+#--------------------------------------------------------------------
+
+!! test
+Templates: Parsoid parameter escaping test 1
+!! wikitext
+{{echo|[foo]|{{echo|[bar]}}}}
+!! html/php+tidy
+<p>[foo]
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion"
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
+!! end
+
+!! test
+Parsoid: Pipes in external links in template parameter
+!! wikitext
+{{echo|[{{echo|http://example.com}} link]}}
+!! html/php+tidy
+<p><a rel="nofollow" class="external text" href="http://example.com">link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com" about="#mwt31" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{echo|http://example.com}} link]"}},"i":0}}]}'>link</a></p>
+!! end
+
+!! test
+Parsoid: pipe in transclusion parameter
+!! wikitext
+{{echo|http://foo.com/a&#124;b}}
+!! html/php+tidy
+<p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a&amp;#124;b"}},"i":0}}]}'>http://foo.com/a%7Cb</a></p>
+!! end
+
+!! test
+Parsoid: Pipe in external link target and content in template parameter
+!! options
+parsoid=html2wt,wt2wt
+!! wikitext
+{{echo|[http://foo.com/a&#124;b a&#124;b]}}
+!! html/php+tidy
+<p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a&#124;b</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
+typeof="mw:Transclusion"
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
+"params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
+!! end
+
+!! test
+Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
+!! options
+parsoid
+!! wikitext
+{{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
+!! html
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]"}},"i":0}}]}'>[Main Page bar]</p>
+!! end
+
+!! test
+Templates: Don't escape already nowiki-escaped text in template parameters
+!! options
+parsoid=html2wt,wt2wt
+!! wikitext
+{{echo|foo<nowiki>|</nowiki>bar}}
+{{echo|<nowiki>&lt;div&gt;</nowiki>}}
+{{echo|<nowiki></nowiki>}}
+!! html/php+tidy
+<p>foo|bar
+&lt;div&gt;
+
+</p>
+!! html/parsoid
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<nowiki>|</nowiki>bar"}},"i":0}}]}'}'>foo</span><span typeof="mw:Nowiki" about="#mwt1">|</span><span about="#mwt1">bar</span>
+<span typeof="mw:Transclusion mw:Nowiki" about="#mwt2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki>&amp;lt;div&amp;gt;</nowiki>"}},"i":0}}]}'><span typeof="mw:Entity">&lt;</span>div<span typeof="mw:Entity">&gt;</span></span>
+<span typeof="mw:Transclusion mw:Nowiki" about="#mwt3" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<nowiki></nowiki>"}},"i":0}}]}'></span>
+</p>
+!! end
+
+## T54824
+!! test
+Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
+!! options
+parsoid=html2wt,wt2wt
+!! wikitext
+{{echo|{{echo|1=bar}}}}
+!! html/php+tidy
+<p>bar
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{echo|1=bar}}"}},"i":0}}]}'>bar</p>
+!! end
+
+## T58733
+!! test
+Templates parameters with special tokenizing behavior dont get modified because of arg escaping
+!! wikitext
+{{echo|a : b}}
+!! html/php+tidy
+<p>a&#160;: b
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a : b"}},"i":0}}]}'>a<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"isDisplayHack":true}'> </span>: b</p>
+!! end
+
+## T73412
+!! test
+Templates: Preserve blank parameter names
+!! wikitext
+{{echo|=foo}}
+!! html/php+tidy
+<p>{{{1}}}
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
+!! end
+
+!! test
+Templates: Preserve blank parameter names in other positions
+!! wikitext
+{{blank_param|bar|=foo}}
+!! html/php+tidy
+<p>bar
+foo
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"blank_param","href":"./Template:Blank_param"},"params":{"1":{"wt":"bar"},"":{"wt":"foo"}},"i":0}}]}'>bar
+foo</p>
+!! end
+
+###
+### Parsoid-centric tests for testing RT edge cases for pre
+###
+
+!!test
+1a. Indent-Pre and Comments
+!! wikitext
+ a
+<!--a-->
+c
+!! html
+<pre>a
+</pre>
+<p>c
+</p>
+!!end
+
+!!test
+1b. Indent-Pre and Comments
+!! wikitext
+ a
+ <!--a-->
+c
+!! html
+<pre>a
+</pre>
+<p>c
+</p>
+!!end
+
+!!test
+1c. Indent-Pre and Comments
+!! wikitext
+<!--a--> a
+
+ <!--a--> a
+!! html
+<pre> a
+</pre>
+<pre> a
+</pre>
+!!end
+
+!!test
+1d. Indent-Pre and Comments
+(Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
+!! wikitext
+<!--a--> a
+
+ <!--b-->b
+!! html
+<pre>a
+</pre>
+<pre>b
+</pre>
+!!end
+
+!!test
+2a. Indent-Pre and tables
+!! wikitext
+ {|
+ |-
+ !h1!!h2
+ |foo||bar
+ |}
+!! html
+<table>
+
+<tr>
+<th>h1</th>
+<th>h2
+</th>
+<td>foo</td>
+<td>bar
+</td></tr></table>
+
+!!end
+
+!!test
+2b. Indent-Pre and tables
+!! wikitext
+ {|
+ |-
+|foo
+|}
+!! html
+<table>
+
+<tr>
+<td>foo
+</td></tr></table>
+
+!!end
+
+!!test
+2c. Indent-Pre and tables (T44252)
+!! wikitext
+{|
+ |+foo
+ ! |bar
+|}
+!! html
+<table>
+<caption>foo
+</caption>
+<tr>
+<th>bar
+</th></tr></table>
+
+!!end
+
+!!test
+2d. Indent-Pre and tables
+!! wikitext
+ a
+ {|
+ |b
+ |}
+!! html/php
+<pre>a
+</pre>
+<table>
+<tr>
+<td>b
+</td></tr></table>
+
+!! html/parsoid
+<pre>a</pre>
+ <table>
+ <tbody><tr><td> b</td></tr>
+ </tbody></table>
+!!end
+
+!!test
+2e. Indent-Pre and table-line syntax
+!! wikitext
+ a
+ | b
+ | c
+!! html/php
+<pre>a
+| b
+| c
+</pre>
+!!end
+
+!!test
+2f. Indent-pre started by table-line syntax
+!! wikitext
+a
+ | b
+ | c
+!! html/php
+<p>a
+</p>
+<pre>| b
+| c
+</pre>
+!! html/parsoid
+<p>a</p>
+<pre>
+| b
+| c</pre>
+!!end
+
+!! test
+2g. Indented table markup mixed with indented pre content (proposed in T8200)
+!! wikitext
+ <table>
+ <tr>
+ <td>
+ Text that should be rendered preformatted
+ </td>
+ </tr>
+ </table>
+!! html
+ <table>
+ <tr>
+ <td>
+<pre>Text that should be rendered preformatted
+</pre>
+ </td>
+ </tr>
+ </table>
+
+!! end
+
+!!test
+3a. Indent-Pre and block tags (single-line html)
+!! wikitext
+ a <p> foo </p>
+ b <div> foo </div>
+ c <blockquote> foo </blockquote>
+ <span> foo </span>
+!! html
+ a <p> foo </p>
+ b <div> foo </div>
+ c <blockquote> foo </blockquote>
+<pre><span> foo </span>
+</pre>
+!! html/parsoid
+ <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
+ <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
+ <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
+<pre><span> foo </span>
+</pre>
+!! html/php+tidy
+<p> a </p><p> foo </p><p>
+ b </p><div> foo </div><p>
+ c </p><blockquote><p> foo </p></blockquote>
+<pre><span> foo </span>
+</pre>
+!! end
+
+!!test
+3b. Indent-Pre and block tags (multi-line html)
+!! wikitext
+ a <span>foo</span>
+ b <div> foo </div>
+!! html
+<pre>a <span>foo</span>
+</pre>
+ b <div> foo </div>
+
+!! html/parsoid
+<pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
+ b <div data-parsoid='{"stx":"html"}'> foo </div>
+!! html/php+tidy
+<pre>a <span>foo</span>
+</pre><p>
+ b </p><div> foo </div>
+!!end
+
+!!test
+3c. Indent-Pre and block tags (pre-content on separate line)
+!! wikitext
+<p>
+ foo
+</p>
+
+<div>
+ foo
+</div>
+
+<center>
+ foo
+</center>
+
+<blockquote>
+ foo
+</blockquote>
+
+<blockquote>
+<pre>
+foo
+</pre>
+</blockquote>
+
+<table><tr><td>
+ foo
+</td></tr></table>
+
+<ul><li>
+ foo
+</li></ul>
+
+!! html
+<p>
+ foo
+</p>
+<div>
+<pre>foo
+</pre>
+</div>
+<center>
+<pre>foo
+</pre>
+</center>
+<blockquote>
+<p> foo
+</p>
+</blockquote>
+<blockquote>
+<pre>
+foo
+</pre>
+</blockquote>
+<table><tr><td>
+<pre>foo
+</pre>
+</td></tr></table>
+<ul><li>
+ foo
+</li></ul>
+
+!!end
+
+!! test
+4. Indent-Pre and extension tags
+!! wikitext
+ a <tag />
+!! html/php
+ a <pre>
+NULL
+array (
+)
+</pre>
+
+!! html/parsoid
+ a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
+!! end
+
+!! test
+5. Indent-Pre and html pre
+!! wikitext
+ <pre class="123">hi</pre>
+!! html/php
+ <pre class="123">hi</pre>
+
+!! html/parsoid
+ <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
+!! end
+
+!!test
+Render paragraphs when indent-pre is suppressed in blocklevels
+!! wikitext
+<blockquote>
+ foo
+
+ bar
+</blockquote>
+!! html
+<blockquote>
+<p> foo
+</p><p> bar
+</p>
+</blockquote>
+
+!!end
+
+!!test
+4. Multiple spaces at start-of-line
+!! wikitext
+ <p> foo </p>
+ foo
+ {|
+|foo
+|}
+!! html
+ <p> foo </p>
+<pre> foo
+</pre>
+<table>
+<tr>
+<td>foo
+</td></tr></table>
+
+!!end
+
+## NOTE: the leading white-space chars on empty line are significant
+!! test
+5a. White-space in indent-pre
+!! wikitext
+ a<br />
+
+ b
+!! html
+<pre>a<br />
+
+b
+</pre>
+!! end
+
+## NOTE: the leading white-space chars on empty line are significant
+!! test
+5b. White-space in indent-pre
+!! wikitext
+ a
+
+ b
+
+
+ c
+!! html
+<pre>a
+
+b
+
+
+c
+</pre>
+!! end
+
+!! test
+5c. White-space in indent-pre
+!! wikitext
+ ''a''
+ ''b''
+ ''c''
+!! html
+<pre><i>a</i>
+ <i>b</i>
+ <i>c</i>
+</pre>
+!! end
+
+!! test
+6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
+!! wikitext
+ a
+
+ <!-- continue -->
+ b
+
+ c
+
+d
+!! html
+<pre>a
+
+b
+</pre>
+<pre>c
+
+</pre>
+<p>d
+</p>
+!! end
+
+!! test
+7a. Indent-pre and category links
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+ [[Category:foo]] <!-- No pre-wrapping -->
+{{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
+!! html/php+tidy
+!! html/parsoid
+ <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre&#x2D;wrapping -->
+<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre&#x2D;wrapping -->
+!! end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+!! test
+7b. Indent-pre and category links
+!! options
+parsoid=wt2html
+!! wikitext
+ [[Category:foo]] a
+ [[Category:foo]] {{echo|b}}
+!! html/parsoid
+<pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
+ <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
+!! end
+
+!! test
+Indent-Pre: Newlines in comments shouldn't affect sol state
+!! wikitext
+a <!--
+foo
+--> b
+!! html/php+tidy
+<p>a b
+</p>
+!! html/parsoid
+<p>a <!--
+foo
+--> b</p>
+!! end
+
+###
+### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
+###
+
+!!test
+HTML-pre: 1. embedded newlines
+!! wikitext
+<pre>foo</pre>
+
+<pre>
+foo
+</pre>
+
+<pre>
+
+foo
+</pre>
+
+<pre>
+
+
+foo
+</pre>
+!! html/php+tidy
+<pre>foo</pre>
+<pre>foo
+</pre>
+<pre>
+
+foo
+</pre>
+<pre>
+
+
+foo
+</pre>
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
+
+<pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
+</pre>
+
+<pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
+
+foo
+</pre>
+
+<pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
+
+
+foo
+</pre>
+!!end
+
+!! test
+HTML-pre: big spaces
+!! wikitext
+<pre>
+
+
+
+
+haha
+
+
+
+
+haha
+
+
+
+
+</pre>
+!! html/php+tidy
+<pre>
+
+
+
+
+haha
+
+
+
+
+haha
+
+
+
+
+</pre>
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\n\n\nhaha\n\n\n\n\nhaha\n\n\n\n\n"}}'>
+
+
+
+
+haha
+
+
+
+
+haha
+
+
+
+
+</pre>
+!! end
+
+!!test
+HTML-pre: 2: indented text
+!! wikitext
+<pre>
+ foo
+</pre>
+!! html
+<pre>
+ foo
+</pre>
+
+!!end
+
+!!test
+HTML-pre: 3: other wikitext
+!! wikitext
+<pre>
+* foo
+# bar
+= no-h =
+'' no-italic ''
+[[ NoLink ]]
+</pre>
+!! html/php
+<pre>
+* foo
+# bar
+= no-h =
+'' no-italic ''
+[[ NoLink ]]
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n* foo\n# bar\n= no-h =\n&#39;&#39; no-italic &#39;&#39;\n[[ NoLink ]]\n"}}'>* foo
+# bar
+= no-h =
+'' no-italic ''
+[[ NoLink ]]
+</pre>
+!!end
+
+###
+### Definition lists
+###
+!! test
+Simple definition
+!! wikitext
+;name :Definition
+!! html
+<dl><dt>name&#160;</dt>
+<dd>Definition</dd></dl>
+
+!! end
+
+!! test
+Definition list for indentation only
+!! wikitext
+:Indented text
+!! html
+<dl><dd>Indented text</dd></dl>
+
+!! end
+
+!! test
+Definition list with no space
+!! wikitext
+;name:Definition
+!! html
+<dl><dt>name</dt>
+<dd>Definition</dd></dl>
+
+!!end
+
+!! test
+Definition list with URL link
+!! wikitext
+;http://example.com/ :definition
+!! html
+<dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>&#160;</dt>
+<dd>definition</dd></dl>
+
+!! end
+
+!! test
+Definition list with bracketed URL link
+!! wikitext
+;[http://www.example.com/ Example]:Something about it
+!! html
+<dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
+<dd>Something about it</dd></dl>
+
+!! end
+
+!! test
+Definition list with wikilink containing colon
+!! wikitext
+; [[Help:FAQ]]:The least-read page on Wikipedia
+!! html
+<dl><dt><a href="/index.php?title=Help:FAQ&amp;action=edit&amp;redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt>
+<dd>The least-read page on Wikipedia</dd></dl>
+
+!! end
+
+# At Brion's and JeLuF's insistence... :)
+!! test
+Definition list with news link containing colon
+!! wikitext
+;news:alt.wikipedia.rox: This isn't even a real newsgroup!
+!! html/php
+<dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
+<dd>This isn't even a real newsgroup!</dd></dl>
+
+!! html/parsoid
+<dl><dt> <a rel="mw:ExtLink" class="external free" href="news:alt.wikipedia.rox" data-parsoid='{"stx":"url"}'>news:alt.wikipedia.rox</a></dt><dd data-parsoid='{"stx":"row"}'>This isn't even a real newsgroup!</dd></dl>
+!! end
+
+!! test
+Malformed definition list with colon
+!! wikitext
+; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
+!! html
+<dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop</dt></dl>
+
+!! end
+
+!! test
+Definition lists: colon in external link text
+!! wikitext
+;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
+!! html
+<dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia&#160;:The Next Generation</a>&#160;</dt>
+<dd>OK, I made that up</dd></dl>
+
+!! end
+
+!! test
+Definition lists: colon in HTML attribute
+!! wikitext
+;<b style="display: inline">bold</b>
+!! html
+<dl><dt><b style="display: inline">bold</b></dt></dl>
+
+!! end
+
+!! test
+Definition lists: self-closed tag
+!! wikitext
+;one<br/>two :two-line fun
+!! html
+<dl><dt>one<br />two&#160;</dt>
+<dd>two-line fun</dd></dl>
+
+!! end
+
+!! test
+Definition lists: ignore colons inside tags
+!! wikitext
+;one <b>two : tag <i>fun:</i>:</b>:def
+!! html
+<dl><dt>one <b>two&#160;: tag <i>fun:</i>:</b></dt>
+<dd>def</dd></dl>
+
+!! end
+
+!! test
+Definition lists: excess closed tags
+!! wikitext
+;one</b>two :bad tag fun
+!! html/php+tidy
+<dl><dt>onetwo&#160;</dt>
+<dd>bad tag fun</dd></dl>
+!! html/parsoid
+<dl>
+<dt>onetwo</dt>
+<dd>bad tag fun</dd>
+</dl>
+!! end
+
+!! test
+T13748: Literal closing tags
+!! wikitext
+<dl>
+<dt>test 1</dt>
+<dd>test test test test test</dd>
+<dt>test 2</dt>
+<dd>test test test test test</dd>
+</dl>
+!! html
+<dl>
+<dt>test 1</dt>
+<dd>test test test test test</dd>
+<dt>test 2</dt>
+<dd>test test test test test</dd>
+</dl>
+
+!! end
+
+!! test
+Definition and unordered list using wiki syntax nested in unordered list using html tags.
+!! wikitext
+<ul><li>
+;term :description
+*unordered
+</li></ul>
+!! html
+<ul><li>
+<dl><dt>term&#160;</dt>
+<dd>description</dd></dl>
+<ul><li>unordered</li></ul>
+</li></ul>
+
+!! end
+
+!! test
+Definition list with empty definition and following paragraph
+!! wikitext
+;term:
+
+Paragraph text
+!! html
+<dl><dt>term</dt>
+<dd></dd></dl>
+<p>Paragraph text
+</p>
+!! end
+
+!! test
+Nested definition lists using html syntax
+!! wikitext
+<dl><dt>x</dt>
+<dd>a</dd>
+<dd>b</dd></dl>
+!! html
+<dl><dt>x</dt>
+<dd>a</dd>
+<dd>b</dd></dl>
+
+!! end
+
+!! test
+Definition Lists: No nesting: Multiple dd's
+!! wikitext
+;x
+:a
+:b
+!! html
+<dl><dt>x</dt>
+<dd>a</dd>
+<dd>b</dd></dl>
+
+!! end
+
+!! test
+Definition Lists: Indentation: Regular
+!! wikitext
+:i1
+::i2
+:::i3
+!! html
+<dl><dd>i1
+<dl><dd>i2
+<dl><dd>i3</dd></dl></dd></dl></dd></dl>
+
+!! end
+
+!! test
+Definition Lists: Indentation: Missing 1st level
+!! wikitext
+::i2
+:::i3
+!! html
+<dl><dd><dl><dd>i2
+<dl><dd>i3</dd></dl></dd></dl></dd></dl>
+
+!! end
+
+!! test
+Definition Lists: Indentation: Multi-level indent
+!! wikitext
+:::i3
+!! html
+<dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
+
+!! end
+
+!! test
+Definition Lists: Hacky use to indent tables
+!! wikitext
+::{|
+|foo
+|bar
+|}
+this text
+should be left alone
+!! html
+<dl><dd><dl><dd><table>
+<tr>
+<td>foo
+</td>
+<td>bar
+</td></tr></table></dd></dl></dd></dl>
+<p>this text
+should be left alone
+</p>
+!! end
+
+!! test
+Definition Lists: Hacky use to indent tables (with content following table)
+!! wikitext
+:{|
+|foo
+|bar
+|} <!--c1--> this text should be part of the dl
+!! html/php+tidy
+<dl><dd><table>
+<tbody><tr>
+<td>foo
+</td>
+<td>bar
+</td></tr></tbody></table> this text should be part of the dl</dd></dl>
+!! html/parsoid
+<dl><dd><table>
+<tbody><tr>
+<td>foo
+</td>
+<td>bar
+</td></tr></tbody></table> <!--c1--> this text should be part of the dl</dd></dl>
+!! end
+
+!! test
+Definition Lists: Hacky use to indent tables, with comments (T65979)
+!! wikitext
+<!-- foo -->
+::{|
+|foo
+|bar
+|}<!-- bar -->
+this text
+should be left alone
+!! html/parsoid
+<!-- foo -->
+<dl><dd><dl><dd><table><tr>
+<td>foo</td>
+<td>bar</td>
+</tr></table><!-- bar --></dd></dl></dd></dl>
+<p>this text
+should be left alone</p>
+!! end
+
+!! test
+Definition Lists: Hacky use to indent tables, with comment before table
+!! wikitext
+::<!-- foo -->{|
+|foo
+|}
+!! html/parsoid
+<dl><dd><dl><dd><!-- foo --><table><tr>
+<td>foo</td>
+</tr></table></dd></dl></dd></dl>
+!! end
+
+# The trailing whitespace in this test is to catch a regression in
+# Parsoid after T54473.
+!! test
+Definition Lists: Hacky use to indent tables (WS-insensitive)
+!! wikitext
+: {|
+|a
+|}
+!! html/php
+<dl><dd><table>
+<tr>
+<td>a
+</td></tr></table></dd></dl>
+
+!! html/parsoid
+<dl><dd> <table>
+<tbody><tr><td>a</td></tr>
+</tbody></table> </dd></dl>
+!! end
+
+## The PHP parser treats : items (dd) without a corresponding ; item (dt)
+## as an empty dt item. It also ignores all but the last ";" when followed
+## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
+## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
+## ";"s.
+##
+## Ex: ";;t2 ::d2" is transformed into:
+##
+## <dl>
+## <dt>t2 </dt>
+## <dd>
+## <dl>
+## <dt></dt>
+## <dd>d2</dd>
+## </dl>
+## </dd>
+## </dl>
+##
+## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
+## So, the same wikitext above (;;t2 ::d2) is transformed into:
+##
+## <dl>
+## <dt>
+## <dl>
+## <dt>t2 </dt>
+## <dd>:d2</dd>
+## </dl>
+## </dt>
+## </dl>
+##
+## All Parsoid only definition list tests have this difference.
+##
+## See also: https://phabricator.wikimedia.org/T8569
+## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
+
+!! test
+Table / list interaction: indented table with lists in table contents
+!! wikitext
+:{|
+|-
+|a
+
+*b
+|-
+|c
+
+*d
+|}
+!! html
+<dl><dd><table>
+
+<tr>
+<td>a
+<ul><li>b</li></ul>
+</td></tr>
+<tr>
+<td>c
+<ul><li>d</li></ul>
+</td></tr></table></dd></dl>
+
+!! end
+
+!!test
+Table / list interaction: lists nested in tables nested in indented lists
+!! wikitext
+:{|
+|
+:a
+:b
+|
+*c
+*d
+|}
+
+*e
+*f
+!! html
+<dl><dd><table>
+<tr>
+<td>
+<dl><dd>a</dd>
+<dd>b</dd></dl>
+</td>
+<td>
+<ul><li>c</li>
+<li>d</li></ul>
+</td></tr></table></dd></dl>
+<ul><li>e</li>
+<li>f</li></ul>
+
+!!end
+
+!! test
+Definition Lists: Nesting: Multi-level (Parsoid only)
+!! wikitext
+;t1 :d1
+;;t2 ::d2
+;;;t3 :::d3
+!! html/parsoid
+<dl>
+ <dt>t1 </dt>
+ <dd>d1</dd>
+ <dt>
+ <dl>
+ <dt>t2 </dt>
+ <dd>:d2</dd>
+ <dt>
+ <dl>
+ <dt>t3 </dt>
+ <dd>::d3</dd>
+ </dl>
+ </dt>
+ </dl>
+ </dt>
+</dl>
+
+
+!! end
+
+
+!! test
+Definition Lists: Nesting: Test 2
+!! wikitext
+;t1
+::d2
+!! html+tidy
+<dl><dt>t1</dt>
+<dd>
+<dl><dd>d2</dd></dl></dd></dl>
+!! end
+
+
+!! test
+Definition Lists: Nesting: Test 3
+!! wikitext
+:;t1
+::::d2
+!! html+tidy
+<dl><dd><dl><dt>t1</dt>
+<dd>
+<dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
+!! end
+
+
+!! test
+Definition Lists: Nesting: Test 4
+!! wikitext
+::;t3
+:::d3
+!! html
+<dl><dd><dl><dd><dl><dt>t3</dt>
+<dd>d3</dd></dl></dd></dl></dd></dl>
+
+!! end
+
+
+## The Parsoid team believes the following three test exposes a
+## bug in the PHP parser. (Parsoid team thinks the PHP parser is
+## wrong to close the <dl> after the <dt> containing the <ul>.)
+## It also exposes a "misfeature" in tidy, which doesn't like
+## <dl> tags with a single <dt> child; it converts the <dt> into
+## a <dd> in that case. (Parsoid leaves the <dt> alone!)
+!! test
+Definition Lists: Mixed Lists: Test 1
+!! wikitext
+:;*foo
+::*bar
+:;baz
+!! html/php
+<dl><dd><dl><dt><ul><li>foo</li>
+<li>bar</li></ul></dt></dl>
+<dl><dt>baz</dt></dl></dd></dl>
+
+!! html/php+tidy
+<dl><dd><dl><dt><ul><li>foo</li>
+<li>bar</li></ul></dt></dl>
+<dl><dt>baz</dt></dl></dd></dl>
+!! html/parsoid
+<dl>
+<dd><dl>
+<dt><ul>
+<li>foo
+</li>
+</ul></dt>
+<dd><ul>
+<li>bar
+</li>
+</ul></dd>
+<dt>baz</dt>
+</dl></dd>
+</dl>
+!! end
+
+!! test
+Definition Lists: Mixed Lists: Test 2
+!! wikitext
+*:d1
+*:d2
+!! html
+<ul><li><dl><dd>d1</dd>
+<dd>d2</dd></dl></li></ul>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 3
+!! wikitext
+*:::d1
+*:::d2
+!! html
+<ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
+<dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 4
+!! wikitext
+*;d1 :d2
+*;d3 :d4
+!! html
+<ul><li><dl><dt>d1&#160;</dt>
+<dd>d2</dd>
+<dt>d3&#160;</dt>
+<dd>d4</dd></dl></li></ul>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 5
+!! wikitext
+*:d1
+*::d2
+!! html
+<ul><li><dl><dd>d1
+<dl><dd>d2</dd></dl></dd></dl></li></ul>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 6
+!! wikitext
+#*:d1
+#*:::d3
+!! html
+<ol><li><ul><li><dl><dd>d1
+<dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 7
+!! wikitext
+:*d1
+:*d2
+!! html
+<dl><dd><ul><li>d1</li>
+<li>d2</li></ul></dd></dl>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 8
+!! wikitext
+:*d1
+::*d2
+!! html
+<dl><dd><ul><li>d1</li></ul>
+<dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 9
+!! wikitext
+*;foo :bar
+!! html
+<ul><li><dl><dt>foo&#160;</dt>
+<dd>bar</dd></dl></li></ul>
+
+!! end
+
+
+!! test
+Definition Lists: Mixed Lists: Test 10
+!! wikitext
+*#;foo :bar
+!! html
+<ul><li><ol><li><dl><dt>foo&#160;</dt>
+<dd>bar</dd></dl></li></ol></li></ul>
+
+!! end
+
+# The Parsoid team disagrees with the PHP parser's seemingly-random
+# rules regarding dd/dt on the next few tests. Parsoid is more
+# consistent, and recognizes the shared nesting and keeps the
+# still-open tags around until the nesting is complete.
+
+# This is a regression test for T175099
+!! test
+Definition Lists: Mixed Lists: Test 11
+!! wikitext
+;a
+:*b
+!! html/php
+<dl><dt>a</dt>
+<dd>
+<ul><li>b</li></ul></dd></dl>
+
+!! html/parsoid
+<dl><dt>a
+<dd><ul><li>b</li></ul></dd></dl>
+!! end
+
+# FIXME: Maybe get rid of this test?
+!! test
+Definition Lists: Mixed Lists: Test 12
+!! wikitext
+*#*#;*;;foo :bar
+*#*#;boo :baz
+!! html/php
+<ul><li><ol><li><ul><li><ol><li><dl><dt>foo&#160;</dt>
+<dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
+<dl><dt>boo&#160;</dt>
+<dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
+
+!! html/php+tidy
+<ul><li><ol><li><ul><li><ol><li><dl><dt>foo&#160;</dt>
+<dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
+<dl><dt>boo&#160;</dt>
+<dd>baz</dd></dl></li></ol></li></ul>
+!! html/parsoid
+<ul>
+<li>
+<ol>
+<li>
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>
+<ul>
+<li>
+<dl>
+<dt>
+<dl>
+<dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'>&nbsp;</span></dt>
+<dd data-parsoid='{"stx":"row"}'>bar</dd>
+</dl></dt>
+</dl></li>
+</ul></dt>
+<dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'>&nbsp;</span></dt>
+<dd data-parsoid='{"stx":"row"}'>baz</dd>
+</dl></li>
+</ol></li>
+</ul></li>
+</ol></li>
+</ul>
+!! end
+
+# FIXME: Maybe get rid of this test?
+# From whitelist:
+# * The test is wrong, there are two colons where there should be :;
+# * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
+!! test
+Definition Lists: Weird Ones: Test 1
+!! wikitext
+*#;*::;;foo :bar (who uses this?)
+!! html/php+tidy
+<ul><li><ol><li><dl><dt>foo&#160;</dt>
+<dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
+!! html/parsoid
+<ul>
+<li>
+<ol>
+<li>
+<dl>
+<dt>
+<ul>
+<li>
+<dl>
+<dd>
+<dl>
+<dd>
+<dl>
+<dt>
+<dl>
+<dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
+<dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
+</dl></dt>
+</dl></dd>
+</dl></dd>
+</dl></li>
+</ul></dt>
+</dl></li>
+</ol></li>
+</ul>
+!! end
+
+!! test
+Definition Lists: colons occurring in tags
+!! wikitext
+;a:b
+;'''a:b'''
+;<i>a:b</i>
+;<span>a:b</span>
+;<div>a:b</div>
+;<div>a
+:b</div>
+;{{echo|a:b}}
+;{{echo|''a:b''}}
+;;;''a:b''
+!! html+tidy
+<dl><dt>a</dt>
+<dd>b</dd>
+<dt><b>a:b</b></dt>
+<dt><i>a:b</i></dt>
+<dt><span>a:b</span></dt>
+<dt><div>a:b</div></dt>
+<dt><div>a</div></dt>
+<dd>b</dd>
+<dt>a</dt>
+<dd>b</dd>
+<dt><i>a:b</i></dt></dl>
+<dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
+!! html/parsoid
+<dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
+<dt><b>a:b</b></dt>
+<dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
+<dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
+<dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
+<dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
+<dd>b</dd>
+<dt><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a:b"}},"i":0}}]}'>a:b</span></dt>
+<dt><i about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&#39;&#39;a:b&#39;&#39;"}},"i":0}}]}'>a:b</i>
+<dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
+!! end
+
+# Parsoid's output differs here again because it shares
+# nesting between the two lists unlike the PHP parser.
+# Unsure which is more desirable.
+!! test
+Definition Lists: colons and tables 1
+!! wikitext
+:{|
+|x
+|}
+:{|
+|y
+|}
+!! html/php
+<dl><dd><table>
+<tr>
+<td>x
+</td></tr></table></dd></dl>
+<dl><dd><table>
+<tr>
+<td>y
+</td></tr></table></dd></dl>
+
+!! html/parsoid
+<dl><dd><table>
+<tr>
+<td>x
+</td></tr></table></dd>
+<dd><table>
+<tr>
+<td>y
+</td></tr></table></dd></dl>
+!! end
+
+# FIXME: Does this need a html/php section?
+!! test
+Definition Lists: template interaction
+!! wikitext
+::{{definition_list}}
+
+:one
+::{{definition_list}}
+:::two
+:::three
+::four
+!! html/parsoid
+<dl><dd><dl data-parsoid='{}'><dd about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[":",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}}]}'>one</dd><span about="#mwt1">
+</span><dd about="#mwt1">two</dd></dl></dd></dl>
+
+<dl><dd data-parsoid='{}'>one
+<dl><dd about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":["::",{"template":{"target":{"wt":"definition_list","href":"./Template:Definition_list"},"params":{},"i":0}},"\n:::two\n:::three"]}'>one</dd><span about="#mwt2">
+</span><dd about="#mwt2">two
+<dl><dd>two</dd>
+<dd>three</dd></dl></dd>
+<dd data-parsoid='{}'>four</dd></dl></dd></dl>
+!! end
+
+
+###
+### External links
+###
+!! test
+External links: non-bracketed
+!! wikitext
+Non-bracketed: http://example.com
+!! html
+<p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
+</p>
+!! end
+
+# parsoid doesn't explicitly mark autonumbered links, see T55505
+!! test
+External links: numbered
+!! wikitext
+Numbered: [http://example.com]
+Numbered: [http://example.net]
+Numbered: [http://example.com]
+!! html/php
+<p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
+Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
+Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
+</p>
+!! html/parsoid
+<p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
+Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
+Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
+!!end
+
+!! test
+External links: specified text
+!! wikitext
+Specified text: [http://example.com link]
+!! html
+<p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
+</p>
+!!end
+
+!! test
+External links: trail
+!! wikitext
+Linktrails should not work for external links: [http://example.com link]s
+!! html
+<p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
+</p>
+!! end
+
+!! test
+External links: dollar sign in URL
+!! wikitext
+http://example.com/1$2345
+!! html
+<p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
+</p>
+!! end
+
+# parsoid doesn't explicitly mark autonumbered links, see T55505
+!! test
+External links: dollar sign in URL (autonumber)
+!! wikitext
+[http://example.com/1$2345]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
+!!end
+
+!! test
+External links: open square bracket forbidden in URL (T6377)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+http://example.com/1[2345
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
+!! end
+
+!! test
+External links: open square bracket forbidden in URL (named) (T6377)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+[http://example.com/1[2345]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
+!!end
+
+# parsoid adds a space before the link name
+!! test
+External links: open square bracket forbidden in URL (named) (T6377)
+Parsoid variant.
+!! wikitext
+[http://example.com/1 [2345]
+!! html
+<p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
+</p>
+!!end
+
+!! test
+External links: nowiki in URL link text (T8230)
+!! wikitext
+[http://example.com/ <nowiki>''example site''</nowiki>]
+!! html
+<p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
+</p>
+!! end
+
+!! test
+External links: newline forbidden in text (T8230 regression check)
+!! wikitext
+[http://example.com/ first
+second]
+!! html
+<p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
+second]
+</p>
+!!end
+
+!! test
+External links: Pipe char between url and text
+!! wikitext
+[http://example.com | link]
+!! html
+<p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
+</p>
+!!end
+
+!! test
+External links: protocol-relative URL in brackets
+!! wikitext
+[//example.com/ Test]
+!! html
+<p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
+</p>
+!! end
+
+# parsoid doesn't explicitly mark autonumbered links, see T55505
+!! test
+External links: protocol-relative URL in brackets without text
+!! wikitext
+[//example.com]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
+!! end
+
+!! test
+External links: protocol-relative URL in free text is left alone
+!! wikitext
+//example.com/Foo
+!! html
+<p>//example.com/Foo
+</p>
+!!end
+
+!! test
+External links: protocol-relative URL in the middle of a word is left alone (T32269)
+!! wikitext
+foo//example.com/Foo
+!! html
+<p>foo//example.com/Foo
+</p>
+!! end
+
+## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
+!! test
+External links: with no contents
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+[http://en.wikipedia.org/wiki/Foo]
+
+[[wikipedia:Foo|Bar]]
+
+[[wikipedia:Foo|<span>Bar</span>]]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
+</p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
+</p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
+!! end
+
+!! test
+External links: Free with trailing punctuation
+!! wikitext
+http://example.com,
+http://example.com;
+http://example.com\
+http://example.com.
+http://example.com:
+http://example.com!
+http://example.com?
+http://example.com)
+http://example.com/url_with_(brackets)
+(http://example.com/url_without_brackets)
+http://example.com/url_with_entity&amp;
+http://example.com/url_with_entity&#x26;
+http://example.com/url_with_entity&#038;
+http://example.com/url_with_entity&nbsp;
+http://example.com/url_with_entity&#xA0;
+http://example.com/url_with_entity&#160;
+http://example.com/url_with_entity&lt;
+http://example.com/url_with_entity&#x3C;
+http://example.com/url_with_entity&#60;
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
+<a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
+(<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#160;
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#xa0;
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#160;
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&lt;
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#x3c;
+<a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a>&#60;
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
+<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
+(<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;">http://example.com/url_with_entity&amp;</a>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;lt;","srcContent":"&lt;"}'>&lt;</span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x3C;","srcContent":"&lt;"}'>&lt;</span>
+<a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#60;","srcContent":"&lt;"}'>&lt;</span></p>
+!! end
+
+!! test
+External links: tricky Parsoid html2html case
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+http://example.com/url_with_entity&amp;amp;
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp;amp">http://example.com/url_with_entity&amp;amp</a>;
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp;amp">http://example.com/url_with_entity&amp;amp</a>;</p>
+!! end
+
+!! test
+External links: Free with trailing quotes (T113666)
+!! wikitext
+'''News:''' Stuff here
+
+news:'a'b''c''d e
+!! html/php
+<p><b>News:</b> Stuff here
+</p><p><a rel="nofollow" class="external free" href="news:&#39;a&#39;b">news:'a'b</a><i>c</i>d e
+</p>
+!! html/parsoid
+<p><b>News:</b> Stuff here</p>
+<p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
+!! end
+
+!! test
+External links: with entity
+!! wikitext
+[http://&#x20;www.librarieswithoutborders.org Libraries without borders]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://+www.librarieswithoutborders.org" data-parsoid='{"a":{"href":"http://+www.librarieswithoutborders.org"},"sa":{"href":"http://&amp;#x20;www.librarieswithoutborders.org"}}'>Libraries without borders</a></p>
+!! end
+
+!! test
+External links: Lone protocols are never linked (T105697)
+!! wikitext
+http://
+http://;
+(http://)
+bitcoin:
+bitcoin:;
+(bitcoin:)
+!! html
+<p>http://
+http://;
+(http://)
+bitcoin:
+bitcoin:;
+(bitcoin:)
+</p>
+!! end
+
+!! test
+External links: No preceding word characters allowed (T67278)
+!! wikitext
+NOPEhttp://example.com
+N0http://example.com
+ok:http://example.com
+ok-http://example.com
+!! html
+<p>NOPEhttp://example.com
+N0http://example.com
+ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
+ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
+</p>
+!! end
+
+!! test
+External links: nofollow domain exception
+!! wikitext
+A [https://no-nofollow.org/foobar link], and another [https://example.org link].
+!! html
+<p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>.
+</p>
+!!end
+
+!! test
+External image
+!! wikitext
+External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
+!! html
+<p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
+</p>
+!! end
+
+!! test
+External image from https
+!! wikitext
+External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
+!! html
+<p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
+</p>
+!! end
+
+!! test
+External image (when not allowed)
+!! options
+wgAllowExternalImages=0
+!! wikitext
+External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
+!! html
+<p>External image: <a rel="nofollow" class="external free" href="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png">http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png</a>
+</p>
+!! end
+
+!! test
+Link to non-http image, no img tag
+!! wikitext
+Link to non-http image, no img tag: ftp://example.com/test.jpg
+!! html
+<p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
+</p>
+!! end
+
+!! test
+External links: terminating separator
+!! wikitext
+Terminating separator: http://example.com/thing,
+!! html
+<p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
+</p>
+!! end
+
+!! test
+External links: intervening separator
+!! wikitext
+Intervening separator: http://example.com/1,2,3
+!! html
+<p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
+</p>
+!! end
+
+!! test
+External links: old bug with URL in query
+!! wikitext
+Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
+!! html
+<p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
+</p>
+!! end
+
+!! test
+External links: old URL-in-URL bug, mixed protocols
+!! wikitext
+And again with mixed protocols: [ftp://example.com?url=http://example.com link]
+!! html
+<p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
+</p>
+!!end
+
+# Since Parsoid is starting to emit canonical wikitext for links,
+# [http://example.com http://example.com] will not RT back to that
+# form anymore.
+!! test
+External links: URL in text
+!! options
+parsoid=wt2html
+!! wikitext
+URL in text: [http://example.com http://example.com]
+!! html/php
+<p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
+</p>
+!! html/parsoid
+<p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
+!! end
+
+!! test
+External links: Clickable images
+!! wikitext
+ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
+!! html/php
+<p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/></a>
+</p>
+!! html/parsoid
+<p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
+!! end
+
+!! test
+External links: raw ampersand
+!! wikitext
+Old &amp; use: http://x&y
+!! html
+<p>Old &amp; use: <a rel="nofollow" class="external free" href="http://x&amp;y">http://x&amp;y</a>
+</p>
+!! end
+
+!! test
+External links: encoded ampersand
+!! wikitext
+Old &amp; use: http://x&amp;y
+!! html/php
+<p>Old &amp; use: <a rel="nofollow" class="external free" href="http://x&amp;y">http://x&amp;y</a>
+</p>
+!! html/parsoid
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&amp;y">http://x&amp;y</a></p>
+!! end
+
+!! test
+External links: encoded equals (T8102)
+!! wikitext
+http://example.com/?foo&#61;bar
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
+!! end
+
+##
+## Note that parsoid doesn't explicit mark autonumbered links, nor
+## does it number them. As discussed in T55505, we can identify
+## autonumbered links via CSS.
+##
+
+!! test
+External links: [raw ampersand]
+!! wikitext
+Old &amp; use: [http://x&y]
+!! html/php
+<p>Old &amp; use: <a rel="nofollow" class="external autonumber" href="http://x&amp;y">[1]</a>
+</p>
+!! html/parsoid
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&amp;y"></a></p>
+!! end
+
+# note that parsoid html is identical to [raw ampersand] case; so html2wt
+# mode will return the [raw ampersand] wikitext
+!! test
+External links: [encoded ampersand]
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Old &amp; use: [http://x&amp;y]
+!! html/php
+<p>Old &amp; use: <a rel="nofollow" class="external autonumber" href="http://x&amp;y">[1]</a>
+</p>
+!! html/parsoid
+<p>Old <span typeof="mw:Entity">&amp;</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&amp;y"></a></p>
+!! end
+
+!! test
+External links: [raw equals]
+!! wikitext
+[http://example.com/?foo=bar]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
+!! end
+
+# note that parsoid html is identical to [raw equals] case; so html2wt
+# mode will return the [raw equals] wikitext
+!! test
+External links: [encoded equals] (T8102)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[http://example.com/?foo&#61;bar]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
+!! end
+
+# xxx parsoid strips the IDN character, so the round-trip tests will
+# obviously fail and are disabled. --cscott
+!! test
+External links: [IDN ignored character reference in hostname; strip it right off]
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[http://e&zwnj;xample.com/]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
+!! end
+
+# FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
+# Where an external link could easily circumvent the sanitization of the text of
+# a link like this (where an IDN-ignore character is in the URL somewhere), this
+# test demands a higher standard. That's a bit strange.
+#
+# Example:
+#
+# http://e‌xample.com -> [http://example.com|http://example.com]
+# [http://example.com|http://e‌xample.com] -> [http://example.com|http://e‌xample.com]
+#
+# The first example is sanitized, but the second is not. Any security benefits
+# from this production are trivial to circumvent. Either remove this test and
+# let the parser(s) do their thing unaccosted, or fix the inconsistency and change
+# the test accordingly.
+#
+# All our love,
+# The Parsoid team.
+# xxx parsoid strips the IDN character, so the round-trip tests will
+# obviously fail and are disabled. --cscott
+!! test
+External links: IDN ignored character reference in hostname; strip it right off
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+http://e&zwnj;xample.com/
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
+!! end
+
+!! test
+External links: www.jpeg.org (T2554)
+!! wikitext
+http://www.jpeg.org
+!! html
+<p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
+</p>
+!! end
+
+# parsoid doesn't explicitly mark autonumbered links, see T55505
+!! test
+External links: URL within URL (T2002)
+!! wikitext
+[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
+!! end
+
+!! test
+T2361: URL inside bracketed URL
+!! wikitext
+[http://www.example.com/foo http://www.example.com/bar]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
+</p>
+!! end
+
+!! test
+T2361: URL within URL, not bracketed
+!! wikitext
+http://www.example.com/foo?=http://www.example.com/bar
+!! html
+<p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
+</p>
+!! end
+
+!! test
+T2289: ">"-token in URL-tail
+!! wikitext
+http://www.example.com/<hello>
+!! html
+<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>&lt;hello&gt;
+</p>
+!!end
+
+!! test
+T2289: literal ">"-token in URL-tail
+!! wikitext
+http://www.example.com/<b>html</b>
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
+!! end
+
+!! test
+T2289: ">"-token in bracketed URL
+!! wikitext
+[http://www.example.com/<hello> stuff]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com/">&lt;hello&gt; stuff</a>
+</p>
+!!end
+
+!! test
+T2289: literal ">"-token in bracketed URL
+!! wikitext
+[http://www.example.com/<b>html</b> stuff]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
+</p>
+!!end
+
+!! test
+T2289: literal double quote at end of URL
+!! wikitext
+http://www.example.com/"hello"
+!! html
+<p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
+</p>
+!!end
+
+!! test
+T2289: literal double quote in bracketed URL
+!! wikitext
+[http://www.example.com/"hello" stuff]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
+</p>
+!!end
+
+!! test
+External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
+!! wikitext
+[http://www.example.com test]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
+</p>
+!! end
+
+!! test
+External links: link text with spaces
+!! wikitext
+[http://www.example.com a b c]
+[http://www.example.com ''a'' ''b'']
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
+<a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
+</p>
+!! end
+
+# Note edge case difference between PHP and Parsoid here.
+!! test
+External links: wiki links within external link (T5695)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+[http://example.com [[wikilink]] embedded in ext link]
+
+[http://example.com test [[wikilink]] embedded in ext link]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&amp;action=edit&amp;redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
+</p><p><a rel="nofollow" class="external text" href="http://example.com">test </a><a href="/index.php?title=Wikilink&amp;action=edit&amp;redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
+!! end
+
+!! test
+T2787: Links with one slash after the url protocol are invalid
+!! wikitext
+http:/example.com
+
+[http:/example.com title]
+!! html
+<p>http:/example.com
+</p><p>[http:/example.com title]
+</p>
+!! end
+
+!! test
+Bracketed external links with template-generated invalid target
+!! wikitext
+[{{echo|http:/example.com}} title]
+!! html
+<p>[http:/example.com title]
+</p>
+!! end
+
+# wt2html only because Parsoid would want to add <nowiki>s coming from html
+!! test
+Broken wikilinks (but not external links) prevent templates from closing
+!! options
+parsoid=wt2html
+!! wikitext
+[http://example.com x
+
+{{echo|[http://example.com x}}
+
+[[Foo
+
+{{echo|[[Foo}}
+!! html/php
+<p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
+</p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
+</p><p>[[Foo
+</p><p>{{echo|[[Foo}}
+</p>
+!! html/parsoid
+<p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://example.com x"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
+<p>[[Foo</p>
+<p>{{echo|[[Foo}}</p>
+!! end
+
+!! test
+Wikilinks with embedded newlines are not broken
+!! wikitext
+{{echo|[[ Foo
+B
+C]]}}
+!! html/php
+<p>[[ Foo
+B
+C]]
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[ Foo\nB\nC]]"}},"i":0}}]}'>[[ Foo B C]]</p>
+!! end
+
+!! test
+Broken templates
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|[[Foo|}}]]
+
+[[Foo|{{echo|]]}}
+!! html/php
+<p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
+</p><p>[[Foo|]]
+</p>
+!! html/parsoid
+<p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
+<p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
+!! end
+
+!! test
+T4702: Mismatched <i>, <b> and <a> tags are invalid
+!! wikitext
+''[http://example.com text'']
+[http://example.com '''text]'''
+''Something [http://example.com in italic'']
+''Something [http://example.com mixed''''', even bold]'''
+'''''Now [http://example.com both''''']
+!! html
+<p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
+<a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
+<i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
+<i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
+<i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
+</p>
+!! end
+
+
+!! test
+T6781: %26 in URL
+!! wikitext
+http://www.example.com/?title=AT%26T
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
+!! end
+
+# According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
+# % is actually legal in HTML5. Any change in output would need testing though.
+!! test
+T6781, T7267: %25 in URL
+!! wikitext
+http://www.example.com/?title=100%25_Bran
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
+!! end
+
+!! test
+T6781, T7267: %28, %29 in URL
+!! wikitext
+http://www.example.com/?title=Ben-Hur_%281959_film%29
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a></p>
+!! end
+
+
+!! test
+T6781: %26 in autonumber URL
+!! wikitext
+[http://www.example.com/?title=AT%26T]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
+!! end
+
+!! test
+T6781, T7267: %26 in autonumber URL
+!! wikitext
+[http://www.example.com/?title=100%25_Bran]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
+!! end
+
+!! test
+T6781, T7267: %28, %29 in autonumber URL
+!! wikitext
+[http://www.example.com/?title=Ben-Hur_%281959_film%29]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
+!! end
+
+
+!! test
+T6781: %26 in bracketed URL
+!! wikitext
+[http://www.example.com/?title=AT%26T link]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
+!! end
+
+!! test
+T6781, T7267: %25 in bracketed URL
+!! wikitext
+[http://www.example.com/?title=100%25_Bran link]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
+</p>
+!! end
+
+!! test
+T6781, T7267: %28, %29 in bracketed URL
+!! wikitext
+[http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
+!! end
+
+!! test
+External link containing a period in the anchor. (T65947)
+!! wikitext
+[//foo.org/bar#baz. bang]
+
+[//foo.org/bar. bang]
+!! html/php
+<p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
+</p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
+!! end
+
+!! test
+External link containing a single quote. (T65947)
+!! wikitext
+[//foo.org/bar'baz]
+
+[//foo.org/bar'baz bang]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="//foo.org/bar&#39;baz">[1]</a>
+</p><p><a rel="nofollow" class="external text" href="//foo.org/bar&#39;baz">bang</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
+<p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
+!! end
+
+!! test
+External link containing double-single-quotes in text '' (T6598 sanity check)
+!! wikitext
+Some [http://example.com/ pretty ''italics'' and stuff]!
+!! html
+<p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
+</p>
+!! end
+
+!! test
+External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
+!! wikitext
+''Some [http://example.com/ pretty ''italics'' and stuff]!''
+!! html
+<p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
+</p>
+!! end
+
+# Don't add the html/php section since the output is broken and there isn't any reason to spec it
+!! test
+External link containing double-single-quotes with no space separating the url from text in italics
+!! wikitext
+[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
+!! html/php+tidy
+<p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&amp;action=edit&amp;redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de </a><a rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
+!! end
+
+!! test
+External link with comments in link text
+!! wikitext
+[http://www.google.com Google <!-- comment -->]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
+!! end
+
+!! test
+External link to bare IPv4 address
+!! wikitext
+[http://192.168.0.1 Link]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
+!! end
+
+!! test
+URL-encoding in URL functions (single parameter)
+!! wikitext
+{{localurl:Some page|amp=&}}
+!! html
+<p>/index.php?title=Some_page&amp;amp=&amp;
+</p>
+!! end
+
+!! test
+URL-encoding in URL functions (multiple parameters)
+!! wikitext
+{{localurl:Some page|q=?&amp=&}}
+!! html
+<p>/index.php?title=Some_page&amp;q=?&amp;amp=&amp;
+</p>
+!! end
+
+!! test
+Brackets in urls
+!! wikitext
+http://example.com/index.php?foozoid%5B%5D=bar
+
+http://example.com/index.php?foozoid&#x5B;&#x5D;=bar
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
+</p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
+
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar" data-parsoid='{"stx":"url","a":{"href":"http://example.com/index.php?foozoid%5B%5D=bar"},"sa":{"href":"http://example.com/index.php?foozoid&amp;#x5B;&amp;#x5D;=bar"}}'>http://example.com/index.php?foozoid%5B%5D=bar</a></p>
+!! end
+
+!! test
+IPv6 urls, autolink format (T23261)
+!! wikitext
+http://[2404:130:0:1000::187:2]/index.php
+
+Examples from RFC 2373, section 2.2:
+
+*http://[1080::8:800:200C:417A]/unicast
+*http://[FF01::101]/multicast
+*http://[::1]/loopback
+*http://[::]/unspecified
+*http://[::13.1.68.3]/ipv4compat
+*http://[::FFFF:129.144.52.38]/ipv4compat
+
+Examples from RFC 2732, section 2:
+
+*http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
+*http://[1080:0:0:0:8:800:200C:417A]/index.html
+*http://[3ffe:2a00:100:7031::1]
+*http://[1080::8:800:200C:417A]/foo
+*http://[::192.9.5.5]/ipng
+*http://[::FFFF:129.144.52.38]:80/index.html
+*http://[2010:836B:4179::836B:4179]
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
+</p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
+</p>
+<ul><li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
+<li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
+<p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
+</p>
+<ul><li><a rel="nofollow" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
+<li><a rel="nofollow" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
+<li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
+<li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
+<li><a rel="nofollow" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
+<li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
+
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
+
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
+<ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
+
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
+<ul><li><a rel="mw:ExtLink" class="external free" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">http://[1080:0:0:0:8:800:200C:417A]/index.html</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
+<li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
+!! end
+
+!! test
+IPv6 urls, bracketed format (T23261)
+!! wikitext
+[http://[2404:130:0:1000::187:2]/index.php test]
+
+Examples from RFC 2373, section 2.2:
+
+*[http://[1080::8:800:200C:417A] unicast]
+*[http://[FF01::101] multicast]
+*[http://[::1]/ loopback]
+*[http://[::] unspecified]
+*[http://[::13.1.68.3] ipv4compat]
+*[http://[::FFFF:129.144.52.38] ipv4compat]
+
+Examples from RFC 2732, section 2:
+
+*[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
+*[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
+*[http://[3ffe:2a00:100:7031::1] 3]
+*[http://[1080::8:800:200C:417A]/foo 4]
+*[http://[::192.9.5.5]/ipng 5]
+*[http://[::FFFF:129.144.52.38]:80/index.html 6]
+*[http://[2010:836B:4179::836B:4179] 7]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
+</p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
+</p>
+<ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
+<li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
+<p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
+</p>
+<ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
+<li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
+<li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
+<li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
+<li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
+<li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
+
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
+
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
+<ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
+
+<p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
+<ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
+!! end
+
+!! test
+Non-extlinks in brackets
+!! wikitext
+[foo]
+[foo bar]
+[foo ''bar'']
+[fool's] errand
+[fool's errand]
+[{{echo|foo}}]
+[{{echo|foo}} bar]
+[{{echo|foo}} ''bar'']
+[{{echo|foo}}l's] errand
+[{{echo|foo}}l's errand]
+[url={{echo|foo}}]
+[url=http://example.com]
+[http:// bare protocols don't count]
+!! html/php
+<p>[foo]
+[foo bar]
+[foo <i>bar</i>]
+[fool's] errand
+[fool's errand]
+[foo]
+[foo bar]
+[foo <i>bar</i>]
+[fool's] errand
+[fool's errand]
+[url=foo]
+[url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
+[http:// bare protocols don't count]
+</p>
+!! html/parsoid
+<p>[foo]
+[foo bar]
+[foo <i>bar</i>]
+[fool's] errand
+[fool's errand]
+[<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
+[<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
+[<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
+[<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
+[<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
+[url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
+[url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
+[http:// bare protocols don't count]</p>
+!! end
+
+!! test
+Percent encoding in external links
+!! wikitext
+[https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
+!! html/php
+<p><a rel="nofollow" class="external text" href="https://github.com/search?l=&amp;q=ResourceLoader+%40wikimedia">Search</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&amp;q=ResourceLoader+%40wikimedia">Search</a></p>
+!! end
+
+!! test
+Use url link syntax for links where the content is equal the link target
+!! wikitext
+http://example.com
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
+!! end
+
+!! test
+Parenthesis in external links, especially URL links
+!! wikitext
+http://example.com)
+
+http://example.com/test)
+
+http://example.com/(test)
+
+http://example.com/((test)
+
+(http://example.com/(test))
+
+(http://example.com/(test)))))
+
+http://example.com/a)b
+
+[http://example.com) foo]
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
+</p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
+</p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
+</p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
+</p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
+</p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
+</p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
+</p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
+!! end
+
+!! test
+Parenthesis in external links, w/ transclusion or comment
+!! wikitext
+(http://example.com/{{echo|hi}})
+
+(http://example.com<!-- hi -->)
+!! html/php
+<p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
+</p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
+</p>
+!! html/parsoid
+<p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" href="http://example.com/hi" data-parsoid='{"stx":"url","a":{"href":"http://example.com/hi"},"sa":{"href":"http://example.com/{{echo|hi}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"http://example.com/&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,31,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}&#39;>hi&lt;/span>"}]]}'>http://example.com/hi</a>)</p>
+
+<p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com&lt;!-- hi -->"}}'>http://example.com</a>)</p>
+!! end
+
+!! test
+Serialize <a> tags with invalid link targets as plain text
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<a rel="mw:WikiLink" href="[[foo]]">text</a>
+<a rel="mw:WikiLink" href="[[foo]]">*text</a>
+<a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
+<a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
+!! wikitext
+text
+<nowiki>*</nowiki>text
+<nowiki>[[foo]]</nowiki>
+<nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
+!! end
+
+!! test
+mw:ExtLink -vs- mw:WikiLink (T94723)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
+<a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
+<a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
+<p>
+<a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
+<a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
+</p>
+!! wikitext
+[[Foo|Bar]]
+[[Foo|Bar]]
+[[:en:Foo|Bar]]
+[[:en:Foo|Bar]]
+
+[[:en:European_Robin|European Robin]]
+[[:en:European_Robin|European Robin]]
+!! end
+
+!! test
+mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
+!! options
+parsoid=wt2wt
+!! wikitext
+[http://en.wikipedia.org/wiki/European_Robin European Robin]
+!! html/parsoid
+THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
+!! end
+
+
+###
+### Quotes
+###
+
+!! test
+Quotes
+!! wikitext
+Normal text. '''Bold text.''' Normal text. ''Italic text.''
+
+Normal text. '''''Bold italic text.''''' Normal text.
+!! html
+<p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
+</p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
+</p>
+!! end
+
+
+# Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
+# parser strips. The wikitext contains just the first half of the bold
+# quote pair.
+!! test
+Unclosed and unmatched quotes
+!! wikitext
+'''''Bold italic text '''with bold deactivated''' in between.'''''
+
+'''''Bold italic text ''with italic deactivated'' in between.'''''
+
+'''Bold text..
+
+..spanning two paragraphs (should not work).'''
+
+'''Bold tag left open
+
+''Italic tag left open
+
+Normal text.
+
+<!-- Unmatching number of opening, closing tags: -->
+'''This year''''s election ''should'' beat '''last year''''s.
+
+''Tom'''s car is bigger than ''Susan'''s.
+
+Plain ''italic'''s plain
+!! html/php
+<p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
+</p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
+</p><p><b>Bold text..</b>
+</p><p>..spanning two paragraphs (should not work).
+</p><p><b>Bold tag left open</b>
+</p><p><i>Italic tag left open</i>
+</p><p>Normal text.
+</p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
+</p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
+</p><p>Plain <i>italic'</i>s plain
+</p>
+!! html/parsoid
+<p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
+</p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
+</p><p><b>Bold text..</b>
+</p><p>..spanning two paragraphs (should not work).<b></b>
+</p><p><b>Bold tag left open</b>
+</p><p><i>Italic tag left open</i>
+</p><p>Normal text.
+</p>
+<!-- Unmatching number of opening, closing tags: -->
+<p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
+</p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
+</p><p>Plain <i>italic'</i>s plain
+</p>
+!! end
+
+###
+### Tables
+###
+### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
+###
+
+# This should not produce <table></table> as <table><tr><td></td></tr></table>
+# is the bare minimum required by the spec, see:
+# https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
+# Parsoid team replies: empty table tags are legal in HTML5
+!! test
+A table with no data.
+!! options
+parsoid=wt2html
+!! wikitext
+{||}
+!! html/php
+
+!! html/parsoid
+<table></table>
+
+!! end
+
+!! test
+A table with stray table end tags on start tag line (wt2html)
+!! options
+parsoid=wt2html
+!! wikitext
+{|style="color: red;"|}
+
+{|style="color: red;" |}
+|foo
+|}
+
+{|style="color: red;"|} id="foo"
+|foo
+|}
+
+{|style="color: red;" |} id="foo"
+|foo
+|}
+!! html
+<table style="color: red;"></table>
+
+<table style="color: red;">
+<tbody><tr>
+<td>foo</td>
+</tr></tbody>
+</table>
+
+<table style="color: red;" id="foo">
+<tbody><tr>
+<td>foo</td>
+</tr></tbody>
+</table>
+
+<table style="color: red;" id="foo">
+<tbody><tr>
+<td>foo</td>
+</tr></tbody>
+</table>
+
+!! end
+
+!! test
+A table with no data (take 2)
+!! wikitext
+{|
+|}
+!! html/parsoid
+<table></table>
+!! end
+
+# A table with nothing but a caption is invalid XHTML, we might want to render
+# this as <p>caption</p>
+# Parsoid team replies: table with only a caption is legal in HTML5
+!! test
+A table with nothing but a caption
+!! wikitext
+{|
+|+caption
+|}
+!! html/php
+<table>
+<caption>caption
+</caption><tr><td></td></tr></table>
+
+!! html/parsoid
+<table><caption>caption</caption></table>
+!! end
+
+!! test
+A table with caption with default-spaced attributes and a table row
+!! wikitext
+{|
+|+ style="color: red;" | caption1
+|-
+|foo
+|}
+!! html
+<table>
+<caption style="color: red;">caption1
+</caption>
+<tr>
+<td>foo
+</td></tr></table>
+
+!! end
+
+!! test
+A table with captions with non-default spaced attributes and a table row
+!! wikitext
+{|
+|+style="color: red;"|caption2
+|+ style="color: red;"|caption3
+|-
+|foo
+|}
+!! html
+<table>
+<caption style="color: red;">caption2
+</caption>
+<caption style="color: red;">caption3
+</caption>
+<tr>
+<td>foo
+</td></tr></table>
+
+!! end
+
+!! test
+Table td-cell syntax variations
+!! wikitext
+{|
+|foo bar foo|baz
+|foo bar foo||baz
+|style='color:red;'|baz
+|style='color:red;'||baz
+|}
+!! html
+<table>
+<tr>
+<td>baz
+</td>
+<td>foo bar foo</td>
+<td>baz
+</td>
+<td style="color:red;">baz
+</td>
+<td>style='color:red;'</td>
+<td>baz
+</td></tr></table>
+
+!! end
+
+!! test
+Simple table
+!! wikitext
+{|
+|1||2
+|-
+|3||4
+|}
+!! html
+<table>
+<tr>
+<td>1</td>
+<td>2
+</td></tr>
+<tr>
+<td>3</td>
+<td>4
+</td></tr></table>
+
+!! end
+
+!! test
+Simple table but with multiple dashes for row wikitext
+!! wikitext
+{|
+|foo
+|-----
+|bar
+|}
+!! html
+<table>
+<tr>
+<td>foo
+</td></tr>
+<tr>
+<td>bar
+</td></tr></table>
+
+!! end
+
+!! test
+Multiplication table
+!! wikitext
+{| border="1" cellpadding="2"
+|+Multiplication table
+|-
+!&times;!!1!!2!!3
+|-
+!1
+|1||2||3
+|-
+!2
+|2||4||6
+|-
+!3
+|3||6||9
+|-
+!4
+|4||8||12
+|-
+!5
+|5||10||15
+|}
+!! html
+<table border="1" cellpadding="2">
+<caption>Multiplication table
+</caption>
+<tr>
+<th>&#215;</th>
+<th>1</th>
+<th>2</th>
+<th>3
+</th></tr>
+<tr>
+<th>1
+</th>
+<td>1</td>
+<td>2</td>
+<td>3
+</td></tr>
+<tr>
+<th>2
+</th>
+<td>2</td>
+<td>4</td>
+<td>6
+</td></tr>
+<tr>
+<th>3
+</th>
+<td>3</td>
+<td>6</td>
+<td>9
+</td></tr>
+<tr>
+<th>4
+</th>
+<td>4</td>
+<td>8</td>
+<td>12
+</td></tr>
+<tr>
+<th>5
+</th>
+<td>5</td>
+<td>10</td>
+<td>15
+</td></tr></table>
+
+!! end
+
+!! test
+Accept "||" in table headings
+!! wikitext
+{|
+!h1||h2
+|}
+!! html
+<table>
+<tr>
+<th>h1</th>
+<th>h2
+</th></tr></table>
+
+!! end
+
+!! test
+Accept "!!" in table data
+!! wikitext
+{|
+|Foo!!||
+|}
+!! html
+<table>
+<tr>
+<td>Foo!!</td>
+<td>
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
+</tbody></table>
+!! end
+
+!! test
+Accept "||" in indented table headings
+!! wikitext
+:{|
+!h1||h2
+|}
+!! html
+<dl><dd><table>
+<tr>
+<th>h1</th>
+<th>h2
+</th></tr></table></dd></dl>
+
+!! end
+
+!! test
+Accept "!!" in templates
+!! wikitext
+{|
+!a {{echo|b!!c}}
+|}
+!! html/php
+<table>
+<tr>
+<th>a b</th>
+<th>c
+</th></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><th typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["!a ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b!!c"}},"i":0}}]}'>a b</th><th about="#mwt1">c</th></tr>
+!! end
+
+!! test
+Accept "!!" in table headings after newline
+!! wikitext
+{|
+!a
+b!!c
+|}
+!! html/php
+<table>
+<tr>
+<th>a
+<p>b!!c
+</p>
+</th></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><th>a
+<p>b!!c</p></th></tr>
+</tbody></table>
+!! end
+
+!! test
+Accept "!!" in table data of mixed wikitext / html syntax
+!! wikitext
+{|
+!a
+<tr><td>b!!c</td></tr>
+|}
+!! html/php+tidy
+<table>
+<tbody><tr>
+<th>a
+</th></tr><tr><td>b!!c</td></tr>
+</tbody></table>
+!! html/parsoid
+<table>
+<tbody><tr><th>a</th></tr>
+<tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Accept empty attributes in td/th cells (td/th cells starting with leading ||)
+!! wikitext
+{|
+!| h1
+|| a
+|}
+!! html
+<table>
+<tr>
+<th>h1
+</th>
+<td>a
+</td></tr></table>
+
+!! end
+
+!!test
+Accept "| !" at start of line in tables (ignore !-attribute)
+!! wikitext
+{|
+|-
+|!style="color:red"|bar
+|}
+!! html
+<table>
+
+<tr>
+<td>bar
+</td></tr></table>
+
+!!end
+
+!!test
+Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
+!! wikitext
+{|
+|-
+|style='color:red;'|+1
+|style='color:blue;'|-1
+|-
+|1||2||3
+|1||+2||-3
+|-
+| +1
+| -1
+|}
+!! html
+<table>
+
+<tr>
+<td style="color:red;">+1
+</td>
+<td style="color:blue;">-1
+</td></tr>
+<tr>
+<td>1</td>
+<td>2</td>
+<td>3
+</td>
+<td>1</td>
+<td>+2</td>
+<td>-3
+</td></tr>
+<tr>
+<td>+1
+</td>
+<td>-1
+</td></tr></table>
+
+!!end
+
+!! test
+Table rowspan
+!! wikitext
+{| border=1
+|Cell 1, row 1
+|rowspan=2|Cell 2, row 1 (and 2)
+|Cell 3, row 1
+|-
+|Cell 1, row 2
+|Cell 3, row 2
+|}
+!! html
+<table border="1">
+<tr>
+<td>Cell 1, row 1
+</td>
+<td rowspan="2">Cell 2, row 1 (and 2)
+</td>
+<td>Cell 3, row 1
+</td></tr>
+<tr>
+<td>Cell 1, row 2
+</td>
+<td>Cell 3, row 2
+</td></tr></table>
+
+!! end
+
+!! test
+Nested table
+!! wikitext
+{| border=1
+| &alpha;
+|
+{| bgcolor=#ABCDEF border=2
+|nested
+|-
+|table
+|}
+|the original table again
+|}
+!! html
+<table border="1">
+<tr>
+<td>&#945;
+</td>
+<td>
+<table bgcolor="#ABCDEF" border="2">
+<tr>
+<td>nested
+</td></tr>
+<tr>
+<td>table
+</td></tr></table>
+</td>
+<td>the original table again
+</td></tr></table>
+
+!! end
+
+!! test
+Invalid attributes in table cell (T3830)
+!! wikitext
+{|
+|Cell:|broken
+|}
+!! html
+<table>
+<tr>
+<td>broken
+</td></tr></table>
+
+!! end
+
+!! test
+Table cell attributes: Pipes protected by nowikis should be treated as a plain character
+!! wikitext
+{|
+| title="foo" |bar
+| title="foo<nowiki>|</nowiki>" |bar
+| title="foo<nowiki>|</nowiki>" bar
+|}
+!! html/php
+<table>
+<tr>
+<td title="foo">bar
+</td>
+<td title="foo&#124;">bar
+</td>
+<td>title="foo|" bar
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td title="foo">bar</td>
+<td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo&lt;nowiki>|&lt;/nowiki>"},"autoInsertedEnd":true}'>bar</td>
+<td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
+</tbody></table>
+!! end
+
+# See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
+# N.B. The "|}" to close the table is missing from the input, so parsoid's
+# *2wt modes will fail.
+!! test
+Table security: embedded pipes
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+| |[ftp://|x||]" onmouseover="alert(document.cookie)">test
+!! html/php
+<table>
+<tr>
+<td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
+<td>]" onmouseover="alert(document.cookie)"&gt;test
+</td>
+</tr>
+</table>
+
+!! html/parsoid
+<table><tbody>
+<tr>
+<td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
+!! end
+
+!! test
+Element attributes with double ! should not be broken up by <th>
+!! wikitext
+{|
+!hi <div class="!!">ha</div> ho
+|}
+!! html/php
+<table>
+<tr>
+<th>hi <div class="!!">ha</div> ho
+</th></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
+</tbody></table>
+!! end
+
+!! test
+! and || in element attributes should not be parsed as <th>/<td>
+!! wikitext
+{|
+|<div style="color: red !important;" data-contrived="put this here ||">hi</div>
+|}
+!! html/php
+<table>
+<tr>
+<td><div style="color: red !important;" data-contrived="put this here &#124;&#124;">hi</div>
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
+</tbody></table>
+!! end
+
+# FIXME: The output seems broken. Filed as T110268.
+!! test
+! and || in td attributes should not be parsed as <th>/<td>
+!! options
+parsoid=wt2html
+!! wikitext
+{|
+|style="color: red !important;" data-contrived="put this here ||"|foo
+|}
+!! html/php
+<table>
+<tr>
+<td>style="color: red !important;" data-contrived="put this here</td>
+<td>foo
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td>style="color: red !important;" data-contrived="put this here</td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'>foo</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Break on | in element attribute in template
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{{echo|1=<div class="hi|ho">ha</div>}}
+!! html/php
+<p>ho"&gt;ha&lt;/div&gt;
+</p>
+!! html/parsoid
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho\">ha&lt;/div>"}},"i":0}}]}'>ho">ha</span>
+!! end
+
+!! test
+Break on | in element attribute name in template
+!! wikitext
+{{echo|<div cla|ss="hiho">ha</div>}}
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"},{"k":"ss","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div cla"},"ss":{"wt":"\"hiho\">ha&lt;/div>"}},"i":0}}]}'>&lt;div cla</p>
+!! end
+
+!! test
+Don't break on | in extension attribute in template
+!! wikitext
+{{echo|<ref name="hi|ho">ha</ref>}}
+
+<references />
+!! html/parsoid
+<p><sup about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref name=\"hi|ho\">ha&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-hi|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></p>
+
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
+!! end
+
+## We don't support roundtripping of these attributes in Parsoid.
+## Selective serialization takes care of preventing dirty diffs.
+## But, on edits, we dirty-diff the invalid attribute text.
+!! test
+Invalid text in table attributes should be discarded
+!! options
+parsoid=wt2html
+!! wikitext
+{| <span>boo</span> style='border:1px solid black'
+| <span>boo</span> style='color:blue' |1
+|<span>boo</span> style='color:blue'|2
+|}
+!! html/php
+<table style="border:1px solid black">
+<tr>
+<td style="color:blue">1
+</td>
+<td style="color:blue">2
+</td></tr></table>
+
+!! html/parsoid
+<table style="border:1px solid black">
+<tr>
+<td style="color:blue">1</td>
+<td style="color:blue">2</td>
+</tr>
+</table>
+!! end
+
+!! test
+Invalid text in table attributes should be preserved by selective serializer
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ ["td:first-child", "text", "abc"],
+ ["td + td", "text", "xyz"]
+ ]
+}
+!! wikitext
+{| <span>boo</span> style='border:1px solid black'
+| <span>boo</span> style='color:blue' | 1
+|<span>boo</span> style='color:blue'| 2
+|}
+!! wikitext/edited
+{| <span>boo</span> style='border:1px solid black'
+| <span>boo</span> style='color:blue' |abc
+|<span>boo</span> style='color:blue'|xyz
+|}
+!! end
+
+!! test
+1. Template-generated table cell attributes and cell content
+!! wikitext
+{|
+|{{table_attribs}}
+| {{table_attribs}}
+|| {{table_attribs_5}}
+| <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
+|align=center {{table_attribs}}
+| <!--foo--> align=center <!--bar--> {{table_attribs}}
+|}
+!! html
+<table>
+<tr>
+<td style="color:red;">Foo
+</td>
+<td style="color:red;">Foo
+</td>
+<td>style="color:red;"</td>
+<td>Bar
+</td>
+<td style="color:red;">Foo
+</td>
+<td align="center" style="color:red;">Foo
+</td>
+<td align="center" style="color:red;">Foo
+</td></tr></table>
+
+!! end
+
+!! test
+2. Template-generated table cell attributes and cell content
+!! wikitext
+{|
+|{{table_attribs_2}}
+|}
+!! html/php
+<table>
+<tr>
+<td style="color:red;">Foo
+</td>
+<td>Bar</td>
+<td>Baz
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td about="#mwt1" typeof="mw:Transclusion" style="color:red;" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_2","href":"./Template:Table_attribs_2"},"params":{},"i":0}}]}'>Foo</td>
+<td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
+</tbody></table>
+!! end
+
+!! test
+3. Template-generated table cell attributes and cell content
+!! wikitext
+{|
+!align=center {{table_header_cells}}
+|-
+|align=center {{table_cells}}
+|}
+!! html/php
+<table>
+<tr>
+<th align="center" style="color:red;">Foo</th>
+<th style="color:red;"><i>Bar</i></th>
+<th style="color:brown;"><i>Foo</i> and Baz
+</th></tr>
+<tr>
+<td align="center" style="color:red;">Foo</td>
+<td style="color:red;"><i>Bar</i></td>
+<td style="color:brown;"><i>Foo</i> and Baz
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><th align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":0}}]}'>Foo</th><th about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></th><th about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</th></tr><tr>
+<td align="center" style="color:red;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":0}}]}'>Foo</td><td about="#mwt1" style="color:red;"><i about="#mwt1">Bar</i></td><td about="#mwt1" style="color:brown;"><i about="#mwt1">Foo</i> and Baz</td></tr>
+</tbody></table>
+!! end
+
+!! test
+4. Template-generated table cell attributes and cell content inside a templated table
+!! wikitext
+{{tbl-start}}
+!align=center {{table_header_cells}}
+|-
+|align=center {{table_cells}}
+{{tbl-end}}
+!! html/php
+<table>
+<tr>
+<th align="center" style="color:red;">Foo</th>
+<th style="color:red;"><i>Bar</i></th>
+<th style="color:brown;"><i>Foo</i> and Baz
+</th></tr>
+<tr>
+<td align="center" style="color:red;">Foo</td>
+<td style="color:red;"><i>Bar</i></td>
+<td style="color:brown;"><i>Foo</i> and Baz
+</td></tr></table>
+
+!! html/parsoid
+<table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n!align=center ",{"template":{"target":{"wt":"table_header_cells","href":"./Template:Table_header_cells"},"params":{},"i":1}},"\n|-\n|align=center ",{"template":{"target":{"wt":"table_cells","href":"./Template:Table_cells"},"params":{},"i":2}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":3}}]}'>
+<tbody><tr><th align="center" style="color:red;">Foo</th><th style="color:red;"><i>Bar</i></th><th style="color:brown;"><i>Foo</i> and Baz</th></tr>
+<tr>
+<td align="center" style="color:red;">Foo</td><td style="color:red;"><i>Bar</i></td><td style="color:brown;"><i>Foo</i> and Baz</td></tr>
+</tbody></table>
+!! end
+
+## Edge case fix to prevent future regressions
+!! test
+T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
+!! wikitext
+{|
+|{{table_attribs_7}}
+|}
+<references />
+!! html/parsoid
+<table>
+<tbody><tr><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_7","href":"./Template:Table_attribs_7"},"params":{},"i":0}}]}'>Foo<sup class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
+</tbody></table>
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
+!! end
+
+!! test
+Table with row followed by newlines and table heading
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+|-
+
+!foo
+|}
+!! html/*
+<table>
+
+
+<tr>
+<th>foo
+</th></tr></table>
+
+!! end
+
+!! test
+Table with empty line following the start tag
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+
+|-
+|foo
+|}
+!! html/*
+<table>
+
+
+<tr>
+<td>foo
+</td></tr></table>
+
+!! end
+
+!! test
+Table attributes with empty value
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+| style=|hello
+|}
+!! html/php
+<table>
+<tr>
+<td style="">hello
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td style="">hello</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Wikitext table with a lot of comments
+!! wikitext
+{|
+<!-- c0 -->
+|foo
+<!-- c1 -->
+|-<!-- c2 -->
+<!-- c3 -->
+|<!-- c4 -->
+<!-- c5 -->
+|}
+!! html
+<table>
+<tr>
+<td>foo
+</td></tr>
+<tr>
+<td>
+</td></tr></table>
+
+!! end
+
+!! test
+Wikitext table comments represented in parsoid dom
+!! wikitext
+{|<!--c1--><!--c2-->
+|-<!--c3-->
+|x
+|}
+!! html/php+tidy
+<table>
+
+<tbody><tr>
+<td>x
+</td></tr></tbody></table>
+!! html/parsoid
+<table><!--c1--><!--c2-->
+<tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
+<td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Wikitext table with double-line table cell
+!! wikitext
+{|
+|a
+b
+|}
+!! html
+<table>
+<tr>
+<td>a
+<p>b
+</p>
+</td></tr></table>
+
+!! end
+
+!! test
+Table cell with a single comment
+!! wikitext
+{|
+| <!-- c1 -->
+|a
+|}
+!! html
+<table>
+<tr>
+<td>
+</td>
+<td>a
+</td></tr></table>
+
+!! end
+
+!! test
+Table-cell after a comment-only-empty-line
+!! wikitext
+{|
+|a
+<!--c1-->
+<!--c2-->|b
+|}
+!! html
+<table>
+<tr>
+<td>a
+</td>
+<td>b
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
+<!--c1-->
+<!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
+</tbody></table>
+
+!! end
+
+!! test
+Build table with {{!}}
+!! wikitext
+{{{!}} class="wikitable"
+!header
+!second header
+{{!}}- style="color:red;"
+{{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
+{{!}}}
+!! html
+<table class="wikitable">
+<tr>
+<th>header
+</th>
+<th>second header
+</th></tr>
+<tr style="color:red;">
+<td>data</td>
+<td style="color:red;">second data
+</td></tr></table>
+
+!! end
+
+!! test
+Build table with pipe as data
+!! wikitext
+{| class="wikitable"
+!header
+!second header
+|- style="color:red;"
+|data|| style="color:red;" |second data
+|-
+| style="color:red;" |data with | || style="color:red;" | second data with |
+|-
+||data with | |||second data with |
+|}
+!! html
+<table class="wikitable">
+<tr>
+<th>header
+</th>
+<th>second header
+</th></tr>
+<tr style="color:red;">
+<td>data</td>
+<td style="color:red;">second data
+</td></tr>
+<tr>
+<td style="color:red;">data with |</td>
+<td style="color:red;">second data with |
+</td></tr>
+<tr>
+<td>data with |</td>
+<td>second data with |
+</td></tr></table>
+
+!! end
+
+!! test
+Build table with wikilink
+!! wikitext
+{| class="wikitable"
+!header||second header
+|- style="color:red;"
+|data [[Main Page|linktext]]||second data [[Main Page|linktext]]
+|-
+|data||second data [[Main Page|link|text with pipe]]
+|}
+!! html
+<table class="wikitable">
+<tr>
+<th>header</th>
+<th>second header
+</th></tr>
+<tr style="color:red;">
+<td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
+<td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
+</td></tr>
+<tr>
+<td>data</td>
+<td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
+</td></tr></table>
+
+!! end
+
+# The expected HTML structure in this test is debatable. The PHP parser does
+# not parse this kind of table at all. The main focus for Parsoid is on
+# round-tripping, so this output is ok for now. TODO: revisit!
+!! test
+Wikitext table with html-syntax row
+!! wikitext
+{|
+|-
+<td>foo</td>
+|}
+!! html/parsoid
+<table>
+<tbody>
+<tr>
+<td>foo</td></tr></tbody></table>
+!! end
+
+!! test
+Fostered content in tables: Plain text
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+|-
+a
+|}
+!! html/php
+<table>
+
+a
+</table>
+
+!! html/php+tidy
+
+
+a
+<table></table>
+!! html/parsoid
+<p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
+<tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
+
+</tr></tbody></table>
+!! end
+
+!! test
+Fostered content in tables: Lists
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+|-
+*a
+|}
+!! html/php
+<table>
+
+<ul><li>a</li></ul>
+</table>
+
+!! html/php+tidy
+<ul><li>a</li></ul><table>
+
+
+</table>
+!! html/parsoid
+<ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
+<tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
+
+</tr></tbody></table>
+!! end
+
+!! test
+Template generated table cell with attributes
+!! wikitext
+{|
+|-
+{{table_attribs_4}} ||a||b
+|}
+!! html/php+tidy
+<table>
+
+<tbody><tr>
+<td style="background-color:#DC241f;" width="10px"></td>
+<td>a</td>
+<td>b
+</td></tr></tbody></table>
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
+<td style="background-color:#DC241f;" width="10px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"table_attribs_4","href":"./Template:Table_attribs_4"},"params":{},"i":0}}," ||a||b"]}'></td><td about="#mwt1">a</td><td about="#mwt1">b</td></tr>
+!! end
+
+!! test
+Parsoid: Round-trip tables directly followed by content (T53219)
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+{|
+|foo
+|} bar
+
+{|
+|baz
+|}<b>quux</b>
+!! html+tidy
+<table>
+<tbody><tr>
+<td>foo
+</td></tr></tbody></table><p> bar
+</p><table>
+<tbody><tr>
+<td>baz
+</td></tr></tbody></table><p><b>quux</b>
+</p>
+!! end
+
+!! test
+Parsoid: Default to a newline after tables in new content (T53219)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody>
+<tr><td>foo</td></tr></tbody></table> bar
+<table><tbody>
+<tr><td>baz</td></tr></tbody></table><b>quux</b>
+!! wikitext
+{|
+|foo
+|}
+<nowiki> </nowiki>bar
+{|
+|baz
+|}
+'''quux'''
+!! end
+
+!! test
+Parsoid: newline inducing block nodes don't suppress <nowiki>
+!! options
+parsoid=html2wt
+!! html/parsoid
+ a<h1>foo</h1>
+!! wikitext
+<nowiki> </nowiki>a
+
+= foo =
+!! end
+
+!! test
+Parsoid: Row-syntax table headings followed by comment & table cells
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+{|
+!foo||bar
+<!-- foo --> ||baz||quux
+|}
+!! html/php
+<table>
+<tr>
+<th>foo</th>
+<th>bar
+</th>
+<td>baz</td>
+<td>quux
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><th> foo </th><th> bar
+<!-- foo --> </th><td> baz </td><td> quux</td></tr>
+</tbody></table>
+!! end
+
+!!test
+Parsoid: Recover better from broken table attributes
+!!options
+parsoid=wt2html
+!!wikitext
+{| class="foo
+| class="bar" |
+foo
+|}
+!!html/php+tidy
+<table class="foo">
+<tbody><tr>
+<td class="bar">
+<p>foo
+</p>
+</td></tr></tbody></table>
+!!html/parsoid
+<table class="foo">
+<tr>
+<td class="bar">
+<p>foo</p></td></tr>
+</tbody></table>
+!!end
+
+!! test
+Tables: Digest broken attributes on table and tr tag
+!! options
+parsoid=wt2html
+!! wikitext
+{| || |} ++
+|- || || ++ --
+|- > [
+|}
+!! html
+<table>
+<tbody>
+<tr class='mw-empty-elt'></tr>
+<tr class='mw-empty-elt'></tr>
+</tbody></table>
+!! end
+
+# T137406: Whitespace in the HTML
+!! test
+1. Generate correct wikitext for tables with thead/tbody/tfoot
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+<caption>Test</caption>
+<thead>
+<tr>
+<th>Month</th>
+<th>Savings</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>January</td>
+<td>$100</td>
+</tr>
+<tr>
+<td>February</td>
+<td>$80</td>
+</tr>
+</tbody>
+<tfoot>
+<tr>
+<td>Sum</td>
+<td>$180</td>
+</tr>
+</tfoot>
+</table>
+!! wikitext
+{|
+|+Test
+!Month
+!Savings
+|-
+|January
+|$100
+|-
+|February
+|$80
+|-
+|Sum
+|$180
+|}
+!! html/php+tidy
+<table>
+<caption>Test
+</caption>
+<tbody><tr>
+<th>Month
+</th>
+<th>Savings
+</th></tr>
+<tr>
+<td>January
+</td>
+<td>$100
+</td></tr>
+<tr>
+<td>February
+</td>
+<td>$80
+</td></tr>
+<tr>
+<td>Sum
+</td>
+<td>$180
+</td></tr></tbody></table>
+!! end
+
+# T137406: No whitespace in the HTML
+!! test
+2. Generate correct wikitext for tables with thead/tbody/tfoot
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
+!! wikitext
+{|
+!heading
+|-
+|foo
+|}
+!! end
+
+!! test
+Testing serialization after deletion in references
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["#x", "remove"]
+ ]
+}
+!! wikitext
+hi <ref><div id="x">ho</div></ref>
+
+<references />
+!! wikitext/edited
+hi <ref></ref>
+
+<references />
+!! end
+
+!!test
+Testing serialization after deletion of table cells
+!!options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["#x", "remove"]
+ ]
+}
+!!wikitext
+{|
+!h1 !!h2 !!h3
+| id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
+|}
+!! wikitext/edited
+{|
+!h1 !!h2 !!h3
+|c2 |||c3
+|}
+!!end
+
+!! test
+Testing selser after addition of new row before first row (T125419)
+!! options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ [ "tr", "before", "<tr><td>X</td></tr>" ]
+ ]
+}
+!! wikitext
+{|
+|a
+|}
+!! wikitext/edited
+{|
+|X
+|-
+|a
+|}
+!! end
+
+!! test
+Serialize new table rows in a HTML table using HTML tags
+!! options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ [ "tr", "before", "<tr><td>X</td></tr>" ]
+ ]
+}
+!! wikitext
+<table><tr><td>a</td></tr></table>
+!! wikitext/edited
+<table><tr><td>X</td></tr><tr><td>a</td></tr></table>
+!! end
+
+!! test
+Serialize new table cells in a HTML row using HTML tags
+!! options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ [ "td", "before", "<td>X</td>" ]
+ ]
+}
+!! wikitext
+<table><tr><td>a</td></tr></table>
+!! wikitext/edited
+<table><tr><td>X</td><td>a</td></tr></table>
+!! end
+
+!! test
+Wikitext tables can be nested inside HTML tables
+!! options
+parsoid=html2wt
+!! html
+<table data-parsoid='{"stx":"html"}'>
+<tr><td>
+<table>
+<tr><td>foo</td></tr>
+</table>
+</td></tr>
+</table>
+!! wikitext
+<table>
+<tr><td>
+{|
+|foo
+|}
+</td></tr>
+</table>
+!! end
+
+!! test
+Serialize wikitext list items as HTML list items when embedded in a HTML list
+!! options
+parsoid=html2wt
+!! html
+<ul data-parsoid='{"stx": "html"}'>
+<li data-parsoid='{}'>a</li>
+<li>b</li>
+</ul>
+!! wikitext
+<ul>
+<li>a</li>
+<li>b</li>
+</ul>
+!! end
+
+# SSS FIXME: Is this actually a good thing given the
+# odd nested list output that is generated by MW?
+# <ul><li>foo<ul>..</ul></li></ul> instead of
+# <ul><li>foo</li><ul>..</ul></ul>
+!! test
+Wikitext lists can be nested inside HTML lists
+!! options
+parsoid=html2wt
+!! html
+<ul data-parsoid='{"stx": "html"}'>
+<li data-parsoid='{"stx": "html"}'>a
+<ul><li>b</li></ul>
+</li>
+</ul>
+
+<ul data-parsoid='{"stx": "html"}'>
+<li>x
+<ul><li>y</li></ul>
+</li>
+</ul>
+!! wikitext
+<ul>
+<li>a
+* b
+</li>
+</ul>
+
+<ul>
+<li>x
+* y
+</li>
+</ul>
+!! end
+
+###
+### Internal links
+###
+!! test
+Plain link, capitalized
+!! wikitext
+[[Main Page]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+!! end
+
+!! test
+Plain link, uncapitalized
+!! wikitext
+[[main Page]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
+</p>
+!! end
+
+!! test
+Piped link
+!! wikitext
+[[Main Page|The Main Page]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
+</p>
+!! end
+
+!! test
+Piped link with comment in link text
+!! wikitext
+[[Main Page|The Main<!--front--> Page]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
+</p>
+!! end
+
+!! test
+Piped link with multiple pipe characters in link text
+!! wikitext
+[[Main Page||The|Main|Page|]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
+!! end
+
+!! test
+Piped link with no link text
+!! wikitext
+[[Thomas Bek (bishop of St David's)|]]
+!! html/php
+<p>[[Thomas Bek (bishop of St David's)|]]
+</p>
+!! html/parsoid
+<p>[[Thomas Bek (bishop of St David's)|]]</p>
+!! end
+
+!! test
+Piped link with empty link text
+!! wikitext
+[[Main Page|<nowiki/>]] - empty nowiki
+[[Main Page| ]] - empty space
+[[Main Page|&nbsp;]] - empty non breaking space
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
+<a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
+<a href="/wiki/Main_Page" title="Main Page">&#160;</a> - empty non breaking space
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
+!! end
+
+!! test
+Broken link
+!! wikitext
+[[Zigzagzogzagzig]]
+!! html
+<p><a href="/index.php?title=Zigzagzogzagzig&amp;action=edit&amp;redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
+</p>
+!! end
+
+!! test
+Broken link with fragment
+!! wikitext
+[[Zigzagzogzagzig#zug]]
+!! html
+<p><a href="/index.php?title=Zigzagzogzagzig&amp;action=edit&amp;redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
+</p>
+!! end
+
+!! test
+Special page link with fragment
+!! wikitext
+[[Special:Version#anchor]]
+!! html
+<p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
+</p>
+!! end
+
+!! test
+Nonexistent special page link with fragment
+!! wikitext
+[[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
+!! html
+<p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
+</p>
+!! end
+
+!! test
+Link with prefix
+!! wikitext
+xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
+!! html
+<p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+!! end
+
+!! test
+Link with suffix
+!! wikitext
+[[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
+</p>
+!! end
+
+!! article
+prefixed article
+!! text
+Some text
+!! endarticle
+
+!! test
+T45661: Piped links with identical prefixes
+!! wikitext
+[[prefixed article|prefixed articles with spaces]]
+
+[[prefixed article|prefixed articlesaoeu]]
+
+[[Main Page|Main Page test]]
+!! html
+<p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
+</p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
+</p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
+</p>
+!! end
+
+
+!! test
+Link with HTML entity in suffix / tail
+!! wikitext
+[[Main Page]]&quot;, [[Main Page]]&#97;
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>&quot;, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>&#97;
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;quot;","srcContent":"\""}'>"</span>, <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#97;","srcContent":"a"}'>a</span></p>
+!! end
+
+!! test
+Link with 3 brackets
+!! wikitext
+[[[Main Page]]]
+Foo [[[Main Page]]]
+!! html
+<p>[[[Main Page]]]
+Foo [[[Main Page]]]
+</p>
+!! end
+
+!! test
+Link with 4 brackets
+!! wikitext
+[[[[Main Page]]]]
+!! html
+<p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
+</p>
+!! end
+
+!! test
+Piped link with 3 brackets
+!! wikitext
+[[[main page|the main page]]]
+!! html
+<p>[[[main page|the main page]]]
+</p>
+!! end
+
+!! test
+Piped link with extlink-like text
+!! wikitext
+[[Main Page|[bar]]]
+[[Main Page|This is a [bar]]]
+[[Main Page|[bar]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
+<a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
+<a href="/wiki/Main_Page" title="Main Page">[bar</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
+!! end
+
+!! test
+Link with multiple pipes
+!! wikitext
+[[Main Page|The|Main|Page]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
+</p>
+!! end
+
+!! test
+Anchor containing a #. (T65430)
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+[[Main Page#And#Link]]
+!! html/php
+<p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
+!! end
+
+!! test
+Link to namespaces
+!! wikitext
+[[Talk:Parser testing]], [[Meta:Disclaimers]]
+!! html
+<p><a href="/index.php?title=Talk:Parser_testing&amp;action=edit&amp;redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&amp;action=edit&amp;redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
+</p>
+!! end
+
+!! test
+Link with space in namespace
+!! wikitext
+[[User talk:Foo bar]]
+!! html
+<p><a href="/index.php?title=User_talk:Foo_bar&amp;action=edit&amp;redlink=1" class="new" title="User talk:Foo bar (page does not exist)">User talk:Foo bar</a>
+</p>
+!! end
+
+!! article
+MemoryAlpha:AlphaTest
+!! text
+This is an article in the MemoryAlpha namespace
+(which shadows the memoryalpha interwiki link).
+!! endarticle
+
+!! test
+Namespace takes precedence over interwiki link (T53680)
+!! wikitext
+[[MemoryAlpha:AlphaTest]]
+!! html
+<p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
+</p>
+!! end
+
+# The previous test doesn't work correctly in html2*, due to not recognizing the
+# link as an internal one. This one checks for the correct behavior.
+!! test
+Link to namespace preferred over interwiki with correct rel attribute
+!! options
+parsoid=html2wt,html2html
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
+!! wikitext
+[[MemoryAlpha:AlphaTest]]
+!! end
+
+!! test
+Piped link to namespace
+!! wikitext
+[[Meta:Disclaimers|The disclaimers]]
+!! html
+<p><a href="/index.php?title=Meta:Disclaimers&amp;action=edit&amp;redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
+</p>
+!! end
+
+!! test
+Link containing }
+!! wikitext
+[[Usually caused by a typo (oops}]]
+!! html
+<p>[[Usually caused by a typo (oops}]]
+</p>
+!! end
+
+!! article
+7% Solution
+!! text
+Just a test of an article title containing a percent.
+!! endarticle
+
+!! test
+Link containing % (not as a hex sequence)
+!! wikitext
+[[7% Solution]]
+[[7% Solution|7%25 Solution]]
+!! html/php
+<p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
+<a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
+<a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
+!! end
+
+# note that the parsoid HTML is identical to the previous test output,
+# so the previous test ensures that the html2wt mode will generate the
+# "not as a hex sequence" wikitext.
+!! test
+Link containing % as a single hex sequence interpreted to char
+!! options
+parsoid=wt2wt,wt2html,html2html
+!! wikitext
+[[7%25 Solution]]
+[[7%25 Solution|7%25 Solution]]
+!! html/php
+<p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
+<a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
+<a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
+!!end
+
+!! test
+Link containing % as a double hex sequence interpreted to hex sequence
+!! wikitext
+[[7%2525 Solution]]
+!! html
+<p>[[7%2525 Solution]]
+</p>
+!!end
+
+## Example for such a section: == < ==
+!! test
+Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+[[%23%3c]][[%23%3e]]
+!! html/php
+<p><a href="#&lt;">#&lt;</a><a href="#&gt;">#&gt;</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page#&lt;" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#&lt;"},"sa":{"href":"%23%3c"}}'>#&lt;</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
+!! end
+
+## Example for such a section: == < ==
+!! test
+Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+[[%23%3c]][[%23%3e]]
+!! html/php
+<p><a href="#.3C">#&lt;</a><a href="#.3E">#&gt;</a>
+</p>
+!! end
+
+!! test
+Link containing "<#" and ">#" as a hex sequences
+!! wikitext
+[[%3c%23]][[%3e%23]]
+!! html
+<p>[[%3c%23]][[%3e%23]]
+</p>
+!! end
+
+!! test
+Link containing an equals sign
+!! wikitext
+[[Special:BookSources/isbn=4-00-026157-6]]
+!! html/php
+<p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Special:BookSources/isbn=4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a></p>
+!! end
+
+!! article
+Foo~bar
+!! text
+Just a test of an article title containing a tilde.
+!! endarticle
+
+# note that links containing signatures, like [[Foo~~~~]], are
+# massaged by the pre-save transform (PST) and so the tildes are never
+# seen by the parser.
+!! test
+Link containing a tilde
+!! wikitext
+[[Foo~bar]]
+!! html/php
+<p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
+!! end
+
+!! test
+Link containing double-single-quotes '' (T6598)
+!! wikitext
+[[Lista d''e paise d''o munno]]
+!! html/php
+<p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&amp;action=edit&amp;redlink=1" class="new" title="Lista d&#39;&#39;e paise d&#39;&#39;o munno (page does not exist)">Lista d''e paise d''o munno</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Lista_d''e_paise_d''o_munno" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a></p>
+!! end
+
+!! test
+Link containing double quotes and spaces
+!! wikitext
+[[Cool "Gator"]]
+!! html/php
+<p><a href="/index.php?title=Cool_%22Gator%22&amp;action=edit&amp;redlink=1" class="new" title="Cool &quot;Gator&quot; (page does not exist)">Cool "Gator"</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
+!! end
+
+!! test
+File containing double quotes and spaces
+!! wikitext
+[[File:Cool "Gator".png]]
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Cool_%22Gator%22.png" data-parsoid='{"a":{"href":"./File:Cool_%22Gator%22.png"},"sa":{"href":"File:Cool \"Gator\".png"}}'><img resource='./File:Cool_"Gator".png' src="./Special:FilePath/Cool_%22Gator%22.png" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Cool_\"Gator\".png","height":"220","width":"220","src":"./Special:FilePath/Cool_%22Gator%22.png"},"sa":{"resource":"File:Cool \"Gator\".png","src":"./Special:FilePath/Cool_\"Gator\".png"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Redirect containing double quotes and spaces
+!! wikitext
+#REDIRECT [[Cool "Gator"]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
+!! end
+
+!! test
+Link containing double-single-quotes '' in text (T6598 sanity check)
+!! wikitext
+Some [[Link|pretty ''italics'' and stuff]]!
+!! html/php
+<p>Some <a href="/index.php?title=Link&amp;action=edit&amp;redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
+</p>
+!! html/parsoid
+<p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
+!! end
+
+!! test
+Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
+!! wikitext
+''Some [[Link|pretty ''italics'' and stuff]]!''
+!! html
+<p><i>Some <a href="/index.php?title=Link&amp;action=edit&amp;redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
+</p>
+!! end
+
+!! test
+Link with double quotes in title part (literal) and alternate part (interpreted)
+!! wikitext
+[[File:Denys_Savchenko_''Pentecoste''.jpg]]
+
+[[''Pentecoste'']]
+
+[[''Pentecoste''|Pentecoste]]
+
+[[''Pentecoste''|''Pentecoste'']]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko &#39;&#39;Pentecoste&#39;&#39;.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
+</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="&#39;&#39;Pentecoste&#39;&#39; (page does not exist)">''Pentecoste''</a>
+</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="&#39;&#39;Pentecoste&#39;&#39; (page does not exist)">Pentecoste</a>
+</p><p><a href="/index.php?title=%27%27Pentecoste%27%27&amp;action=edit&amp;redlink=1" class="new" title="&#39;&#39;Pentecoste&#39;&#39; (page does not exist)"><i>Pentecoste</i></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Denys_Savchenko_''Pentecoste''.jpg"><img resource="./File:Denys_Savchenko_''Pentecoste''.jpg" src="./Special:FilePath/Denys_Savchenko_''Pentecoste''.jpg" height="220" width="220"/></a></figure-inline></p>
+<p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
+<p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
+<p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
+!! end
+
+!! test
+Broken image links with HTML captions (T41700)
+!! wikitext
+[[File:Nonexistent|<script></script>]]
+[[File:Nonexistent|100x100px|<script></script>]]
+[[File:Nonexistent|&lt;]]
+[[File:Nonexistent|a<i>b</i>c]]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
+<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;script&gt;&lt;/script&gt;</a>
+<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">&lt;</a>
+<a href="/index.php?title=Special:Upload&amp;wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;script>&lt;/script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&amp;lt;script>&amp;lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
+<figure-inline typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"100x100px"},{"ck":"caption","ak":"&lt;script>&lt;/script>"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&amp;lt;script>&amp;lt;/script>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="100" width="100" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"100","width":"100"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
+<figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&amp;lt;"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;span typeof=\"mw:Entity\" data-parsoid=&#39;{\"src\":\"&amp;amp;lt;\",\"srcContent\":\"&amp;lt;\",\"dsr\":[107,111,null,null]}&#39;>&amp;lt;&lt;/span>"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline>
+<figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"a&lt;i>b&lt;/i>c"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"a&lt;i data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[134,142,3,4]}&#39;>b&lt;/i>c"}'><a href="./File:Nonexistent" data-parsoid='{"a":{"href":"./File:Nonexistent"},"sa":{}}'><img resource="./File:Nonexistent" src="./Special:FilePath/Nonexistent" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Nonexistent","height":"220","width":"220"},"sa":{"resource":"File:Nonexistent"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Plain link to URL
+!! wikitext
+[[http://www.example.com]]
+!! html/php
+<p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
+</p>
+!! html/parsoid
+<p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
+!! end
+
+!! test
+Plain link to URL with link text
+!! wikitext
+[[http://www.example.com Link text]]
+!! html
+<p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
+</p>
+!! end
+
+!! test
+Plain link to protocol-relative URL
+!! wikitext
+[[//www.example.com]]
+!! html/php
+<p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
+</p>
+!! html/parsoid
+<p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
+!! end
+
+!! test
+Plain link to protocol-relative URL with link text
+!! wikitext
+[[//www.example.com Link text]]
+!! html
+<p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
+</p>
+!! end
+
+!! test
+Plain link to page with question mark in title
+!! wikitext
+[[A?b]]
+
+[[A?b|Baz]]
+!! html
+<p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
+</p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
+</p>
+!! end
+
+# I'm fairly sure the expected result here is wrong.
+# We want these to be URL links, not pseudo-pages with URLs for titles....
+# However the current output is also pretty screwy.
+#
+# ----
+# I'm changing it to match the current output--it arguably makes more
+# sense in the light of the test above. Old expected result was:
+#<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&amp;action=edit" class="new">an example URL</a>
+#</p>
+# But I think this test is bordering on "garbage in, garbage out" anyway.
+# -- wtm
+!! test
+Piped link to URL
+!! wikitext
+Piped link to URL: [[http://www.example.com|an example URL]]
+!! html/php
+<p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
+</p>
+!! html/parsoid
+<p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" href="http://www.example.com%7Can" data-parsoid='{"a":{"href":"http://www.example.com%7Can"},"sa":{"href":"http://www.example.com|an"}}'>example URL</a>]</p>
+!! end
+
+!! test
+Plain link in template argument
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|[http://www.example.com |123]}}
+
+{{echo|[[http://www.example.com |123]]}}
+
+{{echo|[[http://www.example.com |123]}}
+
+{{echo|[http://www.example.com |123]]}}
+!! html/php
+<p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
+</p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
+</p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
+</p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
+
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[http://www.example.com |123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external text" href="http://www.example.com">|123</a>]</p>
+
+<p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
+
+<p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[http://www.example.com "},"2":{"wt":"123]]"}},"i":0}}]}'>[<a rel="mw:ExtLink" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
+!! end
+
+!! test
+T2002: [[page|http://url/]] should link to page, not http://url/
+!! wikitext
+[[Main Page|http://url/]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
+!! end
+
+# Parsoid does not mark self-links, by design.
+!! test
+T2337: Escaped self-links should be bold
+!! options
+title=[[Bug462]]
+!! wikitext
+[[Bu&#103;462]] [[Bug462]]
+!! html/php+tidy
+<p><a class="mw-selflink selflink">Bu&#103;462</a> <a class="mw-selflink selflink">Bug462</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
+!! end
+
+!! test
+Self-link to section should not be bold
+!! options
+title=[[Main Page]]
+!! wikitext
+[[Main Page#section]]
+!! html
+<p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
+</p>
+!! end
+
+!! article
+00
+!! text
+This is 00.
+!! endarticle
+
+!!test
+Self-link to numeric title
+!!options
+title=[[0]]
+!! wikitext
+[[0]]
+!! html
+<p><a class="mw-selflink selflink">0</a>
+</p>
+!!end
+
+!!test
+Link to numeric-equivalent title
+!!options
+title=[[0]]
+!! wikitext
+[[00]]
+!! html
+<p><a href="/wiki/00" title="00">00</a>
+</p>
+!!end
+
+!! test
+<nowiki> inside a link
+!! wikitext
+[[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
+!! html
+<p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
+</p>
+!! end
+
+!! test
+Non-breaking spaces in title
+!! wikitext
+[[&nbsp; Main &nbsp; Page &nbsp;]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">&#160; Main &#160; Page &#160;</a>
+</p>
+!!end
+
+# Add new article for the test below so that it doesn't red-link
+!! article
+Foo bar baz
+!! text
+boo
+!! endarticle
+
+!! test
+Multiple spaces in titles should normalize to a single underscore
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+[[Foo bar baz|x]]
+[[Foo bar baz|x]]
+[[Foo bar baz|x]]
+!! html/php
+<p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
+<a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
+<a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
+<a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
+<a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
+</p>
+!! end
+
+!! test
+Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
+!! options
+language=ca
+!! wikitext
+'''[[Main Page]]'''
+!! html
+<p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
+</p>
+!! end
+
+!! test
+Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
+!! options
+language=ca
+!! wikitext
+''[[Main Page]]''
+!! html
+<p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
+</p>
+!! end
+
+!! test
+Internal link with en linktrail: no apostrophes (T29473)
+!! options
+language=en
+!! wikitext
+[[Something]]'nice
+!! html
+<p><a href="/index.php?title=Something&amp;action=edit&amp;redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
+</p>
+!! end
+
+!! test
+Internal link with ca linktrail with apostrophes (T29473)
+!! options
+language=ca
+!! wikitext
+[[Something]]'nice
+!! html
+<p><a href="/index.php?title=Something&amp;action=edit&amp;redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
+</p>
+!! end
+
+!! test
+Internal link with kaa linktrail with apostrophes (T29473)
+!! options
+language=kaa
+!! wikitext
+[[Something]]'nice
+!! html
+<p><a href="/index.php?title=Something&amp;action=edit&amp;redlink=1" class="new" title="Something (bet ele jaratılmag&#39;an)">Something'nice</a>
+</p>
+!! end
+
+!! test
+Link with multiple ":" in a subpage-supporting namespace (T65636)
+!! wikitext
+[[User:Foo/Test/63636:Bar|Test]]
+!! html/php
+<p><a href="/index.php?title=User:Foo/Test/63636:Bar&amp;action=edit&amp;redlink=1" class="new" title="User:Foo/Test/63636:Bar (page does not exist)">Test</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
+!! end
+
+## Mainly a sanity check for Parsoid
+!! test
+Handle title parsing for subpages
+!! options
+title=[[/123123]]
+subpage
+!! wikitext
+123
+!! html/php
+<p>123
+</p>
+!! html/parsoid
+<p>123</p>
+!! end
+
+!! article
+User:Test/123
+!! text
+test 123
+!! endarticle
+
+!! test
+Link to a subpage from a namespace other than main
+!! options
+title=[[User:Test]]
+subpage
+!! wikitext
+[[/123]]
+!! html/php
+<p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./User:Test/123" title="User:Test/123" data-parsoid='{"stx":"simple","a":{"href":"./User:Test/123"},"sa":{"href":"/123"}}'>/123</a></p>
+!! end
+
+!! test
+Ensure that transclusion titles are not url-decoded
+!! options
+subpage title=[[Test]]
+parsoid=wt2html
+!! wikitext
+{{Bar%C3%A9}} {{/Bar%C3%A9}}
+!! html/php
+<p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
+</p>
+!! html/parsoid
+<p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
+!! end
+
+!! test
+Purely hash wikilink
+!! options
+title=[[User:Test/123]]
+subpage
+!! wikitext
+[[#a|b]]
+!! html/php
+<p><a href="#a">b</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./User:Test/123#a" data-parsoid='{"stx":"piped","a":{"href":"./User:Test/123#a"},"sa":{"href":"#a"}}'>b</a></p>
+!! end
+
+!! test
+Serialization of purely hash wikilink
+!! options
+title=[[User:Test/123]]
+subpage
+parsoid=html2wt
+!! html/parsoid
+<p><a href="#a">[[</a></p>
+!! wikitext
+[[#a|<nowiki>[[</nowiki>]]
+!! html/php
+<p><a href="#a">[[</a>
+</p>
+!! end
+
+!! test
+1. Interaction of linktrail and template encapsulation
+!! wikitext
+{{echo|[[Foo]]}}l
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo]]"}},"i":0}},"l"]}'>Fool</a></p>
+!! end
+
+!! test
+2. Interaction of linktrail and template encapsulation
+!! options
+parsoid
+!! wikitext
+{{echo|Some [[Fool]]}}s
+!! html
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]"}},"i":0}},"s"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some </span><a rel="mw:WikiLink" href="./Fool" title="Fool" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a></p>
+!! end
+
+!! test
+3. Interaction of linktrail and template encapsulation
+!! options
+parsoid
+!! wikitext
+{{echo|Some [[Fool]]s are '''bold and foolish'''}}
+!! html
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Some [[Fool]]s are &#39;&#39;&#39;bold and foolish&#39;&#39;&#39;"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>Some <a rel="mw:WikiLink" href="./Fool" title="Fool" data-parsoid='{"stx":"simple","a":{"href":"./Fool"},"sa":{"href":"Fool"},"tail":"s"}'>Fools</a> are <b>bold and foolish</b></p>
+!! end
+
+!! article
+Söfnuður
+!! text
+Test.
+!! endarticle
+
+!! test
+Internal link with is link prefix
+!! options
+language=is
+!! wikitext
+Aðrir mótmælenda[[söfnuður|söfnuðir]] og
+!! html
+<p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
+</p>
+!! end
+
+!! article
+Mótmælendatrú
+!! text
+Test.
+!! endarticle
+
+!! test
+Internal link with is link trail and link prefix
+!! options
+language=is
+!! wikitext
+[[mótmælendatrú|xxx]]ar
+[[mótmælendatrú]]ar
+mótmælenda[[söfnuður]]
+mótmælenda[[söfnuður|söfnuðir]]
+mótmælenda[[söfnuður|söfnuðir]]xxx
+!! html
+<p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
+<a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
+</p>
+!! end
+
+!! test
+Parsoid link trail escaping
+!! options
+parsoid=html2wt,html2html
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
+!! wikitext
+[[apple]]<nowiki/>s
+!! end
+
+!! test
+Parsoid link prefix escaping
+!! options
+language=is
+parsoid=html2wt,html2html
+!! html/parsoid
+<p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
+!! wikitext
+Aðrir mótmælenda<nowiki/>[[söfnuður]]
+!! end
+
+!! test
+Parsoid link bracket escaping
+!! options
+parsoid=html2wt,html2html
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
+<p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
+<p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
+<p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
+<p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
+<p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
+!! wikitext
+[[Test]]
+
+[<nowiki/>[[Test]]]
+
+[[[[Test]]]]
+
+[[[<nowiki/>[[Test]]]]]
+
+[[[[[[Test]]]]]]
+
+[[[[[<nowiki/>[[Test]]]]]]]
+!! end
+
+!! test
+Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
+!! wikitext
+[[Foo| bar]]
+
+[[Foo| ''bar'']]
+
+[http://wp.org foo]
+
+[http://wp.org ''foo'']
+!! html
+<p><a href="/wiki/Foo" title="Foo"> bar</a>
+</p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
+</p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
+</p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
+</p>
+!! end
+
+!! test
+Parsoid: Scoped parsing should handle mixed transclusions and plain text
+!! wikitext
+[[Foo|{{echo|a}} b {{echo|c}}]]
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span> b <span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c"}},"i":0}}]}'>c</span></a></p>
+!! end
+
+!! test
+Link with angle bracket after anchor
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+[[Foo#<bar>]]
+!! html/php
+<p><a href="/wiki/Foo#&lt;bar&gt;" title="Foo">Foo#&lt;bar&gt;</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo#&lt;bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#&lt;bar>"},"sa":{"href":"Foo#&lt;bar>"}}'>Foo#&lt;bar></a></p>
+!! end
+
+!! test
+Link with angle bracket after anchor (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+[[Foo#<bar>]]
+!! html/php
+<p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#&lt;bar&gt;</a>
+</p>
+!! end
+
+###
+### Interwiki links (see maintenance/interwiki.sql)
+###
+
+!! test
+Inline interwiki link
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[MeatBall:SoftSecurity]]
+!! html/php
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
+!! end
+
+!! test
+Inline interwiki link with empty title (T4372)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[MeatBall:]]
+!! html/php
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
+!! end
+
+## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
+!! test
+Interwiki link encoding conversion (T3636)
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+*[[Wikipedia:ro:Olteni&#0355;a]]
+*[[Wikipedia:ro:Olteni&#355;a]]
+!! html
+<ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteni&#355;a</a></li>
+<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteni&#355;a</a></li></ul>
+
+!! html/php+tidy
+<ul>
+<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+<li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+</ul>
+!! html/parsoid
+<ul>
+<li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+<li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+</ul>
+!! end
+
+!! test
+Interwiki link with fragment (T4130)
+!! wikitext
+[[MeatBall:SoftSecurity#foo]]
+!! html
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
+</p>
+!! end
+
+!! test
+Link scenarios with escaped fragments
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+[[#Is this great?]]
+[[Foo#Is this great?]]
+[[meatball:Foo#Is this great?]]
+!! html/php
+<p><a href="#Is_this_great?">#Is this great?</a>
+<a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
+<a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
+<a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
+!! end
+
+!! test
+Link scenarios with escaped fragments (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+[[#Is this great?]]
+[[Foo#Is this great?]]
+[[meatball:Foo#Is this great?]]
+!! html/php
+<p><a href="#Is_this_great.3F">#Is this great?</a>
+<a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great.3F" class="extiw" title="meatball:Foo">meatball:Foo#Is this great?</a>
+</p>
+!! end
+
+# Ideally the wikipedia: prefix here should be proto-relative too
+# [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
+# define the 'en' prefix, and originally the test used 'wikipedia',
+# which isn't a localinterwiki prefix hence the links to the 'en:Foo'
+# article.
+!! test
+Different interwiki prefixes mapping to the same URL
+!! wikitext
+[[:en:Foo]]
+
+[[:en:Foo|Foo]]
+
+[[wikipedia:Foo]]
+
+[[:wikipedia:Foo|Foo]]
+
+[[wikipedia:en:Foo]]
+
+[[:wikipedia:en:Foo]]
+
+[[ wikiPEdia :Foo]]
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">en:Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}' title="en:Foo">Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">wikipedia:Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}' title="wikipedia:Foo">Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}' title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
+
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":" wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo"> wikiPEdia :Foo</a></p>
+!! end
+
+!! test
+Interwiki links that cannot be represented in wiki syntax
+!! wikitext
+[[meatball:ok]]
+[[meatball:ok#foo|ok with fragment]]
+[[meatball:ok_as_well?|ok ending with ? mark]]
+[http://de.wikipedia.org/wiki/Foo?action=history has query]
+[http://de.wikipedia.org/wiki/#foo is just fragment]
+
+!! html/php
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well%3F" class="extiw" title="meatball:ok as well?">ok ending with ? mark</a>
+<a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
+<a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
+<a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
+<a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
+<a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
+<a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
+!! end
+
+!! test
+Interwiki links: trail
+!! wikitext
+[[wikipedia:Foo|Ba]]r
+!! html/php
+<p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}' title="wikipedia:Foo">Bar</a></p>
+!! end
+
+!! test
+Local interwiki link
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[local:Template:Foo]]
+!! html/php
+<p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
+!! end
+
+# Parsoid does not mark self-links, by design.
+!! test
+Local interwiki link: self-link to current page
+!! options
+title=[[Main Page]]
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[local:Main Page]]
+!! html/php
+<p><a class="mw-selflink selflink">local:Main Page</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
+!! end
+
+!! test
+Local interwiki link: prefix only (T66167)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[local:]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">local:</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
+!! end
+
+!! test
+Local interwiki link: with additional interwiki prefix (T63357)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[local:meatball:Hello]]
+!! html/php
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
+!! end
+
+!! test
+Multiple local interwiki link prefixes
+!! wikitext
+[[local:local:local:local:mi:local:Foo]]
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
+!! end
+
+###
+### Interlanguage links
+### Language links (so that searching for '### language' matches..)
+###
+
+!! test
+Interlanguage link
+!! wikitext
+Blah blah blah
+[[zh:Chinese]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
+!! end
+
+## parsoid html2wt will lose the space variations
+!! test
+Interlanguage link with spacing
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[ zh : Chinese ]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
+!! end
+
+!! test
+Double interlanguage link
+!! wikitext
+Blah blah blah
+[[es:Spanish]]
+[[zh:Chinese]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
+!! end
+
+## parsoid html2wt will lose the space variations
+!! test
+Interlanguage link variations
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[ es :Spanish]]
+[[ ZH :Chinese]]
+[[es:Foo_bar]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
+!! end
+
+!! test
+Escaping of interlanguage links (T129218, T156308)
+!! wikitext
+Blah blah blah
+[[:es:Spanish]]
+[[ : zh : Chinese ]]
+!! html/php
+<p>Blah blah blah
+<a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
+<a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
+</p>
+!! html/parsoid
+<p>Blah blah blah
+<a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
+<a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
+!! end
+
+!! test
+Multiple colons escaping interlanguage links
+!! options
+parsoid=wt2html
+!! wikitext
+[[:es:Spanish]]
+[[::es:Spanish]]
+[[:::es:Spanish]]
+!! html/php
+<p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
+[[::es:Spanish]]
+[[:::es:Spanish]]
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
+[[::es:Spanish]]
+[[:::es:Spanish]]</p>
+!! end
+
+## parsoid html2wt will normalize the space to _
+!! test
+Space and question mark encoding in interlanguage links (T95473)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[es:Foo bar?]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
+!! end
+
+!! test
+Interlanguage link, with prefix links
+!! options
+language=ln
+!! wikitext
+Blah blah blah
+[[zh:Chinese]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
+!! end
+
+!! test
+Double interlanguage link, with prefix links (T10897)
+!! options
+language=ln
+!! wikitext
+Blah blah blah
+[[es:Spanish]]
+[[zh:Chinese]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
+!! end
+
+!! test
+"Extra" interlanguage links (T34189 / gerrit 111390)
+!! wikitext
+Blah blah blah
+[[mul:Article]]
+!! html/php
+<p>Blah blah blah
+</p>
+!! html/parsoid
+<p>Blah blah blah</p>
+<link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
+!! end
+
+## PHP parser tests script needs an update
+## Parsoid html2wt will normalize output to [[:zh:Chinese]]
+!! test
+Language links render as inline links if $wgInterwikiMagic=false
+!! options
+wgInterwikiMagic=false
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[zh:Chinese]]
+!! html/parsoid
+<p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
+!! end
+
+## PHP parser tests script needs an update
+## Parsoid html2wt will normalize output to [[:zh:Chinese]]
+!! test
+Language links render as inline links in the Talk namespace
+!! options
+title=Talk:Foo
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[zh:Chinese]]
+!! html/parsoid
+<p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
+!! end
+
+!! test
+Parsoid-specific test: Wikilinks with &nbsp; should RT properly
+!! options
+language=ln
+!! wikitext
+[[WW&nbsp;II]]
+!! html
+<p><a href="/index.php?title=WW_II&amp;action=edit&amp;redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW&#160;II</a>
+</p>
+!! end
+
+!! test
+Parsoid T55221: Wikilinks should be properly entity-escaped
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<p>He&amp;nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&amp;nbsp;llo</a></p>
+<p>He&amp;nbsp;llo <a href="./He&amp;nbsp;llo" rel="mw:WikiLink">He&amp;nbsp;llo</a></p>
+!! wikitext
+He&amp;nbsp;llo [[Foo|He&amp;nbsp;llo]]
+
+He&amp;nbsp;llo He&amp;nbsp;llo
+!! html/php
+<p>He&amp;nbsp;llo <a href="/wiki/Foo" title="Foo">He&amp;nbsp;llo</a>
+</p><p>He&amp;nbsp;llo He&amp;nbsp;llo
+</p>
+!! end
+
+# html2wt will fail because of title normalization without data-parsoid
+!! test
+Parsoid: handle constructor well
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+[[constructor]]
+
+[[constructor:foo]]
+!! html/php
+<p><a href="/index.php?title=Constructor&amp;action=edit&amp;redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
+</p><p><a href="/index.php?title=Constructor:foo&amp;action=edit&amp;redlink=1" class="new" title="Constructor:foo (page does not exist)">constructor:foo</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
+
+<p><a rel="mw:WikiLink" href="./Constructor:foo" title="Constructor:foo" data-parsoid='{"stx":"simple","a":{"href":"./Constructor:foo"},"sa":{"href":"constructor:foo"}}'>constructor:foo</a></p>
+!! end
+
+!! article
+ko:
+!! text
+Test.
+!! endarticle
+
+# Note that `ko` isn't a known interlanguage prefix
+!! test
+Parsoid: recognize interlanguage links without a target page
+!! options
+ill
+!! wikitext
+[[es:]]
+
+[[ko:]]
+!! html/php
+es:
+!! html/parsoid
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
+
+<p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
+!! end
+
+# Note that `ko` isn't a known interwiki prefix
+!! test
+Parsoid: recognize interwiki links without a target page
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[:es:]]
+
+[[:ko:]]
+!! html/php
+<p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
+</p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
+<p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
+!! end
+
+!! test
+Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
+!! wikitext
+[[mi:Foo]]
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
+!! end
+
+!! test
+Interlanguage link with preceding local interwiki link (T70085)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[local:es:Spanish]]
+!! html/php
+<p>Blah blah blah
+<a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
+</p>
+!! html/parsoid
+<p>Blah blah blah
+<a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
+!! end
+
+!! test
+Looks like an interlanguage link, but is actually a local interwiki
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+Blah blah blah
+[[mi:Template:Foo]]
+!! html/php
+<p>Blah blah blah
+<a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
+</p>
+!! html/parsoid
+<p>Blah blah blah
+<a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
+!! end
+
+###
+### Redirects, Parsoid-only
+###
+
+!! test
+1. Simple redirect to page
+!! wikitext
+#REDIRECT [[Main Page]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+!! end
+
+!! test
+2. Other redirect variants
+!! wikitext
+#REDIRECT [[Main_Page]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
+!! end
+
+# Not a valid redirect in PHP (although perhaps it was, once upon a time)
+# This tests the Parsoid bail-out code.
+!! test
+3. Other redirect variants
+!! options
+parsoid=wt2html
+!! wikitext
+#REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
+!! html/parsoid
+<ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
+!! end
+
+!! test
+4. Redirect to a templated destination
+!! wikitext
+#REDIRECT [[{{echo|Foo}}bar]]
+!! html/parsoid
+<link about="#mwt2" typeof="mw:ExpandedAttrs" rel="mw:PageProp/redirect" href="./Foobar" data-parsoid='{"a":{"href":"./Foobar"},"sa":{"href":"{{echo|Foo}}bar"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}&#39;>Foo&lt;/span>bar"}]]}'/>
+!! end
+
+!! test
+Empty redirect
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+#REDIRECT [[]]
+!! html/parsoid
+<ol>
+<li>REDIRECT [[]]</li></ol>
+!! end
+
+!! test
+Optional colon in #REDIRECT
+!! options
+# the colon is archaic syntax. we support it for wt2html, but we
+# don't care that it roundtrips back to the modern syntax.
+parsoid=wt2html,html2html
+!! wikitext
+#REDIRECT:[[Main Page]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+!! end
+
+!! test
+Whitespace in #REDIRECT with optional colon
+!! options
+# the colon and gratuitous whitespace is archaic syntax. we support
+# it for wt2html, but we don't care that it roundtrips back to the
+# modern syntax (without extra whitespace)
+parsoid=wt2html,html2html
+!! wikitext
+
+ #REDIRECT
+:
+[[Main Page]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+!! end
+
+!! test
+Piped link in #REDIRECT
+!! options
+# content after piped link is ignored. we support this syntax,
+# but don't care that the piped link is lost when we roundtrip this.
+parsoid=wt2html
+!! wikitext
+#REDIRECT [[Main Page|bar]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+!! end
+
+!! test
+Redirect to category (T104502)
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+#REDIRECT [[Category:Foo]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Category:Foo"/>
+!! end
+
+!! test
+Redirect to category with URL encoding (T104502)
+!! options
+parsoid=wt2html
+!! wikitext
+#REDIRECT [[Category%3AFoo]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Category:Foo"/>
+!! end
+
+!! test
+Redirect to category page
+!! wikitext
+#REDIRECT [[:Category:Foo]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Category:Foo"/>
+!! end
+
+!! test
+Redirect to image page (1)
+!! wikitext
+#REDIRECT [[File:Wiki.png]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
+!! end
+
+!! test
+Redirect to image page (2)
+!! wikitext
+#REDIRECT [[Image:Wiki.png]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
+!! end
+
+# html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
+# Next test confirms this.
+!! test
+Redirect to language (1) (T104918)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+#REDIRECT [[en:File:Wiki.png]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
+!! end
+
+!! test
+Redirect to language (2) (T104918)
+!! wikitext
+#REDIRECT [[:en:File:Wiki.png]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
+!! end
+
+!! test
+Redirect to interwiki (T104918)
+!! wikitext
+#REDIRECT [[meatball:File:Wiki.png]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
+!! end
+
+!! test
+Non-English #REDIRECT
+!! options
+language=is
+!! wikitext
+#TILVÍSUN [[Main Page]]
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
+!! end
+
+!! test
+Redirect syntax under text isn't considered a redirect
+!! wikitext
+some text
+
+#redirect [[Main Page]]
+!! html/parsoid
+<p>some text</p>
+<ol data-parsoid='{}'><li data-parsoid='{}'>redirect <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'>Main Page</a></li></ol>
+!! end
+
+!! test
+New redirect
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
+!! wikitext
+#REDIRECT [[Foo]]
+Foo
+!! end
+
+!! test
+Redirect followed by block on the same line
+!! options
+parsoid=wt2html
+!! wikitext
+#REDIRECT [[Main Page]]<!-- haha -->==hi==
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
+!! end
+
+!! test
+Redirect followed by a newline
+!! wikitext
+#REDIRECT [[Main Page]]
+A newline
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+<p>A newline</p>
+!! end
+
+!! test
+Redirect followed by multiple newlines
+!! wikitext
+#REDIRECT [[Main Page]]
+
+
+A newline
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Main_Page"/>
+
+<p><br/>
+A newline</p>
+!! end
+
+!! test
+Drop duplicate redirects
+!! options
+parsoid=html2wt
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Foo"/>
+<link rel="mw:PageProp/redirect" href="./Bar"/>
+<link rel="mw:PageProp/redirect" href="./Baz"/>
+!! wikitext
+#REDIRECT [[Foo]]
+!! end
+
+##
+## XHTML tidiness
+###
+
+!! test
+<br> to <br />
+!! wikitext
+1<br>2<br />3
+!! html
+<p>1<br />2<br />3
+</p>
+!! end
+
+!! test
+Broken br tag sanitization
+!! wikitext
+</br>
+!! html/php
+<p>&lt;/br&gt;
+</p>
+!! end
+
+# TODO: Fix html2html mode (T53055)!
+!! test
+Parsoid: Broken br tag recognition
+!! options
+parsoid=wt2html
+!! wikitext
+</br>
+
+<br/ >
+!! html+tidy
+<p><br />
+</p><p><br />
+</p>
+!! end
+
+!! test
+Incorrecly removing closing slashes from correctly formed XHTML
+!! wikitext
+<br style="clear:both;" />
+!! html
+<p><br style="clear:both;" />
+</p>
+!! end
+
+!! test
+Failing to transform badly formed HTML into correct XHTML
+!! wikitext
+<br style="clear: left;">
+<br style="clear: right;">
+<br style="clear: both;">
+!! html
+<p><br style="clear: left;" />
+<br style="clear: right;" />
+<br style="clear: both;" />
+</p>
+!!end
+
+## FIXME: Is Parsoid's acceptance of self-closing html-tags
+## a feature or a bug? See https://phabricator.wikimedia.org/T76962
+!! test
+Handling html with a div self-closing tag
+!! wikitext
+<div title />
+<div title/>
+<div title/ >
+<div title=bar />
+<div title=bar/>
+<div title=bar/ >
+!! html/php
+<p>&lt;div title /&gt;
+&lt;div title/&gt;
+</p>
+<div>
+<p>&lt;div title=bar /&gt;
+&lt;div title=bar/&gt;
+</p>
+<div title="bar/"></div>
+</div>
+
+!! html/parsoid
+<div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
+<div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
+<div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
+<div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
+<div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
+<div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
+!! end
+
+!! test
+Handling html with a br self-closing tag
+!! wikitext
+<br title />
+<br title/>
+<br title/ >
+<br title=bar />
+<br title=bar/>
+<br title=bar/ >
+!! html/php
+<p><br title="" />
+<br title="" />
+<br />
+<br title="bar" />
+<br title="bar" />
+<br title="bar/" />
+</p>
+!! html/parsoid
+<p><br title="" />
+<br title="" />
+<br title="" />
+<br title="bar" />
+<br title="bar" />
+<br title="bar/" />
+</p>
+!! end
+
+!! test
+Horizontal ruler (should it add that extra space?)
+!! wikitext
+<hr>
+<hr >
+foo <hr
+> bar
+!! html+tidy
+<hr />
+<hr /><p>
+foo </p><hr /><p> bar
+</p>
+!! end
+
+!! test
+Horizontal ruler -- 4+ dashes render hr
+!! wikitext
+----
+!! html
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- eats additional dashes on the same line
+!! wikitext
+---------
+!! html
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- does not collapse dashes on consecutive lines
+!! wikitext
+----
+----
+!! html
+<hr />
+<hr />
+
+!! end
+
+!! test
+Horizontal ruler -- <4 dashes render as plain text
+!! wikitext
+---
+!! html
+<p>---
+</p>
+!! end
+
+!! test
+Horizontal ruler -- Supports content following dashes on same line
+!! wikitext
+---- Foo
+!! html
+<hr /> Foo
+
+!! html+tidy
+<hr /><p> Foo
+</p>
+!! end
+
+###
+### Block-level elements
+###
+!! test
+Common list
+!! wikitext
+*Common list
+*item 2
+*item 3
+!! html
+<ul><li>Common list</li>
+<li>item 2</li>
+<li>item 3</li></ul>
+
+!! end
+
+!! test
+Numbered list
+!! wikitext
+#Numbered list
+#item 2
+#item 3
+!! html
+<ol><li>Numbered list</li>
+<li>item 2</li>
+<li>item 3</li></ol>
+
+!! end
+
+# the switch from level 3 to ordered should not introduce a newline between
+!! test
+Mixed list
+!! wikitext
+*Mixed list
+*#with numbers
+**and bullets
+*#and numbers
+*bullets again
+**bullet level 2
+***bullet level 3
+***#Number on level 4
+**bullet level 2
+**#Number on level 3
+**#Number on level 3
+*#number level 2
+*Level 1
+***Level 3
+#**Level 3, but ordered
+!! html
+<ul><li>Mixed list
+<ol><li>with numbers</li></ol>
+<ul><li>and bullets</li></ul>
+<ol><li>and numbers</li></ol></li>
+<li>bullets again
+<ul><li>bullet level 2
+<ul><li>bullet level 3
+<ol><li>Number on level 4</li></ol></li></ul></li>
+<li>bullet level 2
+<ol><li>Number on level 3</li>
+<li>Number on level 3</li></ol></li></ul>
+<ol><li>number level 2</li></ol></li>
+<li>Level 1
+<ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
+<ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
+
+!! end
+
+!! test
+1. Nested mixed wikitext and html list
+!! wikitext
+*hi
+*<ul><li>ho</li></ul>
+*hi
+**ho
+!! html/php
+<ul><li>hi</li>
+<li><ul><li>ho</li></ul></li>
+<li>hi
+<ul><li>ho</li></ul></li></ul>
+
+!! html/parsoid
+<ul><li>hi</li>
+<li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
+<li>hi
+<ul><li>ho</li></ul></li></ul>
+!! end
+
+!! test
+2. Nested mixed wikitext and html list (incompatible)
+!! wikitext
+;hi
+:{{echo|<li>ho</li>}}
+!! html/php
+<dl><dt>hi</dt>
+<dd><li>ho</li></dd></dl>
+
+!! html/parsoid
+<dl><dt>hi</dt>
+<dd><li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;li>ho&lt;/li>"}},"i":0}}]}'>ho</li></dd></dl>
+!! end
+
+!! test
+Nested lists 1
+!! wikitext
+*foo
+**bar
+!! html
+<ul><li>foo
+<ul><li>bar</li></ul></li></ul>
+
+!! end
+
+!! test
+Nested lists 2
+!! wikitext
+**foo
+*bar
+!! html
+<ul><li><ul><li>foo</li></ul></li>
+<li>bar</li></ul>
+
+!! end
+
+!! test
+Nested lists 3 (first element empty)
+!! wikitext
+*
+**bar
+!! html
+<ul><li>
+<ul><li>bar</li></ul></li></ul>
+
+!! end
+
+!! test
+Nested lists 4 (first element empty)
+!! wikitext
+**
+*bar
+!! html
+<ul><li><ul><li></li></ul></li>
+<li>bar</li></ul>
+
+!! end
+
+!! test
+Nested lists 5 (both elements empty)
+!! wikitext
+**
+*
+!! html
+<ul><li><ul><li></li></ul></li>
+<li></li></ul>
+
+!! end
+
+!! test
+Nested lists 6 (both elements empty)
+!! wikitext
+*
+**
+!! html
+<ul><li>
+<ul><li></li></ul></li></ul>
+
+!! end
+
+!! test
+Nested lists 7 (skip initial nesting levels)
+!! wikitext
+***foo
+!! html
+<ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
+
+!! end
+
+!! test
+Nested lists 8 (multiple nesting transitions)
+!! wikitext
+*foo
+***bar
+**baz
+*boo
+!! html
+<ul><li>foo
+<ul><li><ul><li>bar</li></ul></li>
+<li>baz</li></ul></li>
+<li>boo</li></ul>
+
+!! end
+
+!! test
+Nested lists 9 (extension interaction)
+!! options
+parsoid
+!! wikitext
+*<references />
+!! html/parsoid
+<ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
+!! end
+
+!! test
+1. Lists with start-of-line-transparent tokens before bullets: Comments
+!! wikitext
+*foo
+*<!--cmt-->bar
+<!--cmt-->*baz
+!! html
+<ul><li>foo</li>
+<li>bar</li>
+<li>baz</li></ul>
+
+!! end
+
+!! test
+2. Lists with start-of-line-transparent tokens before bullets: Template close
+!! wikitext
+*foo {{echo|bar
+}}*baz
+!! html
+<ul><li>foo bar</li>
+<li>baz</li></ul>
+
+!! end
+
+!! test
+List items are not parsed correctly following a <pre> block (T2785)
+!! wikitext
+*<pre>foo</pre>
+*<pre>bar</pre>
+*zar
+!! html/php
+<ul><li><pre>foo</pre></li>
+<li><pre>bar</pre></li>
+<li>zar</li></ul>
+
+!! html/parsoid
+<ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
+<li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
+<li>zar</li></ul>
+!! end
+
+# FIXME: Might benefit from a html/parsoid since this has a template
+!! test
+List items from template
+!! wikitext
+
+{{inner list}}
+*item 2
+
+*item 0
+{{inner list}}
+*item 2
+
+*item 0
+*notSOL{{inner list}}
+*item 2
+!! html
+<ul><li>item 1</li>
+<li>item 2</li></ul>
+<ul><li>item 0</li>
+<li>item 1</li>
+<li>item 2</li></ul>
+<ul><li>item 0</li>
+<li>notSOL</li>
+<li>item 1</li>
+<li>item 2</li></ul>
+
+!! end
+
+!! test
+List interrupted by empty line or heading
+!! wikitext
+*foo
+
+**bar
+==A heading==
+*Another list item
+!! html
+<ul><li>foo</li></ul>
+<ul><li><ul><li>bar</li></ul></li></ul>
+<h2><span class="mw-headline" id="A_heading">A heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: A heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<ul><li>Another list item</li></ul>
+
+!!end
+
+!!test
+Multiple list tags generated by templates
+!! wikitext
+{{echo|<li>}}a
+{{echo|<li>}}b
+{{echo|<li>}}c
+!! html
+<li>a
+<li>b
+<li>c</li>
+</li>
+</li>
+
+!! html+tidy
+<li>a
+</li><li>b
+</li><li>c
+</li>
+!! html/parsoid
+<li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;li>"}},"i":2}},"c"]}'>a
+</li><li about="#mwt1">b
+</li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
+!!end
+
+!!test
+Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
+!! wikitext
+*a
+<!--This line will NOT split the list-->
+*b
+ <!--This line will NOT split the list either-->
+*c
+ <!--foo--> <!----> <!--This line NOT split the list either-->
+*d
+!! html
+<ul><li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d</li></ul>
+
+!!end
+
+!!test
+Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
+!! wikitext
+*a
+<!--This line will NOT split the list-->
+*b
+ <!--This line will NOT split the list either-->
+*c
+ <!--foo--> <!----> <!--This line NOT split the list
+ either-->
+*d
+!! html
+<ul><li>a</li>
+<li>b</li>
+<li>c</li>
+<li>d</li></ul>
+
+!!end
+
+# FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
+# That pass could possibly be removed.
+!!test
+Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
+!!options
+parsoid=wt2html,wt2wt
+!! wikitext
+*foo
+*<li>li-hack
+*{{echo|<li>templated li-hack}}
+*<!--foo--><li> unsupported li-hack with preceding comments
+
+<ul>
+<li><li>not a li-hack
+</li>
+</ul>
+!! html+tidy
+<ul><li>foo</li>
+<li class="mw-empty-elt"></li><li>li-hack</li>
+<li class="mw-empty-elt"></li><li>templated li-hack</li>
+<li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
+<ul>
+<li class="mw-empty-elt"></li><li>not a li-hack
+</li>
+</ul>
+!! html/parsoid
+<ul><li> foo</li>
+<li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
+<li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["*",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
+<li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
+
+<ul data-parsoid='{"stx":"html"}'>
+<li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
+</li>
+</ul>
+
+!!end
+
+!! test
+Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
+!! options
+parsoid
+!! wikitext
+#foo
+##bar
+
+*foo
+**bar
+
+:foo
+::bar
+!! html
+<ol>
+<li>foo<ol>
+<li>bar</li>
+</ol></li>
+</ol><ul>
+<li>foo<ul>
+<li>bar</li>
+</ul></li>
+</ul><dl>
+<dd>foo<dl>
+<dd>bar</dd>
+</dl></dd>
+</dl>
+!! end
+
+!! test
+Parsoid: Test of whitespace serialization with Templated bullets
+!! options
+parsoid
+!! wikitext
+* {{bullet}}
+!! html/parsoid
+<ul>
+<li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
+</ul>
+!! end
+
+# ------------------------------------------------------------------------
+# The next set of tests are about Parsoid's ability to handle badly nested
+# tags (parse, minimize scope of fixup, and roundtrip back)
+# ------------------------------------------------------------------------
+
+# Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
+# Parsoid's list handling is more aware of block structure.
+!! test
+Unbalanced closing block tags break a list
+!! wikitext
+<div>
+*a</div><div>
+*b</div>
+!! html+tidy
+<div>
+<ul><li>a</li></ul></div><div>
+<li>b</li></div>
+!! html/parsoid
+<div><ul>
+<li>a</li>
+</ul></div>
+<div><ul>
+<li>b</li>
+</ul></div>
+!! end
+
+!! test
+Unbalanced closing non-block tags don't break a list
+!! wikitext
+<span>
+*a</span><span>
+*b</span>
+!! html/php+tidy
+<p><span>
+</span></p>
+<ul><li>a<span></span></li>
+<li>b</li></ul>
+!! html/parsoid
+<span>
+<ul>
+<li>a<span></span></li>
+<li>b</li>
+</ul>
+</span>
+!! end
+
+# Parsoid does some post-dom-building cleanup
+# which is why its output differs from Remex.
+!! test
+Unclosed formatting tags that straddle lists are closed and reopened
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+#<s> a
+#b </s>
+!! html/php+tidy
+<ol><li><s> a</s></li><s>
+</s><li><s>b </s></li></ol>
+!! html/parsoid
+<ol><li><s> a</s></li>
+<li><s>b </s></li></ol>
+!! end
+
+# Output is ugly because of all the misnested tag fixups.
+# Remex is wrapping p-tags around empty elements.
+# Parsoid has special-case handling of this pattern of
+# wrapping lists in formatting tags.
+# FIXME: Should we remove this code from Parsoid? Or add
+# special support in Remex? If the latter, maybe just wait
+# for Parsoid to become the default parser.
+# See T70395.
+!!test
+1. List embedded in a formatting tag
+!! wikitext
+<small>
+*foo
+</small>
+!! html/php+tidy
+<p><small>
+</small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
+</p>
+!! html/parsoid
+<small>
+<ul>
+<li>foo</li>
+</ul>
+</small>
+!!end
+
+# Output is ugly because of all the misnested tag fixups
+# Remex is wrapping p-tags around empty elements.
+# Parsoid has code that strips useless p-tags.
+!!test
+2. List embedded in a formatting tag in a misnested way
+!! wikitext
+<small>
+*a
+*b</small>
+!! html/php+tidy
+<p><small>
+</small></p><small></small><ul><small><li>a</li>
+</small><li><small>b</small></li></ul>
+!! html/parsoid
+<small></small>
+<ul><small>
+<li>a</li>
+</small>
+<li><small>b</small></li>
+</ul>
+!!end
+
+!! test
+Table with missing opening <tr> tag
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+<table>
+<td>foo</td>
+</tr>
+</table>
+!! html+tidy
+<table>
+<tbody><tr><td>foo</td>
+</tr>
+</tbody></table>
+!! end
+
+###
+### Magic Words
+###
+
+# Note that the current date is hard-coded as
+# 1970-01-01T00:02:03Z (a Thursday)
+# when running parser tests. The timezone is also fixed to GMT, so
+# local date will be identical to current date.
+
+!! test
+Magic Word: {{CURRENTDAY}}
+!! wikitext
+{{CURRENTDAY}}
+!! html
+<p>1
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTDAY2}}
+!! wikitext
+{{CURRENTDAY2}}
+!! html
+<p>01
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTDAYNAME}}
+!! wikitext
+{{CURRENTDAYNAME}}
+!! html
+<p>Thursday
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTDOW}}
+!! wikitext
+{{CURRENTDOW}}
+!! html
+<p>4
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTMONTH}}
+!! wikitext
+{{CURRENTMONTH}}
+!! html
+<p>01
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTMONTH1}}
+!! wikitext
+{{CURRENTMONTH1}}
+!! html
+<p>1
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTMONTHABBREV}}
+!! wikitext
+{{CURRENTMONTHABBREV}}
+!! html
+<p>Jan
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTMONTHNAME}}
+!! wikitext
+{{CURRENTMONTHNAME}}
+!! html
+<p>January
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTMONTHNAMEGEN}}
+!! wikitext
+{{CURRENTMONTHNAMEGEN}}
+!! html
+<p>January
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTTIME}}
+!! wikitext
+{{CURRENTTIME}}
+!! html
+<p>00:02
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTHOUR}}
+!! wikitext
+{{CURRENTHOUR}}
+!! html
+<p>00
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTWEEK}} (T6594)
+!! wikitext
+{{CURRENTWEEK}}
+!! html
+<p>1
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTYEAR}}
+!! wikitext
+{{CURRENTYEAR}}
+!! html
+<p>1970
+</p>
+!! end
+
+!! test
+Magic Word: {{CURRENTTIMESTAMP}}
+!! wikitext
+{{CURRENTTIMESTAMP}}
+!! html
+<p>19700101000203
+</p>
+!! end
+
+!! test
+Magic Words LOCAL (UTC)
+!! wikitext
+*{{LOCALMONTH}}
+*{{LOCALMONTH1}}
+*{{LOCALMONTHNAME}}
+*{{LOCALMONTHNAMEGEN}}
+*{{LOCALMONTHABBREV}}
+*{{LOCALDAY}}
+*{{LOCALDAY2}}
+*{{LOCALDAYNAME}}
+*{{LOCALYEAR}}
+*{{LOCALTIME}}
+*{{LOCALHOUR}}
+*{{LOCALWEEK}}
+*{{LOCALDOW}}
+*{{LOCALTIMESTAMP}}
+!! html
+<ul><li>01</li>
+<li>1</li>
+<li>January</li>
+<li>January</li>
+<li>Jan</li>
+<li>1</li>
+<li>01</li>
+<li>Thursday</li>
+<li>1970</li>
+<li>00:02</li>
+<li>00</li>
+<li>1</li>
+<li>4</li>
+<li>19700101000203</li></ul>
+
+!! end
+
+!! test
+Magic Word: {{FULLPAGENAME}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{FULLPAGENAME}}
+!! html/*
+<p>User:Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{FULLPAGENAMEE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{FULLPAGENAMEE}}
+!! html/*
+<p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKSPACE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKSPACE}}
+!! html/*
+<p>User talk
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKSPACE}}, same namespace
+!! options
+title=[[User talk:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKSPACE}}
+!! html/*
+<p>User talk
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKSPACE}}, main namespace
+!! options
+title=[[Parser Test]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKSPACE}}
+!! html/*
+<p>Talk
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKSPACEE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKSPACEE}}
+!! html/*
+<p>User_talk
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBJECTSPACE}}
+!! options
+title=[[User talk:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTSPACE}}
+!! html/*
+<p>User
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBJECTSPACE}}, same namespace
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTSPACE}}
+!! html/*
+<p>User
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBJECTSPACE}}, main namespace
+!! options
+title=[[Parser Test]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTSPACE}}
+!! html/*
+
+!! end
+
+!! test
+Magic Word: {{SUBJECTSPACEE}}
+!! options
+title=[[User talk:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTSPACEE}}
+!! html/*
+<p>User
+</p>
+!! end
+
+!! test
+Magic Word: {{NAMESPACE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{NAMESPACE}}
+!! html/*
+<p>User
+</p>
+!! end
+
+!! test
+Magic Word: {{NAMESPACEE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{NAMESPACEE}}
+!! html/*
+<p>User
+</p>
+!! end
+
+!! test
+Magic Word: {{NAMESPACENUMBER}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{NAMESPACENUMBER}}
+!! html/*
+<p>2
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBPAGENAME}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBPAGENAME}}
+!! html/*
+<p>sub ö
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBPAGENAMEE}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBPAGENAMEE}}
+!! html/*
+<p>sub_%C3%B6
+</p>
+!! end
+
+!! test
+Magic Word: {{ROOTPAGENAME}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{ROOTPAGENAME}}
+!! html/*
+<p>Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{ROOTPAGENAMEE}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{ROOTPAGENAMEE}}
+!! html/*
+<p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{BASEPAGENAME}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{BASEPAGENAME}}
+!! html/*
+<p>Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{BASEPAGENAMEE}}
+!! options
+title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{BASEPAGENAMEE}}
+!! html/*
+<p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKPAGENAME}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKPAGENAME}}
+!! html/*
+<p>User talk:Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{TALKPAGENAMEE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{TALKPAGENAMEE}}
+!! html/*
+<p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBJECTPAGENAME}}
+!! options
+title=[[User talk:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTPAGENAME}}
+!! html/*
+<p>User:Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{SUBJECTPAGENAMEE}}
+!! options
+title=[[User talk:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SUBJECTPAGENAMEE}}
+!! html/*
+<p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{NUMBEROFFILES}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{NUMBEROFFILES}}
+!! html/*
+<p>7
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGENAME}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGENAME}}
+!! html/*
+<p>Ævar Arnfjörð Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGENAME}} with metacharacters
+!! options
+title=[['foo & bar = baz']]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+''{{PAGENAME}}''
+!! html+tidy
+<p><i>&#39;foo &#38; bar &#61; baz&#39;</i>
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGENAME}} with metacharacters (T28781)
+!! options
+title=[[*RFC 1234 http://example.com/]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGENAME}}
+!! html+tidy
+<p>&#42;RFC&#32;1234 http&#58;//example.com/
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGENAMEE}}
+!! options
+title=[[User:Ævar Arnfjörð Bjarmason]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGENAMEE}}
+!! html/*
+<p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
+!! options
+title=[[*RFC 1234 http://example.com/]]
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGENAMEE}}
+!! html+tidy
+<p>&#42;RFC_1234_http&#58;//example.com/
+</p>
+!! end
+
+!! test
+Magic Word: {{REVISIONID}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+showflags
+!! wikitext
+{{REVISIONID}}
+!! html/*
+<p>1337
+</p>
+flags=vary-revision-id
+!! end
+
+!! test
+Magic Word: {{SCRIPTPATH}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SCRIPTPATH}}
+!! html/*
+
+!! end
+
+!! test
+Magic Word: {{STYLEPATH}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{STYLEPATH}}
+!! html/*
+<p>/skins
+</p>
+!! end
+
+!! test
+Magic Word: {{SERVER}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SERVER}}
+!! html/*
+<p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
+</p>
+!! end
+
+!! test
+Magic Word: {{SERVERNAME}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SERVERNAME}}
+!! html/*
+<p>example.org
+</p>
+!! end
+
+!! test
+Magic Word: {{SITENAME}}
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{SITENAME}}
+!! html/*
+<p>MediaWiki
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGELANGUAGE}}
+!! options
+language=fr
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGELANGUAGE}}
+!! html/*
+<p>fr
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
+!! options
+parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
+!! wikitext
+{{PAGELANGUAGE}}
+!! html/*
+<p>en
+</p>
+!! end
+
+!! test
+Case-sensitive magic words, when cased differently, should just be template transclusions
+!! wikitext
+{{CurrentMonth}}
+{{currentday}}
+{{cURreNTweEK}}
+{{currentHour}}
+!! html
+<p><a href="/index.php?title=Template:CurrentMonth&amp;action=edit&amp;redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
+<a href="/index.php?title=Template:Currentday&amp;action=edit&amp;redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
+<a href="/index.php?title=Template:CURreNTweEK&amp;action=edit&amp;redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
+<a href="/index.php?title=Template:CurrentHour&amp;action=edit&amp;redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
+</p>
+!! end
+
+!! test
+Case-insensitive magic words should still work with weird casing.
+!! wikitext
+{{sErVeRNaMe}}
+{{LCFirst:AOEU}}
+{{ucFIRST:aoeu}}
+{{SERver}}
+!! html
+<p>example.org
+aOEU
+Aoeu
+<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
+</p>
+!! end
+
+# From plwiki:PLOS_ONE
+!! test
+Parsoid: Page property magic word with magic word contents
+!! wikitext
+{{DISPLAYTITLE:''{{PAGENAME}}''}}
+!! html/parsoid
+<meta property="mw:PageProp/displaytitle" content="Main Page" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{DISPLAYTITLE:&#39;&#39;{{PAGENAME}}&#39;&#39;}}"}' data-mw='{"attribs":[[{"txt":"content"},{"html":"DISPLAYTITLE:&lt;i data-parsoid=&#39;{\"dsr\":[15,31,2,2]}&#39;>&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[17,29,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}&#39;>Main Page&lt;/span>&lt;/i>"}]]}'/>
+!! end
+
+# NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
+# But, this is a limitation of our representation and is documented in
+# TemplateHandler.js in processSpecialMagicWord
+!! test
+Parsoid: Template-generated DISPLAYTITLE
+!! wikitext
+{{{{echo|DISPLAYTITLE}}:Foo}}
+!! options
+showtitle
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=false
+!! html/php
+Foo
+
+!! html/parsoid
+<meta property="mw:PageProp/displaytitle" content="Foo" about="#mwt1" typeof="mw:ExpandedAttrs" data-parsoid='{"pi":[[]]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,23,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DISPLAYTITLE\"}},\"i\":0}}]}&#39;>DISPLAYTITLE&lt;/span>:Foo"}]]}'/>
+!! end
+
+!! test
+Namespace 1 {{ns:1}}
+!! wikitext
+{{ns:1}}
+!! html
+<p>Talk
+</p>
+!! end
+
+!! test
+Namespace 1 {{ns:01}}
+!! wikitext
+{{ns:01}}
+!! html
+<p>Talk
+</p>
+!! end
+
+!! test
+Namespace 0 {{ns:0}} (T6783)
+!! wikitext
+{{ns:0}}
+!! html
+
+!! end
+
+!! test
+Namespace 0 {{ns:00}} (T6783)
+!! wikitext
+{{ns:00}}
+!! html
+
+!! end
+
+!! test
+Namespace -1 {{ns:-1}}
+!! wikitext
+{{ns:-1}}
+!! html
+<p>Special
+</p>
+!! end
+
+!! test
+Namespace User {{ns:User}}
+!! wikitext
+{{ns:User}}
+!! html
+<p>User
+</p>
+!! end
+
+!! test
+Namespace User talk {{ns:User_talk}}
+!! wikitext
+{{ns:User_talk}}
+!! html
+<p>User talk
+</p>
+!! end
+
+!! test
+Namespace User talk {{ns:uSeR tAlK}}
+!! wikitext
+{{ns:uSeR tAlK}}
+!! html
+<p>User talk
+</p>
+!! end
+
+!! test
+Namespace File {{ns:File}}
+!! wikitext
+{{ns:File}}
+!! html
+<p>File
+</p>
+!! end
+
+!! test
+Namespace File {{ns:Image}}
+!! wikitext
+{{ns:Image}}
+!! html
+<p>File
+</p>
+!! end
+
+!! test
+Namespace (lang=de) Benutzer {{ns:User}}
+!! options
+language=de
+!! wikitext
+{{ns:User}}
+!! html
+<p>Benutzer
+</p>
+!! end
+
+!! test
+Namespace (lang=de) Benutzer Diskussion {{ns:3}}
+!! options
+language=de
+!! wikitext
+{{ns:3}}
+!! html
+<p>Benutzer Diskussion
+</p>
+!! end
+
+!! test
+Urlencode
+!! wikitext
+{{urlencode:hi world?!}}
+{{urlencode:hi world?!|WIKI}}
+{{urlencode:hi world?!|PATH}}
+{{urlencode:hi world?!|QUERY}}
+!! html/php
+<p>hi+world%3F%21
+hi_world%3F!
+hi%20world%3F%21
+hi+world%3F%21
+</p>
+!! end
+
+!! test
+Magic Word: prioritize type info over data-parsoid
+!! options
+parsoid=html2wt
+!! html/parsoid
+<meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
+!! wikitext
+__FORCETOC__
+!! end
+
+!! test
+Magic Word: serialize on separate line (parsoid)
+!! options
+parsoid=wt2wt,html2wt
+!! wikitext
+foo
+__NOTOC__
+bar
+!! html/parsoid
+foo<meta property="mw:PageProp/notoc"/>bar
+!! end
+
+!! test
+Magic Word: rt non-english wikis
+!! options
+parsoid=wt2wt
+language=de
+!! wikitext
+__NOEDITSECTION__
+!! html/parsoid
+<meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
+!! end
+
+!!test
+__proto__ is treated as normal wikitext (T105997)
+!!wikitext
+__proto__
+!!html
+<p>__proto__
+</p>
+!!end
+
+###
+### Magic links
+###
+!! test
+Magic links: internal link to RFC (T2479)
+!! wikitext
+[[RFC 123]]
+!! html/php
+<p><a href="/index.php?title=RFC_123&amp;action=edit&amp;redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
+!! end
+
+!! test
+Magic links: RFC (T2479)
+!! wikitext
+RFC 822
+!! html/php
+<p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
+</p>
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
+!! end
+
+!! test
+Magic links: RFC (T67278)
+!! wikitext
+This is RFC 822 but thisRFC 822 is not RFC 822linked.
+!! html/php
+<p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
+</p>
+!! html/parsoid
+<p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
+!! end
+
+!! test
+Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
+!! wikitext
+RFC &nbsp;&#160;&#0160;&#xA0;&#Xa0; 822
+RFC
+822
+!! html/php
+<p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
+RFC
+822
+</p>
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 822</a>
+RFC
+822</p>
+!! end
+
+!! test
+Magic links: ISBN (T3937)
+!! wikitext
+ISBN 0-306-40615-2
+!! html/php
+<p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
+!! end
+
+!! test
+Magic links: ISBN (T67278)
+!! wikitext
+This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
+!! html/php
+<p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
+</p>
+!! html/parsoid
+<p>This is <a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.</p>
+!! end
+
+!! test
+Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
+!! wikitext
+ISBN &nbsp;&#160;&#0160;&#xA0;&#Xa0; 978&nbsp;0&#160;316&#0160;09811&#xA0;3
+ISBN
+9780316098113
+ISBN 978
+0316098113
+!! html/php
+<p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
+ISBN
+9780316098113
+ISBN 978
+0316098113
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/9780316098113" rel="mw:WikiLink">ISBN <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 978<span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span>0<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span>316<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span>09811<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span>3</a>
+ISBN
+9780316098113
+ISBN 978
+0316098113</p>
+!! end
+
+!! test
+Magic links: PMID incorrectly converts space to underscore
+!! wikitext
+PMID 1234
+!! html/php
+<p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
+</p>
+!! html/parsoid
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
+!! end
+
+!! test
+Magic links: PMID (T67278)
+!! wikitext
+This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
+!! html/php
+<p>This is <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.
+</p>
+!! html/parsoid
+<p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
+!! end
+
+!! test
+Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
+!! wikitext
+PMID &nbsp;&#160;&#0160;&#xA0;&#Xa0; 1234
+PMID
+1234
+!! html/php
+<p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
+PMID
+1234
+</p>
+!! html/parsoid
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID <span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#Xa0;","srcContent":" "}'> </span> 1234</a>
+PMID
+1234</p>
+!! end
+
+# <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
+# since these are ExtLinkText, not MagicLinkText
+!! test
+Magic links: use appropriate serialization for "almost" magic links.
+!! wikitext
+X[[Special:BookSources/0978739256|foo]]
+
+X[https://tools.ietf.org/html/rfc1234 foo]
+!! html/php
+<p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
+</p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
+</p>
+!! html/parsoid
+<p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
+<p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
+!! end
+
+!! test
+Magic links: All disabled (T47942)
+!! options
+wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
+!! wikitext
+ISBN 0-306-40615-2
+PMID 1234
+RFC 4321
+!! html/php
+<p>ISBN 0-306-40615-2
+PMID 1234
+RFC 4321
+</p>
+!! end
+
+###
+### Templates
+####
+
+!! test
+Nonexistent template
+!! wikitext
+{{thistemplatedoesnotexist}}
+!! html
+<p><a href="/index.php?title=Template:Thistemplatedoesnotexist&amp;action=edit&amp;redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
+</p>
+!! end
+
+!! test
+Template with invalid target containing tags
+!! wikitext
+{{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
+!! html
+<p>{{a<b>b</b>|foo|a=b|a = b}}
+</p>
+!! end
+
+!! test
+Template with invalid target containing unclosed tag
+!! wikitext
+{{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
+!! html
+<p>{{a<b>|foo|a=b|a = b}}</b>
+</p>
+!! end
+
+!! test
+Template with invalid target containing wikilink
+!! wikitext
+{{[[Main Page]]}}
+!! html/php
+<p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"[[Main Page]]"},"params":{},"i":0}}]}'>{{</span><a rel="mw:WikiLink" href="./Main_Page" about="#mwt1">Main Page</a><span about="#mwt1">}}</span></p>
+!! end
+
+!! test
+Template with just whitespace in it, T70421
+!! wikitext
+{{echo|{{ }}}}
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{ }}"}},"i":0}}]}'>{{ }}</p>
+!! end
+
+!! article
+Template:test
+!! text
+This is a test template
+!! endarticle
+
+!! test
+Simple template
+!! wikitext
+{{test}}
+!! html
+<p>This is a test template
+</p>
+!! end
+
+!! test
+Template with explicit namespace
+!! wikitext
+{{Template:test}}
+!! html
+<p>This is a test template
+</p>
+!! end
+
+
+!! article
+Template:paramtest
+!! text
+This is a test template with parameter {{{param}}}
+!! endarticle
+
+!! test
+Template parameter
+!! wikitext
+{{paramtest|param=foo}}
+!! html
+<p>This is a test template with parameter foo
+</p>
+!! end
+
+!! article
+Template:paramtestnum
+!! text
+[[{{{1}}}|{{{2}}}]]
+!! endarticle
+
+!! test
+Template unnamed parameter
+!! wikitext
+{{paramtestnum|Main Page|the main page}}
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
+</p>
+!! end
+
+!! article
+Template:templatesimple
+!! text
+(test)
+!! endarticle
+
+!! article
+Template:templateredirect
+!! text
+#redirect [[Template:templatesimple]]
+!! endarticle
+
+!! article
+Template:templateasargtestnum
+!! text
+{{{{{1}}}}}
+!! endarticle
+
+!! article
+Template:templateasargtest
+!! text
+{{template{{{templ}}}}}
+!! endarticle
+
+!! article
+Template:templateasargtest2
+!! text
+{{{{{templ}}}}}
+!! endarticle
+
+!! test
+Template with template name as unnamed argument
+!! wikitext
+{{templateasargtestnum|templatesimple}}
+!! html
+<p>(test)
+</p>
+!! end
+
+!! test
+Template with template name as argument
+!! wikitext
+{{templateasargtest|templ=simple}}
+!! html
+<p>(test)
+</p>
+!! end
+
+!! test
+Template with template name as argument (2)
+!! wikitext
+{{templateasargtest2|templ=templatesimple}}
+!! html
+<p>(test)
+</p>
+!! end
+
+!! article
+Template:templateasargtestdefault
+!! text
+{{{{{templ|templatesimple}}}}}
+!! endarticle
+
+!! article
+Template:templa
+!! text
+'''templ'''
+!! endarticle
+
+!! test
+Template with default value
+!! wikitext
+{{templateasargtestdefault}}
+!! html
+<p>(test)
+</p>
+!! end
+
+!! test
+Template with default value (value set)
+!! wikitext
+{{templateasargtestdefault|templ=templa}}
+!! html
+<p><b>templ</b>
+</p>
+!! end
+
+!! test
+Template redirect
+!! wikitext
+{{templateredirect}}
+!! html/php
+<p>(test)
+</p>
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
+!! end
+
+!! test
+Template with argument in separate line
+!! wikitext
+{{ templateasargtest |
+ templ = simple }}
+!! html
+<p>(test)
+</p>
+!! end
+
+!! test
+Template with complex template as argument
+!! wikitext
+{{paramtest|
+ param ={{ templateasargtest |
+ templ = simple }}}}
+!! html
+<p>This is a test template with parameter (test)
+</p>
+!! end
+
+!! test
+Templates with templated name
+!! wikitext
+{{{{echo|echo}}|foo}}
+{{{{echo|inner list}} }}
+!! html
+<p>foo
+</p>
+<ul><li>item 1</li></ul>
+
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|echo}}","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
+<ul about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"{{echo|inner list}} ","href":"./Template:Inner_list"},"params":{},"i":0}}]}'><li>item 1</li></ul>
+!! end
+
+## Regression test; the output here isn't really that interesting.
+!! test
+Templates with templated name and top level template args
+!! wikitext
+{{1{{2{{{3}}}|4=5}}}}
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
+!! end
+
+# Parsoid markup is deliberate "broken". This is an edge case.
+# See long comment in TemplateHandler.js:convertAttribsToString.
+!! test
+Templates with invalid templated targets
+!! wikitext
+{{echo
+{{echo|foo}}
+}}
+!! html/php
+<p>{{echo
+foo
+}}
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
+foo }}</p>
+!! end
+
+!! test
+Template with thumb image (with link in description)
+!! wikitext
+{{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
+!! html/php
+This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
+
+!! html+tidy
+<p>This is a test template with parameter </p><div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&amp;wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&amp;action=edit&amp;redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"paramtest","href":"./Template:Paramtest"},"params":{"param":{"wt":"[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]"}},"i":0}}]}'>This is a test template with parameter </p><figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" about="#mwt1" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Noimage.png" ><img resource="./File:Noimage.png" src="./Special:FilePath/Noimage.png" height="220" width="220"/></a><figcaption><a rel="mw:WikiLink" href="./No_link" title="No link">link</a> <a rel="mw:WikiLink" href="./No_link" title="No link">caption</a></figcaption></figure>
+!! end
+
+!! article
+Template:complextemplate
+!! text
+{{{1}}} {{paramtest|
+ param ={{{param}}}}}
+!! endarticle
+
+!! test
+Template with complex arguments
+!! wikitext
+{{complextemplate|
+ param ={{ templateasargtest |
+ templ = simple }}|[[Template:complextemplate|link]]}}
+!! html
+<p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
+</p>
+!! end
+
+!! test
+T2553: link with two variables in a piped link
+!! wikitext
+{|
+|[[{{{1}}}|{{{2}}}]]
+|}
+!! html/php
+<table>
+<tr>
+<td>[[{{{1}}}|{{{2}}}]]
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{},"i":0}}]}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"2"},"params":{},"i":0}}]}'>{{{2}}}</span>]]</td></tr>
+</tbody></table>
+!! end
+
+# See: T2553
+!! test
+Abort table cell attribute parsing on wikilink
+!! wikitext
+{|
+|testing [[one|two]] |three||four
+|testing one two |three||four
+|testing="[[one|two]]" |three||four
+|}
+!! html/php
+<table>
+<tr>
+<td>testing <a href="/index.php?title=One&amp;action=edit&amp;redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
+<td>four
+</td>
+<td>three</td>
+<td>four
+</td>
+<td>testing="<a href="/index.php?title=One&amp;action=edit&amp;redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
+<td>four
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
+<td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'>three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td>
+<td>testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" |three</td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>four</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Don't abort table cell attribute parsing if wikilink is found in template arg
+!! wikitext
+{|
+|Test {{#tag:ref|One two "[[three]]" four}}
+|}
+!! html/parsoid
+<table>
+<tbody><tr><td>Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
+</tbody></table>
+!! end
+
+!! test
+Magic variable as template parameter
+!! wikitext
+{{paramtest|param={{SITENAME}}}}
+!! html
+<p>This is a test template with parameter MediaWiki
+</p>
+!! end
+
+!! article
+Template:linktest
+!! text
+[[{{{param}}}|link]]
+!! endarticle
+
+!! test
+Template parameter as link source
+!! wikitext
+{{linktest|param=Main Page}}
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">link</a>
+</p>
+!! end
+
+!!article
+Template:paramtest2
+!! text
+including another template, {{paramtest|param={{{arg}}}}}
+!! endarticle
+
+!! test
+Template passing argument to another template
+!! wikitext
+{{paramtest2|arg='hmm'}}
+!! html
+<p>including another template, This is a test template with parameter 'hmm'
+</p>
+!! end
+
+!! article
+Template:Linktest2
+!! text
+Main Page
+!! endarticle
+
+!! test
+Template as link source
+!! wikitext
+[[{{linktest2}}]]
+
+[[{{linktest2}}|Main Page]]
+
+[[{{linktest2}}]]Page
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
+</p>
+!! end
+
+
+!! article
+Template:loop1
+!! text
+{{loop2}}
+!! endarticle
+
+!! article
+Template:loop2
+!! text
+{{loop1}}
+!! endarticle
+
+!! test
+Template infinite loop
+!! wikitext
+{{loop1}}
+!! html
+<p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
+</p>
+!! end
+
+!! test
+Template from main namespace
+!! wikitext
+{{:Main Page}}
+!! html
+<p>blah blah
+</p>
+!! end
+
+!! article
+Template:table
+!! text
+{|
+| 1 || 2
+|-
+| 3 || 4
+|}
+!! endarticle
+
+!! test
+T2529: Template with table, not included at beginning of line
+!! wikitext
+foo {{table}}
+!! html
+<p>foo
+</p>
+<table>
+<tr>
+<td>1</td>
+<td>2
+</td></tr>
+<tr>
+<td>3</td>
+<td>4
+</td></tr></table>
+
+!! end
+
+!! test
+T2523: Template shouldn't eat newline (or add an extra one before table)
+!! wikitext
+foo
+{{table}}
+!! html
+<p>foo
+</p>
+<table>
+<tr>
+<td>1</td>
+<td>2
+</td></tr>
+<tr>
+<td>3</td>
+<td>4
+</td></tr></table>
+
+!! end
+
+!! test
+T2041: Template parameters shown as broken links
+!! wikitext
+{{{parameter}}}
+!! html
+<p>{{{parameter}}}
+</p>
+!! end
+
+!! test
+Template with targets containing wikilinks
+!! options
+parsoid=wt2html
+!! wikitext
+{{[[foo]]}}
+
+{{[[{{echo|foo}}]]}}
+
+{{{{echo|[[foo}}]]}}
+!! html/php
+<p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
+</p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
+</p><p>{{[[foo}}]]
+</p>
+!! html/parsoid
+<p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
+<p>{{<a typeof="mw:ExpandedAttrs" rel="mw:WikiLink" href="./Foo" title="Foo" data-mw='{"attribs":[[{"txt":"href"},{"html":"&lt;span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[17,29,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}&#39;>foo&lt;/span>"}]]}'>foo</a>}}</p>
+<p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
+!! end
+
+!! article
+Template:''
+!! text
+bar
+!! endarticle
+
+!! test
+Templates: Double quotes as template target
+!! wikitext
+foo {{''}} baz
+!! html/php
+<p>foo bar baz
+</p>
+!! html/parsoid
+<p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"&#39;&#39;","href":"./Template:&#39;&#39;"},"params":{},"i":0}}]}'>bar</span> baz
+</p>
+!! end
+
+## This test is about making sure Parsoid's data-mw is well formed in the
+## face of multiple templates with intersecting and overlapping ranges. The
+## wikitext itself is wretched.
+!! test
+Templates with intersecting and overlapping ranges
+!! wikitext
+{|{{echo|
+<p>ha</p>}}
+{|{{echo|
+<p>ho</p>}}
+{{echo|{{!}}hi}}
+|}
+!! html/php+tidy
+<p>ha</p><table>
+
+</table><p>ho</p><table>
+
+<tbody><tr>
+<td>hi
+</td></tr></tbody></table>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]],"firstWikitextNode":"table"}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n&lt;p>ha&lt;/p>"}},"i":0}},"\n","{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n&lt;p>ho&lt;/p>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}}hi"}},"i":2}},"\n|}"]}'>ha</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
+
+</table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
+
+<tbody><tr><td>hi</td></tr>
+</tbody></table>
+!! end
+
+!! article
+Template:MSGNW test
+!! text
+''None'' of '''this''' should be
+* interpreted
+ but rather passed unmodified
+{{test}}
+<gallery>
+File:Foobar.jpg
+</gallery>
+<!-- comment -->
+!! endarticle
+
+# hmm, fix this or just deprecate msgnw and document its behavior?
+!! test
+msgnw keyword
+!! wikitext
+{{msgnw:MSGNW test}}
+!! html/php
+<p>&#39;&#39;None&#39;&#39; of &#39;&#39;&#39;this&#39;&#39;&#39; should be
+&#42; interpreted
+&#32;but rather passed unmodified
+&#123;&#123;test&#125;&#125;
+&#60;gallery&#62;
+File:Foobar.jpg
+&#60;/gallery&#62;
+&#60;!-- comment --&#62;
+</p>
+!! end
+
+!! test
+int keyword
+!! wikitext
+{{int:youhavenewmessages|lots of money|not!}}
+!! html
+<p>You have lots of money (not!).
+</p>
+!! end
+
+!! test
+int keyword - non-existing message
+!! wikitext
+{{int:var}}
+!! html
+<p>⧼var⧽
+</p>
+!! end
+
+!! article
+Template:Includes
+!! text
+Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
+!! endarticle
+
+!! test
+<includeonly> and <noinclude> being included
+!! wikitext
+{{Includes}}
+!! html
+<p>Foobar
+</p>
+!! end
+
+!! article
+Template:Includes2
+!! text
+<onlyinclude>Foo</onlyinclude>bar
+!! endarticle
+
+!! test
+<onlyinclude> being included
+!! wikitext
+{{Includes2}}
+!! html
+<p>Foo
+</p>
+!! end
+
+
+!! article
+Template:Includes3
+!! text
+<onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
+!! endarticle
+
+!! test
+<onlyinclude> and <includeonly> being included
+!! wikitext
+{{Includes3}}
+!! html
+<p>Foo
+</p>
+!! end
+
+!! test
+<includeonly> and <noinclude> on a page
+!! wikitext
+Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
+!! html
+<p>Foozar
+</p>
+!! end
+
+!! test
+Un-closed <noinclude>
+!! wikitext
+<noinclude>
+!! html
+!! end
+
+!! test
+<onlyinclude> on a page
+!! wikitext
+<onlyinclude>Foo</onlyinclude>bar
+!! html
+<p>Foobar
+</p>
+!! end
+
+!! test
+Un-closed <onlyinclude>
+!! wikitext
+<onlyinclude>
+!! html
+!! end
+
+!!test
+Self-closed noinclude, includeonly, onlyinclude tags
+!! wikitext
+<noinclude />
+<includeonly />
+<onlyinclude />
+!! html
+<p><br />
+</p>
+!!end
+
+!!test
+Unbalanced includeonly and noinclude tags
+!! wikitext
+{|
+|a</noinclude>
+|b</noinclude></noinclude>
+|c</noinclude></includeonly>
+|d</includeonly></includeonly>
+|}
+!! html
+<table>
+<tr>
+<td>a
+</td>
+<td>b
+</td>
+<td>c&lt;/includeonly&gt;
+</td>
+<td>d&lt;/includeonly&gt;&lt;/includeonly&gt;
+</td></tr></table>
+
+!!end
+
+!! article
+Template:Includeonly section
+!! text
+<includeonly>
+==Includeonly section==
+</includeonly>
+==Section T-1==
+!!endarticle
+
+!! test
+T8563: Edit link generation for section shown by <includeonly>
+!! wikitext
+{{includeonly section}}
+!! html
+<h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&amp;action=edit&amp;section=T-1" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_T-1">Section T-1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Includeonly_section&amp;action=edit&amp;section=T-2" title="Template:Includeonly section">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+# Uses same input as the contents of [[Template:Includeonly section]]
+!! test
+T8563: Section extraction for section shown by <includeonly>
+!! options
+section=T-2
+!! wikitext
+<includeonly>
+==Includeonly section==
+</includeonly>
+==Section T-2==
+!! html
+==Section T-2==
+!! end
+
+!! test
+T8563: Edit link generation for section suppressed by <includeonly>
+!! wikitext
+<includeonly>
+==Includeonly section==
+</includeonly>
+==Section 1==
+!! html
+<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+T8563: Section extraction for section suppressed by <includeonly>
+!! options
+section=1
+!! wikitext
+<includeonly>
+==Includeonly section==
+</includeonly>
+==Section 1==
+!! html
+==Section 1==
+!! end
+
+!! test
+Un-closed <includeonly>
+!! wikitext
+<includeonly>
+!! html/php
+!! html/parsoid
+<meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"&lt;includeonly>"}'/>
+!! end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize the include directives to serialize on their own line.
+## Selser will take care of preserving formatting in scenarios where they
+## intermingled with other wikitext.
+!! test
+Includes and comments at SOL
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
+
+<noinclude>
+some
+</noinclude>*stuff
+*here
+
+<includeonly>can have stuff</includeonly>===here===
+
+!! html/php
+<h2><span class="mw-headline" id="hu">hu</span></h2>
+<p>some
+</p>
+<ul><li>stuff</li>
+<li>here</li></ul>
+<h3><span class="mw-headline" id="here">here</span></h3>
+
+!! html/parsoid
+<!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"&lt;noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"&lt;/noinclude>"}'/><!-- comment --><h2 id="hu">hu</h2>
+
+<meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"&lt;noinclude>"}'/>
+<p>some</p>
+<meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"&lt;/noinclude>"}'/><ul><li>stuff</li>
+<li>here</li></ul>
+
+<meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"&lt;includeonly>can have stuff&lt;/includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here">here</h3>
+
+!! end
+
+# TODO: test with DOM fragment reuse!
+!! test
+Parsoid: DOM fragment reuse
+!! options
+parsoid=wt2wt,wt2html
+!! wikitext
+a{{echo|b<table></table>c}}d
+
+a{{echo|b
+<table></table>
+c}}d
+
+{{echo|a
+
+<table></table>
+
+b}}
+!! html
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b&lt;table>&lt;/table>c"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><table about="#mwt1" data-parsoid='{"stx":"html"}'></table><p about="#mwt1">cd</p>
+
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["a",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b\n&lt;table>&lt;/table>\nc"}},"i":0}},"d"]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>ab</p><span about="#mwt2">
+</span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
+</span><p about="#mwt2">cd</p>
+
+<p about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n\n&lt;table>&lt;/table>\n\nb"}},"i":0}}]}' data-parsoid='{"pi":[[{"k":"1"}]]}'>a</p><span about="#mwt3">
+
+</span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
+
+</span><p about="#mwt3">b</p>
+!! end
+
+!! test
+Parsoid: Merge double tds (T52603)
+!! options
+parsoid
+!! wikitext
+{|
+|{{echo|{{!}} foo}}
+|}
+!! html
+<table><tbody>
+<tr><td about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":0}}]}'> foo</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Parsoid: Merge double tds in nested transclusion content (T52603)
+!! options
+parsoid
+!! wikitext
+{{echo|<div>}}
+{|
+|{{echo|{{!}} foo}}
+|}
+{{echo|</div>}}
+!! html
+<div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\n{|\n|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} foo"}},"i":1}},"\n|}\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":2}}]}'>
+<table><tbody>
+<tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
+</tbody></table>
+</div>
+!! end
+
+###
+### <includeonly> and <noinclude> in attributes
+###
+!!test
+0. includeonly around the entire attribute
+!! wikitext
+<span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
+!! html
+<p><span id="v2">bar</span>
+</p>
+!!end
+
+!!test
+1. includeonly in html attr key
+!! wikitext
+<span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
+!! html
+<p><span id="foo">bar</span>
+</p>
+!!end
+
+!!test
+2. includeonly in html attr value
+!! wikitext
+<span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
+<span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
+!! html
+<p><span id="v1">bar</span>
+<span id="v1">bar</span>
+</p>
+!!end
+
+!!test
+3. includeonly in part of an attr value
+!! wikitext
+<span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
+!! html
+<p><span style="color:red;">bar</span>
+</p>
+!!end
+
+!!test
+4. includeonly in table attributes
+!! wikitext
+{|
+|- <noinclude>
+|-
+|a
+</noinclude>
+|- <includeonly>
+|-
+|b
+</includeonly>
+|}
+!! html
+<table>
+
+
+<tr>
+<td>a
+</td></tr>
+</table>
+
+!!end
+
+###
+### Preprocessor precedence tests
+### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
+###
+##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
+!! test
+Preprocessor precedence 1: link is rightmost opening
+!! options
+parsoid=wt2html
+!! wikitext
+{{[[Foo|bar}}]]
+
+But close-brace is not a valid character in a link title:
+{{[[Foo}}|bar]]
+
+However, we can still tell this was handled as a link in the preprocessor:
+{{echo|[[Foo}}|bar]]|bat}}
+!! html/php
+<p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
+</p><p>But close-brace is not a valid character in a link title:
+{{[[Foo}}|bar]]
+</p><p>However, we can still tell this was handled as a link in the preprocessor:
+[[Foo}}|bar]]
+</p>
+!! html/parsoid
+<p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
+<p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
+<p>However, we can still tell this was handled as a link in the preprocessor: <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Foo}}|bar]]"},"2":{"wt":"bat"}},"i":0}}]}'>[[Foo}}|bar]]</span></p>
+!! end
+
+!! test
+Preprocessor precedence 2: template is rightmost opening
+!! options
+language=zh
+!! wikitext
+-{{echo|foo}-}}-
+!! html/php
+<p>-foo}--
+</p>
+!! html/parsoid
+<p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
+!! end
+
+!! test
+Preprocessor precedence 3: language converter is rightmost opening
+!! options
+language=zh
+parsoid=wt2html
+!! wikitext
+{{echo|hi}}
+
+{{-{R|echo|hi}}}-
+
+[[-{R|raw]]}-
+!! html/php
+<p>hi
+</p><p>{{echo|hi}}
+</p><p>[[raw]]
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
+<p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
+<p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
+!! end
+
+!! test
+Preprocessor precedence 4: left-most angle bracket
+!! options
+language=zh
+!! wikitext
+<!--{raw}-->
+!! html/php
+!! html/parsoid
+<!--{raw}-->
+!! end
+
+!! article
+Template:Precedence5
+!! text
+{{{{{1}}}}}
+!! endarticle
+
+!! test
+Preprocessor precedence 5: tplarg takes precedence over template
+!! wikitext
+{{Precedence5|Bullet}}
+!! html/php
+<ul><li>Bar</li></ul>
+
+!! html/parsoid
+<ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
+!! end
+
+!! test
+Preprocessor precedence 6: broken link is rightmost opening
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|[[Foo}}
+
+{{echo|[[Foo|bar|bat=baz}}
+!! html/php
+<p>{{echo|[[Foo}}
+</p><p>{{echo|[[Foo|bar|bat=baz}}
+</p>
+!! html/parsoid
+<p>{{echo|[[Foo}}</p>
+<p>{{echo|[[Foo|bar|bat=baz}}</p>
+!! end
+
+# This next test exposes a difference between PHP and Parsoid:
+# Given [[Foo|{{echo|Bar]]x}}y]]z:
+# 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
+# "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
+# outer `[[Foo` extends until the `y]]`
+# 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
+# intermediate result (after template expansion), and link processing
+# happens on this intermediate result, which moves the wikilink
+# boundary leftward to `[[Foo|Bar]]`
+# 2b) Parsoid works in a single step, so it's going to keep the
+# wikilink as extending to the `y]]`
+# 3a) Then PHP does linktrail processing which slurps up the trailing
+# `xy` inside the link.
+# 3b) Parsoid will do linktrail processing to slurp up the trailing
+# `z` inside the link.
+# This is "correct" behavior. Parsoid's basic worldview is that the
+# `]]` inside the template shouldn't be allowed to leak out to affect
+# the surrounding wikilink. PHP may match Parsoid (in the future)
+# if you use {{#balance}} (T114445).
+
+!! test
+Preprocessor precedence 7: broken template is rightmost opening
+!! options
+parsoid=wt2html
+!! wikitext
+[[Foo|{{echo|Bar]]
+
+[[Foo|{{echo|Bar]]-x}}-y]]-z
+
+Careful: linktrails can move the end of the wikilink:
+[[Foo|{{echo|y']]a}}l]]l
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
+</p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
+</p><p>Careful: linktrails can move the end of the wikilink:
+<a href="/wiki/Foo" title="Foo">y'al</a>]]l
+</p>
+!! html/parsoid
+<p>[[Foo|{{echo|Bar]]</p>
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar]]-x"}},"i":0}}]}'>Bar]]-x</span>-y</a>-z</p>
+<p>Careful: linktrails can move the end of the wikilink:
+<a rel="mw:WikiLink" href="./Foo" title="Foo"><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"y&#39;]]a"}},"i":0}}]}'>y']]a</span>ll</a></p>
+!! end
+
+!! test
+Preprocessor precedence 8: broken language converter is rightmost opening
+!! options
+language=zh
+!! wikitext
+[[Foo-{R|raw]]
+!! html
+<p>[[Foo-{R|raw]]
+</p>
+!! end
+
+!! article
+Template:Preprocessor_precedence_9
+!! text
+;4: {{{{1}}}}
+;5: {{{{{2}}}}}
+;6: {{{{{{3}}}}}}
+;7: {{{{{{{4}}}}}}}
+!! endarticle
+
+!! test
+Preprocessor precedence 9: groups of braces
+!! wikitext
+{{Preprocessor precedence 9|Four|Bullet|1|2}}
+!! html/php
+<dl><dt>4</dt>
+<dd>{Four}</dd>
+<dt>5</dt>
+<dd></dd></dl>
+<ul><li>Bar</li></ul>
+<dl><dt>6</dt>
+<dd>Four</dd>
+<dt>7</dt>
+<dd>{Bullet}</dd></dl>
+
+!! html/parsoid
+<dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 9","href":"./Template:Preprocessor_precedence_9"},"params":{"1":{"wt":"Four"},"2":{"wt":"Bullet"},"3":{"wt":"1"},"4":{"wt":"2"}},"i":0}}]}'>
+<dt>4</dt>
+<dd>{Four}</dd>
+<dt>5</dt>
+<dd></dd>
+</dl><ul about="#mwt1">
+<li>Bar</li>
+</ul><span about="#mwt1"> </span><dl about="#mwt1">
+<dt>6</dt>
+<dd>Four</dd>
+<dt>7</dt>
+<dd>{Bullet}</dd>
+</dl>
+!! end
+
+!! article
+Template:Preprocessor_precedence_10
+!! text
+;1: -{R|raw}-
+;2: -{{Bullet}}-
+;3: -{{{1}}}-
+;4: -{{{{2}}}}-
+;5: -{{{{{3}}}}}-
+;6: -{{{{{{4}}}}}}-
+;7: -{{{{{{{5}}}}}}}-
+!! endarticle
+
+!! test
+Preprocessor precedence 10: groups of braces with leading dash
+!! options
+language=zh
+!! wikitext
+{{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
+!! html/php
+<dl><dt>1</dt>
+<dd>raw</dd>
+<dt>2</dt>
+<dd>-</dd></dl>
+<ul><li>Bar-</li></ul>
+<dl><dt>3</dt>
+<dd>-Three-</dd>
+<dt>4</dt>
+<dd>raw2</dd>
+<dt>5</dt>
+<dd>-</dd></dl>
+<ul><li>Bar-</li></ul>
+<dl><dt>6</dt>
+<dd>-Three-</dd>
+<dt>7</dt>
+<dd>raw2</dd></dl>
+
+!! html/parsoid
+<dl about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Preprocessor precedence 10","href":"./Template:Preprocessor_precedence_10"},"params":{"1":{"wt":"Three"},"2":{"wt":"raw2"},"3":{"wt":"Bullet"},"4":{"wt":"1"},"5":{"wt":"2"}},"i":0}}]}'>
+<dt>1</dt>
+<dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
+<dt>2</dt>
+<dd>-</dd>
+</dl><ul about="#mwt1">
+<li>Bar-</li>
+</ul><span about="#mwt1"> </span><dl about="#mwt1">
+<dt>3</dt>
+<dd>-Three-</dd>
+<dt>4</dt>
+<dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
+<dt>5</dt>
+<dd>-</dd>
+</dl><ul about="#mwt1">
+<li>Bar-</li>
+</ul><span about="#mwt1"> </span><dl about="#mwt1">
+<dt>6</dt>
+<dd>-Three-</dd>
+<dt>7</dt>
+<dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
+</dl>
+!! end
+
+!! test
+Preprocessor precedence 11: found during visual diff testing
+!! wikitext
+{{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
+
+{{echo|-{{echo|-{{echo|x}}}}}}
+
+{{echo|-{{echo|x}}}}
+!! html/php
+<p><span>-<span>-x</span></span>
+</p><p>--x
+</p><p>-x
+</p>
+!! html/parsoid
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"#tag:span","function":"tag"},"params":{"1":{"wt":"-{{#tag:span|-{{echo|x}}}}"}},"i":0}}]}'>-<span>-x</span></span></p>
+
+<p about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|-{{echo|x}}}}"}},"i":0}}]}'>--x</p>
+
+<p about="#mwt7" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"-{{echo|x}}"}},"i":0}}]}'>-x</p>
+!! end
+
+!! test
+Preprocessor precedence 12: broken language converter closed by brace.
+!! options
+parsoid=wt2html
+!! wikitext
+This form breaks the template, which is unfortunate:
+*{{echo|foo-{bar}bat}}
+
+But if the broken language converter markup is inside an extension
+tag, nothing bad happens:
+*<nowiki>foo-{bar}bat</nowiki>
+*{{echo|<nowiki>foo-{bar}bat</nowiki>}}
+*<pre>foo-{bar}bat</pre>
+*{{echo|<pre>foo-{bar}bat</pre>}}
+
+<tag>foo-{bar}bat</tag>
+{{echo|<tag>foo-{bar}bat</tag>}}
+
+!! html/php+tidy
+<p>This form breaks the template, which is unfortunate:
+</p>
+<ul><li>{{echo|foo-{bar}bat}}</li></ul>
+<p>But if the broken language converter markup is inside an extension
+tag, nothing bad happens:
+</p>
+<ul><li>foo-&#123;bar}bat</li>
+<li>foo-&#123;bar}bat</li>
+<li><pre>foo-{bar}bat</pre></li>
+<li><pre>foo-{bar}bat</pre></li></ul>
+<pre>'foo-{bar}bat'
+array (
+)
+</pre>
+<pre>'foo-{bar}bat'
+array (
+)
+</pre>
+!! html/parsoid
+<p>This form breaks the template, which is unfortunate:</p>
+<ul>
+<li>{{echo|foo-{bar}bat}}</li>
+</ul>
+<p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
+<ul>
+<li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
+<li><span typeof="mw:Transclusion mw:Nowiki" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;nowiki>foo-{bar}bat&lt;/nowiki>"}},"i":0}}]}'>foo-{bar}bat</span></li>
+<li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
+<li><pre typeof="mw:Transclusion mw:Extension/pre" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;pre>foo-{bar}bat&lt;/pre>"}},"i":0}}]}'>foo-{bar}bat</pre></li>
+</ul>
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'></pre> <pre typeof="mw:Extension/tag mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;tag>foo-{bar}bat&lt;/tag>"}},"i":0}}]}'></pre>
+!! end
+
+!! test
+Preprocessor precedence 13: broken language converter in external link
+!! options
+parsoid=wt2html
+!! wikitext
+*[http://example.com/-{foo Example in URL]
+*[http://example.com Example in -{link} description]
+*{{echo|[http://example.com/-{foo Breaks template, however]}}
+!! html/php+tidy
+<ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
+<li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
+<li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
+!! html/parsoid
+<ul>
+<li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
+<li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
+<li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
+</ul>
+!! end
+
+!! test
+Preprocessor precedence 14: broken language converter in comment
+!! wikitext
+*<!--{{foo}}-->...should be ok
+*<!---{{foo}}-->...extra dashes
+*{{echo|foo<!-- -{bar} -->bat}}...should be ok
+!! html/php+tidy
+<ul><li>...should be ok</li>
+<li>...extra dashes</li>
+<li>foobat...should be ok</li></ul>
+!! html/parsoid
+<ul>
+<li><!--{{foo}}-->...should be ok</li>
+<li><!--&#x2D;{{foo}}-->...extra dashes</li>
+<li><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo&lt;!-- -{bar} -->bat"}},"i":0}}]}'>foo</span><span about="#mwt1"><!-- &#x2D;{bar} --></span><span about="#mwt1">bat</span>...should be ok</li>
+</ul>
+!! end
+
+!! test
+Preprocessor precedence 15: broken brace markup in headings
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+parsoid=wt2html
+!! wikitext
+__NOTOC__ __NOEDITSECTION__
+===1 foo[bar 1===
+1
+===2 foo[[bar 2===
+2
+===3 foo{bar 3===
+3
+===4 foo{{bar 4===
+4
+===5 foo{{{bar 5===
+5
+===6 foo-{bar 6===
+6
+!! html/php+tidy
+<h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
+<p>1
+</p>
+<h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
+<p>2
+</p>
+<h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
+<p>3
+</p>
+<h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
+<p>4
+</p>
+<h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
+<p>5
+</p>
+<h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
+<p>6
+</p>
+!! html/parsoid
+<meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
+<h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
+<p>1</p>
+<h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
+<p>2</p>
+<h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
+<p>3</p>
+<h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
+<p>4</p>
+<h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
+<p>5</p>
+<h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
+<p>6</p>
+!! end
+
+!! test
+Preprocessor precedence 16: matching closing braces to opening braces
+!! options
+language=zh
+parsoid=wt2html
+!! wikitext
+-{{{echo|foo}}bar}-
+!! html/php
+<p>foobar
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}&#39;>foo&lt;/span>bar"}}'></span></p>
+!! end
+
+!! test
+Preprocessor precedence 17: template w/o target shouldn't prevent closing
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|hi {{}}}}
+!! html/php
+<p>hi {{}}
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
+!! end
+
+!! test
+Preprocessor precedence 18: another rightmost wins scenario
+!! options
+parsoid=wt2html
+!! wikitext
+{{ -{{{{1|tplarg}}} }} }-
+!! html/php
+<p>{{ -{tplarg }} }-
+</p>
+!! html/parsoid
+<p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
+!! end
+
+!! test
+Preprocessor precedence 19: break syntax
+!! options
+parsoid=wt2html
+!! wikitext
+-{{
+!! html/php
+<p>-{{
+</p>
+!! html/parsoid
+<p>-{{</p>
+!! end
+
+###
+### Token Stream Patcher tests
+###
+### These tests won't always pass wt2wt and other modes because
+### on serialization, the table will be output on a new line.
+### For now, we are blacklisting them, and using this to test selser.
+###
+
+!!test
+1. Table tag in SOL posn. should get reparsed correctly with valid TSR
+!!options
+parsoid=wt2html,wt2wt
+!!wikitext
+{{echo|}}{| width = '100%'
+|foo
+|}
+!!html/parsoid
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
+<tbody><tr><td>foo</td></tr>
+</tbody></table>
+!!end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize the include directives to serialize on their own line.
+## Selser will take care of preserving formatting in scenarios where they
+## intermingled with other wikitext.
+!!test
+2. Table tag in SOL posn. should get reparsed correctly with valid TSR
+!!options
+parsoid=wt2html
+!!wikitext
+<includeonly>a</includeonly>{| {{{b}}}
+|c
+|}
+!!html/parsoid
+<meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"&lt;includeonly>a&lt;/includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><table about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"a":{"{{{b}}}":null},"sa":{"{{{b}}}":""}}' data-mw='{"attribs":[[{"txt":"{{{b}}}","html":"&lt;span about=\"#mwt1\" typeof=\"mw:Param\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[31,38,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"b\"},\"params\":{},\"i\":0}}]}&#39;>{{{b}}}&lt;/span>"},{"html":""}]]}'>
+<tbody><tr><td>c</td></tr>
+</tbody></table>
+!!end
+
+!! test
+Table wikitext syntax outside wiki-tables
+!! wikitext
+a
+|+ not a caption
+! not a table heading
+|- not a table row
+| not a table cell
+| class="foo bar" | baz
+b
+|}
+|-
+c
+!! html
+<p>a
+|+ not a caption
+! not a table heading
+|- not a table row
+| not a table cell
+| class="foo bar" | baz
+b
+|}
+|-
+c
+</p>
+!! end
+
+###
+### Testing parsing of templates where a template arg
+### has the same name as the template itself.
+###
+
+!! article
+Template:quote
+!! text
+{{{quote|{{{1}}}}}}
+!! endarticle
+
+!!test
+Templates: Template Name/Arg clash: 1. Use of positional param
+!! wikitext
+{{quote|foo}}
+!! html
+<p>foo
+</p>
+!!end
+
+!!test
+Templates: Template Name/Arg clash: 2. Use of named param
+!! wikitext
+{{quote|quote=foo}}
+!! html
+<p>foo
+</p>
+!!end
+
+!!test
+Templates: Template Name/Arg clash: 3. Use of named param with empty input
+!! wikitext
+{{quote|quote}}
+!! html
+<p>quote
+</p>
+!!end
+
+###
+### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
+###
+
+!!test
+Templates: 1. Simple use
+!! wikitext
+{{echo|Foo}}
+!! html
+<p>Foo
+</p>
+!!end
+
+!!test
+Templates: 2. Inside a block tag
+!! wikitext
+<div>{{echo|Foo}}</div>
+<blockquote>{{echo|Foo}}</blockquote>
+!! html
+<div>Foo</div>
+<blockquote>Foo</blockquote>
+
+!! html+tidy
+<div>Foo</div>
+<blockquote><p>Foo</p></blockquote>
+!!end
+
+!!test
+Templates: P-wrapping: 1a. Templates on consecutive lines
+!! wikitext
+{{echo|Foo}}
+{{echo|bar}}
+!! html
+<p>Foo
+bar
+</p>
+!!end
+
+!!test
+Templates: P-wrapping: 1b. Templates on consecutive lines
+!! wikitext
+Foo
+
+{{echo|bar}}
+{{echo|baz}}
+!! html
+<p>Foo
+</p><p>bar
+baz
+</p>
+!!end
+
+!!test
+Templates: P-wrapping: 1c. Templates on consecutive lines
+!! wikitext
+{{echo|Foo}}
+{{echo|bar}} <div>baz</div>
+!! html
+<p>Foo
+</p>
+bar <div>baz</div>
+
+!! html+tidy
+<p>Foo
+</p><p>
+bar </p><div>baz</div>
+!! end
+
+!!test
+Templates: P-wrapping: 1d. Template preceded by comment-only line
+!!options
+parsoid
+!! wikitext
+<!-- foo -->
+{{echo|Bar}}
+!! html
+<!-- foo -->
+
+<p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
+!!end
+
+!!test
+Templates: Inline Text: 1. Multiple template uses
+!! wikitext
+{{echo|Foo}}bar{{echo|baz}}
+!! html
+<p>Foobarbaz
+</p>
+!!end
+
+!!test
+Templates: Inline Text: 2. Back-to-back template uses
+!! wikitext
+{{echo|Foo}}{{echo|bar}}
+!! html
+<p>Foobar
+</p>
+!!end
+
+!!test
+Templates: Block Tags: 1. Multiple template uses
+!! wikitext
+{{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
+!! html
+<div>Foo</div><div>bar</div><div>baz</div>
+
+!!end
+
+!!test
+Templates: Block Tags: 2. Back-to-back template uses
+!! wikitext
+{{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
+!! html
+<div>Foo</div><div>bar</div>
+
+!!end
+
+# This is an edge case relating to paragraph wrapping.
+!!test
+Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
+!! wikitext
+{{echo|a
+b</p>}}
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\nb&lt;/p>"}},"i":0}}]}'>a
+b</p>
+!!end
+
+!!test
+Templates: Links: 1. Simple example
+!! wikitext
+{{echo|[[Foo|bar]]}}
+!! html
+<p><a href="/wiki/Foo" title="Foo">bar</a>
+</p>
+!!end
+
+!!test
+Templates: Links: 2. Generation of link href
+!! wikitext
+[[{{echo|Foo}}|bar]]
+!! html
+<p><a href="/wiki/Foo" title="Foo">bar</a>
+</p>
+!!end
+
+!!test
+Templates: Links: 3. Generation of part of a link href
+!! wikitext
+[[Fo{{echo|o}}|bar]]
+
+[[Foo{{echo|bar}}]]
+
+[[Foo{{echo|bar}}baz]]
+
+[[Foo{{echo|bar}}|bar]]
+
+[[:Foo{{echo|bar}}]]
+
+[[:Foo{{echo|bar}}|bar]]
+!! html
+<p><a href="/wiki/Foo" title="Foo">bar</a>
+</p><p><a href="/index.php?title=Foobar&amp;action=edit&amp;redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
+</p><p><a href="/index.php?title=Foobarbaz&amp;action=edit&amp;redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
+</p><p><a href="/index.php?title=Foobar&amp;action=edit&amp;redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
+</p><p><a href="/index.php?title=Foobar&amp;action=edit&amp;redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
+</p><p><a href="/index.php?title=Foobar&amp;action=edit&amp;redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
+</p>
+!!end
+
+!!test
+Templates: Links: 4. Multiple templates generating link href
+!! wikitext
+[[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
+!! html
+<p><a href="/index.php?title=Foobar&amp;action=edit&amp;redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
+</p>
+!!end
+
+!!test
+Templates: Links: 5. Generation of link text
+!! wikitext
+[[Foo|{{echo|bar}}]]
+!! html
+<p><a href="/wiki/Foo" title="Foo">bar</a>
+</p>
+!!end
+
+!!test
+Templates: Links: 5. Nested templates (only outermost template should be marked)
+!! wikitext
+{{echo|[[{{echo|Foo}}|bar]]}}
+!! html
+<p><a href="/wiki/Foo" title="Foo">bar</a>
+</p>
+!!end
+
+!!test
+Templates: HTML Tag: 1. Generation of HTML attr. key
+!! wikitext
+<div {{echo|style}}="color:red;">foo</div>
+!! html
+<div style="color:red;">foo</div>
+
+!!end
+
+!!test
+Templates: HTML Tag: 2. Generation of HTML attr. value
+!! wikitext
+<div style={{echo|'color:red;'}}>foo</div>
+!! html
+<div style="color:red;">foo</div>
+
+!!end
+
+!!test
+Templates: HTML Tag: 3. Generation of HTML attr key and value
+!! wikitext
+<div {{echo|style}}={{echo|'color:red;'}}>foo</div>
+!! html
+<div style="color:red;">foo</div>
+
+!!end
+
+!!test
+Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
+!! wikitext
+<div title="{{echo|This is a long title}} with just one piece templated">foo</div>
+!! html
+<div title="This is a long title with just one piece templated">foo</div>
+
+!!end
+
+!!test
+Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
+!! wikitext
+<div title="This is a long title with just {{echo|one piece}} templated">foo</div>
+!! html
+<div title="This is a long title with just one piece templated">foo</div>
+
+!!end
+
+!!test
+Templates: HTML Tag: 6. Generation of end piece of HTML attr value
+!! wikitext
+<div title="This is a long title with just one piece {{echo|templated}}">foo</div>
+!! html
+<div title="This is a long title with just one piece templated">foo</div>
+
+!!end
+
+# SSS FIXME: While it is great we added support for all this,
+# do we want to make this part of the spec? Maybe we want to
+# deprecate this kind of usage in the future?
+!!test
+Templates: HTML Tag: 7. Generation of partial attribute key string
+!! wikitext
+<div st{{echo|yle}}="color:red;">foo</div>
+!! html
+<div style="color:red;">foo</div>
+
+!!end
+
+!! test
+Templates: HTML Tag: 8. Template-generated attribute (k=v)
+!! wikitext
+<div {{echo|1=id="v1"}}>bar</div>
+!! html
+<div id="v1">bar</div>
+
+!!end
+
+!! test
+Templates: HTML Tag: 9. Multiple template-generated attributes
+!! wikitext
+<div {{echo|1=id="v1" title="foo"}}>bar</div>
+!! html
+<div id="v1" title="foo">bar</div>
+
+!!end
+
+!! test
+Templates: Support for templates generating attributes and content
+!! wikitext
+{| {{mixed_attr_content_template}}
+|-
+|bar
+|}
+!! html/php
+<table style="color:red;" title="T48811">
+
+<tr>
+<td>foo
+</td></tr>
+<tr>
+<td>bar
+</td></tr></table>
+
+!! html/parsoid
+<table style="color:red;" title="T48811" about="#mwt1" typeof="mw:Transclusion mw:ExpandedAttrs" data-mw='{"parts":["{| ",{"template":{"target":{"wt":"mixed_attr_content_template","href":"./Template:Mixed_attr_content_template"},"params":{},"i":0}},"\n|-\n|bar\n|}"]}'>
+<tbody><tr>
+<td>foo</td></tr>
+<tr>
+<td>bar</td></tr>
+</tbody></table>
+!!end
+
+!! test
+1. Entities and nowikis inside templated attributes should be handled correctly
+!! wikitext
+<div {{echo|style{{=}}"background:&#35;f9f9f9;"}}>foo</div>
+!! html/php
+<div style="background:#f9f9f9;">foo</div>
+
+!! html/parsoid
+<div style="background:#f9f9f9;" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html"}' data-mw='{"attribs":[[{"txt":"style","html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,49,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"style{{=}}\\\"background:&amp;amp;#35;f9f9f9;\\\"\"}},\"i\":0}}]}&#39;>style&lt;/span>&lt;span typeof=\"mw:Nowiki\" about=\"#mwt1\" data-parsoid=\"{}\">=&lt;/span>&lt;span about=\"#mwt1\" data-parsoid=\"{}\">\"background:&lt;/span>&lt;span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid=&#39;{\"src\":\"&amp;amp;#35;\",\"srcContent\":\"#\"}&#39;>#&lt;/span>&lt;span about=\"#mwt1\" data-parsoid=\"{}\">f9f9f9;\"&lt;/span>"},{"html":""}]]}'>foo</div>
+!! end
+
+!! test
+2. Entities and nowikis inside templated attributes should be handled correctly
+!! wikitext
+{|
+|{{table_attribs_3}}
+|}
+!! html/php
+<table>
+<tr>
+<td style="background:#f9f9f9;">Foo
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td style="background:#f9f9f9;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":0}}]}'>Foo</td></tr>
+</tbody></table>
+!! end
+
+!! test
+3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
+!! wikitext
+{{tbl-start}}
+|{{table_attribs_3}}
+{{tbl-end}}
+!! html/php
+<table>
+<tr>
+<td style="background:#f9f9f9;">Foo
+</td></tr></table>
+
+!! html/parsoid
+<table about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[],[],[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"tbl-start","href":"./Template:Tbl-start"},"params":{},"i":0}},"\n|",{"template":{"target":{"wt":"table_attribs_3","href":"./Template:Table_attribs_3"},"params":{},"i":1}},"\n",{"template":{"target":{"wt":"tbl-end","href":"./Template:Tbl-end"},"params":{},"i":2}}]}'>
+<tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
+</tbody></table>
+!! end
+
+# T107622
+!! test
+4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
+!! wikitext
+{|
+|{{table_attribs_6}} hi
+|}
+!! html/php
+<table>
+<tr>
+<td style="background: red;">hi
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr><td style="background: red;" typeof="mw:Transclusion" about="#mwt1" data-parsoid='{"autoInsertedEnd":true,"pi":[[]]}' data-mw='{"parts":["|",{"template":{"target":{"wt":"table_attribs_6","href":"./Template:Table_attribs_6"},"params":{},"i":0}}," hi"]}'> hi</td></tr>
+</tbody></table>
+!! end
+
+!!test
+Templates: HTML Tables: 1. Generating start of a HTML table
+!! wikitext
+{{echo|<table><tr><td>foo</td>}}</tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 2a. Generating middle of a HTML table
+!! wikitext
+<table><tr>{{echo|<td>foo</td>}}</tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 2b. Generating middle of a HTML table
+!! wikitext
+<table>{{echo|<tr><td>foo</td></tr>}}</table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 3. Generating end of a HTML table
+!! wikitext
+<table><tr>{{echo|<td>foo</td></tr></table>}}
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4a. Generating a single tag of a HTML table
+!! wikitext
+{{echo|<table>}}<tr><td>foo</td></tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4b. Generating a single tag of a HTML table
+!! wikitext
+<table>{{echo|<tr>}}<td>foo</td></tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4c. Generating a single tag of a HTML table
+!! wikitext
+<table><tr>{{echo|<td>}}foo</td></tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4d. Generating a single tag of a HTML table
+!! wikitext
+<table><tr><td>foo{{echo|</td>}}</tr></table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4e. Generating a single tag of a HTML table
+!! wikitext
+<table><tr><td>foo</td>{{echo|</tr>}}</table>
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 4f. Generating a single tag of a HTML table
+!! wikitext
+<table><tr><td>foo</td></tr>{{echo|</table>}}
+!! html
+<table><tr><td>foo</td></tr></table>
+
+!!end
+
+!!test
+Templates: HTML Tables: 5. Proper fostering of categories from inside
+!!options
+parsoid=wt2html,wt2wt
+!! wikitext
+<table>[[Category:foo1]]<tr><td>foo</td></tr></table>
+<!--Two categories (T52330)-->
+<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
+!! html
+<link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
+<!--Two categories (T52330)-->
+<link rel="mw:PageProp/Category" href="./Category:Bar1"><link rel="mw:PageProp/Category" href="./Category:Bar2"><table><tbody><tr><td>foo</td></tr></tbody></table>
+!!end
+
+!!test
+Templates: Wiki Tables: 1a. Fostering of entire template content
+!! wikitext
+{|
+{{echo|a}}
+|}
+!! html
+<table>
+a
+<tr><td></td></tr></table>
+
+!! html/php+tidy
+
+a
+<table><tbody><tr><td></td></tr></tbody></table>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
+
+</table>
+!! end
+
+!!test
+Templates: Wiki Tables: 1b. Fostering of entire template content
+!! wikitext
+{|
+{{echo|<div>}}
+foo
+{{echo|</div>}}
+|}
+!! html
+<table>
+<div>
+<p>foo
+</p>
+</div>
+<tr><td></td></tr></table>
+
+!! html/php+tidy
+<div>
+<p>foo
+</p>
+</div><table>
+
+<tbody><tr><td></td></tr></tbody></table>
+!! html/parsoid
+<div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;/div>"}},"i":1}},"\n|}"]}'>
+<p>foo</p>
+</div><table about="#mwt3">
+
+</table>
+!! end
+
+!!test
+Templates: Wiki Tables: 2. Fostering of partial template content
+!! wikitext
+{|
+{{echo|a
+<div>b</div>}}
+|}
+!! html
+<table>
+a
+<div>b</div>
+<tr><td></td></tr></table>
+
+!! html/php+tidy
+
+a
+<div>b</div><table>
+<tbody><tr><td></td></tr></tbody></table>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n&lt;div>b&lt;/div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
+
+
+</table>
+!! end
+
+!!test
+Templates: Wiki Tables: 3. td-content via multiple templates
+!! wikitext
+{|
+{{echo|{{pipe}}a}}{{echo|b}}
+|}
+!! html
+<table>
+<tr>
+<td>ab
+</td></tr></table>
+
+!!end
+
+!!test
+Templates: Wiki Tables: 4. Templated tags, no content
+!! wikitext
+{{tbl-start}}
+{{tbl-end}}
+!! html
+<table>
+<tr><td></td></tr></table>
+
+!!end
+
+!!test
+Templates: Wiki Tables: 5. Templated tags, regular td-tags
+!! wikitext
+{{tbl-start}}
+|foo
+{{tbl-end}}
+!! html
+<table>
+<tr>
+<td>foo
+</td></tr></table>
+
+!!end
+
+!!test
+Templates: Wiki Tables: 6. Templated tags, templated td-tags
+!! wikitext
+{{tbl-start}}
+{{!}}foo
+{{tbl-end}}
+!! html
+<table>
+<tr>
+<td>foo
+</td></tr></table>
+
+!!end
+
+## This test case is very specific to Parsoid's internals
+## and is hence only tested for Parsoid's code. Parsoid uses
+## a <meta> marker tag for <ref> tags and they are expanded
+## much later. We are verifying that this <meta> tag usage
+## doesn't prevent foster parenting.
+!!test
+Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
+!!wikitext
+{{PartialTable}}<ref>foo</ref>
+|}
+
+<references />
+!!html/parsoid
+<sup about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"PartialTable","href":"./Template:PartialTable"},"params":{},"i":0}},"&lt;ref>foo&lt;/ref>\n|}"]}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></sup><table about="#mwt2">
+<tbody>
+</tbody></table>
+
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
+!!end
+
+!! test
+Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
+!! wikitext
+{{echo|
+{{{!}}
+{{!}}-}}
+<onlyinclude>
+|foo
+</onlyinclude>
+{{!}}}
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n{{{!}}\n{{!}}-"}},"i":0}},"\n&lt;onlyinclude>\n|foo\n&lt;/onlyinclude>\n{{!}}}"]}'>
+</span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
+<tbody><tr>
+
+<td>foo
+<meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
+</tbody></table>
+!! end
+
+!!test
+Templates: Lists: Multi-line list-items via templates
+!! wikitext
+*{{echo|a {{nonexistent|
+unused}}}}
+*{{echo|b {{nonexistent|
+unused}}}}
+!! html
+<ul><li>a <a href="/index.php?title=Template:Nonexistent&amp;action=edit&amp;redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li>
+<li>b <a href="/index.php?title=Template:Nonexistent&amp;action=edit&amp;redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a></li></ul>
+
+!!end
+
+!!test
+Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
+!! wikitext
+{{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
+!! html
+<p><i>ab</i>c<i>d</i>e
+</p>
+!!end
+
+!!test
+Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
+(PHP parser generates misnested html)
+!! wikitext
+{{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
+!! html/parsoid
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_span&quot;,&quot;href&quot;:&quot;./Template:Echo_with_span&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''a&quot;}},&quot;i&quot;:0}}]}"><i>a</i></span><i about="#mwt2" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_span&quot;,&quot;href&quot;:&quot;./Template:Echo_with_span&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;b''c''d&quot;}},&quot;i&quot;:0}},{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_span&quot;,&quot;href&quot;:&quot;./Template:Echo_with_span&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''e&quot;}},&quot;i&quot;:1}}]}"><span>b</span></i><span about="#mwt2">c</span><i about="#mwt2">d<span></span></i><span about="#mwt2">e</span></p>
+!!end
+
+!!test
+Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
+(PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+{{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
+!! html
+<div about="#mwt1" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_div&quot;,&quot;href&quot;:&quot;./Template:Echo_with_div&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''a&quot;}},&quot;i&quot;:0}}]}"><i>a</i></div>
+<div about="#mwt2" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_div&quot;,&quot;href&quot;:&quot;./Template:Echo_with_div&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;b''c''d&quot;}},&quot;i&quot;:0}}]}"><i>b</i>c<i>d</i></div>
+<div about="#mwt3" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo_with_div&quot;,&quot;href&quot;:&quot;./Template:Echo_with_div&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;''e&quot;}},&quot;i&quot;:0}}]}">e</div>
+!!end
+
+!!test
+Templates: Ugly nesting: 4. Divs opened/closed across templates
+!! wikitext
+a<div>b{{echo|c</div>d}}e
+!! html
+a<div>bc</div>de
+
+!! html+tidy
+<p>a</p><div>bc</div><p>de
+</p>
+!! end
+
+!! test
+Templates: Ugly templates: 3. newline-only template parameter
+!! wikitext
+foo {{echo|
+}}
+!! html
+<p>foo
+</p>
+!! end
+
+# This looks like a bug: a single newline triggers p/br for some reason.
+!! test
+Templates: Ugly templates: 4. newline-only template parameter inconsistency
+!! wikitext
+{{echo|
+}}
+!! html
+<p><br />
+</p>
+!! end
+
+# T66017 -- ugly wikitext with fostered content generates two template ranges that
+# have a true overlap (T1-start - T2-start - T1-end - T2-end).
+!! test
+Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
+!! wikitext
+{{echo|<table>}}
+{{echo|<div>foo}}
+{{echo|</table>}}
+!! html/parsoid
+<div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>foo"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;/table>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'>foo
+</div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
+</table>
+!! end
+
+# T66017 -- ugly wikitext with fostered content generates two template ranges
+# that are "identical" and generate nesting cycles in the algorithm
+!! test
+Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
+!! wikitext
+{{echo|<table><tr><td><table>}}
+{{echo|<div>}}
+{{echo|</div>}}
+!! html/parsoid
+<table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;table>&lt;tr>&lt;td>&lt;table>"}},"i":0}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>"}},"i":1}},"\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;/div>"}},"i":2}}]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>
+</div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
+</table></td></tr></tbody></table>
+!! end
+
+!! test
+Templates: Parameters substituted at the top-level
+!! wikitext
+{{{foo|''who'' {{echo|me}}? '''never!'''}}}
+
+{{{foo|bar|baz}}}
+!! html/php
+<p><i>who</i> me? <b>never!</b>
+</p><p>bar
+</p>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"&#39;&#39;who&#39;&#39; {{echo|me}}? &#39;&#39;&#39;never!&#39;&#39;&#39;"}},"i":0}}]}'><i>who</i> me? <b>never!</b></p>
+
+<p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
+!! end
+
+!! test
+Templates: Param with empty arg in the final position
+!! wikitext
+{{{hi|}}}
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
+!! end
+
+!!test
+Parser Functions: 1. Simple example
+!! wikitext
+{{uc:foo}}
+!! html
+<p>FOO
+</p>
+!!end
+
+!!test
+Parser Functions: 2. Nested use (only outermost should be marked up)
+!! wikitext
+{{uc:{{lc:FOO}}}}
+!! html
+<p>FOO
+</p>
+!!end
+
+###
+### Pre-save transform tests
+###
+!! test
+pre-save transform: subst:
+!! options
+pst
+!! wikitext
+{{subst:test}}
+!! html/php
+This is a test template
+!! end
+
+!! test
+pre-save transform: normal template
+!! options
+pst
+!! wikitext
+{{test}}
+!! html/php
+{{test}}
+!! end
+
+!! test
+pre-save transform: nonexistent template
+!! options
+pst
+!! wikitext
+{{thistemplatedoesnotexist}}
+!! html/php
+{{thistemplatedoesnotexist}}
+!! end
+
+!! test
+pre-save transform: subst magic variables
+!! options
+pst
+!! wikitext
+{{subst:SITENAME}}
+!! html/php
+MediaWiki
+!! end
+
+# This is T2089, which I fixed. -- wtm
+!! test
+pre-save transform: subst: templates with parameters
+!! options
+pst
+!! wikitext
+{{subst:paramtest|param="something else"}}
+!! html/php
+This is a test template with parameter "something else"
+!! end
+
+!! article
+Template:nowikitest
+!! text
+<nowiki>'''not wiki'''</nowiki>
+!! endarticle
+
+!! test
+pre-save transform: nowiki in subst (T3188)
+!! options
+pst
+!! wikitext
+{{subst:nowikitest}}
+!! html/php
+<nowiki>'''not wiki'''</nowiki>
+!! end
+
+!! article
+Template:commenttest
+!! text
+This template has <!-- a comment --> in it.
+!! endarticle
+
+!! test
+pre-save transform: comment in subst (T3936)
+!! options
+pst
+!! wikitext
+{{subst:commenttest}}
+!! html/php
+This template has <!-- a comment --> in it.
+!! end
+
+!! test
+pre-save transform: unclosed tag
+!! options
+pst
+!! wikitext
+<nowiki>'''not wiki'''
+!! html/php
+<nowiki>'''not wiki'''
+!! end
+
+!! test
+pre-save transform: mixed tag case
+!! options
+pst
+!! wikitext
+<NOwiki>'''not wiki'''</noWIKI>
+!! html/php
+<NOwiki>'''not wiki'''</noWIKI>
+!! end
+
+!! test
+pre-save transform: unclosed comment in <nowiki>
+!! options
+pst
+!! wikitext
+wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
+!! html/php
+wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
+!!end
+
+# Leading @ in this template definition works around a limitation
+# in parsoid's parserTests which otherwise strips the <span> from the
+# result (confusing it for a template wrapper)
+!! article
+Template:dangerous
+!!text
+@<span onmouseover="alert('crap')">Oh no</span>
+!!endarticle
+
+!!test
+(confirming safety of fix for subst T3936)
+!! wikitext
+{{Template:dangerous}}
+!! html
+<p>@<span>Oh no</span>
+</p>
+!! end
+
+!! test
+pre-save transform: comment containing gallery (T7024)
+!! options
+pst
+!! wikitext
+<!-- <gallery>data</gallery> -->
+!! html/php
+<!-- <gallery>data</gallery> -->
+!!end
+
+!! test
+pre-save transform: comment containing extension
+!! options
+pst
+!! wikitext
+<!-- <tag>data</tag> -->
+!! html/php
+<!-- <tag>data</tag> -->
+!!end
+
+!! test
+pre-save transform: comment containing nowiki
+!! options
+pst
+!! wikitext
+<!-- <nowiki>data</nowiki> -->
+!! html/php
+<!-- <nowiki>data</nowiki> -->
+!!end
+
+!! test
+pre-save transform: <noinclude> in subst (T5298)
+!! options
+pst
+!! wikitext
+{{subst:Includes}}
+!! html/php
+Foobar
+!! end
+
+!! test
+pre-save transform: <onlyinclude> in subst (T5298)
+!! options
+pst
+!! wikitext
+{{subst:Includes2}}
+!! html/php
+Foo
+!! end
+
+!! article
+Template:SubstTest
+!!text
+{{<includeonly>subst:</includeonly>Includes}}
+!! endarticle
+
+!! article
+Template:SafeSubstTest
+!! text
+{{<includeonly>safesubst:</includeonly>Includes}}
+!! endarticle
+
+!! test
+T24297: safesubst: works during PST
+!! options
+pst
+!! wikitext
+{{subst:SafeSubstTest}}{{safesubst:SubstTest}}
+!! html/php
+FoobarFoobar
+!! end
+
+!! test
+T24297: safesubst: works during normal parse
+!! wikitext
+{{SafeSubstTest}}
+!! html
+<p>Foobar
+</p>
+!! end
+
+!! test
+subst: does not work during normal parse
+!! wikitext
+{{SubstTest}}
+!! html
+<p>{{subst:Includes}}
+</p>
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick")
+!! options
+pst
+!! wikitext
+[[Article (context)|]]
+[[Bar:Article|]]
+[[:Bar:Article|]]
+[[Bar:Article (context)|]]
+[[:Bar:Article (context)|]]
+[[|Article]]
+[[|Article (context)]]
+[[Bar:X (Y) Z|]]
+[[:Bar:X (Y) Z|]]
+!! html/php
+[[Article (context)|Article]]
+[[Bar:Article|Article]]
+[[:Bar:Article|Article]]
+[[Bar:Article (context)|Article]]
+[[:Bar:Article (context)|Article]]
+[[Article]]
+[[Article (context)]]
+[[Bar:X (Y) Z|X (Y) Z]]
+[[:Bar:X (Y) Z|X (Y) Z]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with interwiki prefix
+!! options
+pst
+!! wikitext
+[[interwiki:Article|]]
+[[:interwiki:Article|]]
+[[interwiki:Bar:Article|]]
+[[:interwiki:Bar:Article|]]
+!! html/php
+[[interwiki:Article|Article]]
+[[:interwiki:Article|Article]]
+[[interwiki:Bar:Article|Bar:Article]]
+[[:interwiki:Bar:Article|Bar:Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with parens in title
+!! options
+pst title=[[Somearticle (context)]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Article (context)|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with comma in title
+!! options
+pst title=[[Someplace, Somewhere]]
+!! wikitext
+[[|Otherplace]]
+[[Otherplace, Elsewhere|]]
+[[Otherplace, Elsewhere, Anywhere|]]
+!! html/php
+[[Otherplace, Somewhere|Otherplace]]
+[[Otherplace, Elsewhere|Otherplace]]
+[[Otherplace, Elsewhere, Anywhere|Otherplace]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with parens and comma
+!! options
+pst title=[[Someplace (IGNORED), Somewhere]]
+!! wikitext
+[[|Otherplace]]
+[[Otherplace (place), Elsewhere|]]
+!! html/php
+[[Otherplace, Somewhere|Otherplace]]
+[[Otherplace (place), Elsewhere|Otherplace]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with comma and parens
+!! options
+pst title=[[Who, me? (context)]]
+!! wikitext
+[[|Yes, you.]]
+[[Me, Myself, and I (1937 song)|]]
+!! html/php
+[[Yes, you. (context)|Yes, you.]]
+[[Me, Myself, and I (1937 song)|Me, Myself, and I]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with namespace
+!! options
+pst title=[[Ns:Somearticle]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Ns:Article|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with namespace and parens
+!! options
+pst title=[[Ns:Somearticle (context)]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Ns:Article (context)|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with namespace and comma
+!! options
+pst title=[[Ns:Somearticle, Context, Whatever]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Ns:Article, Context, Whatever|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with namespace, comma and parens
+!! options
+pst title=[[Ns:Somearticle, Context (context)]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Ns:Article (context)|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with namespace, parens and comma
+!! options
+pst title=[[Ns:Somearticle (IGNORED), Context]]
+!! wikitext
+[[|Article]]
+!! html/php
+[[Ns:Article, Context|Article]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
+!! options
+pst
+!! wikitext
+[[Article(context)|]]
+[[Bar:Article(context)|]]
+[[:Bar:Article(context)|]]
+[[|Article(context)]]
+[[Bar:X(Y)Z|]]
+[[:Bar:X(Y)Z|]]
+!! html/php
+[[Article(context)|Article]]
+[[Bar:Article(context)|Article]]
+[[:Bar:Article(context)|Article]]
+[[Article(context)]]
+[[Bar:X(Y)Z|X(Y)Z]]
+[[:Bar:X(Y)Z|X(Y)Z]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
+!! options
+pst
+!! wikitext
+[[Article (context)|]]
+[[Bar:Article (context)|]]
+[[:Bar:Article (context)|]]
+[[|Article (context)]]
+[[Bar:X (Y) Z|]]
+[[:Bar:X (Y) Z|]]
+!! html/php
+[[Article (context)|Article]]
+[[Bar:Article (context)|Article]]
+[[:Bar:Article (context)|Article]]
+[[Article (context)]]
+[[Bar:X (Y) Z|X (Y) Z]]
+[[:Bar:X (Y) Z|X (Y) Z]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
+!! options
+pst
+!! wikitext
+[[Article(context)|]]
+[[Bar:Article(context)|]]
+[[:Bar:Article(context)|]]
+[[|Article(context)]]
+[[Bar:X(Y)Z|]]
+[[:Bar:X(Y)Z|]]
+!! html/php
+[[Article(context)|Article]]
+[[Bar:Article(context)|Article]]
+[[:Bar:Article(context)|Article]]
+[[Article(context)]]
+[[Bar:X(Y)Z|X(Y)Z]]
+[[:Bar:X(Y)Z|X(Y)Z]]
+!! end
+
+!! test
+pre-save transform: context links ("pipe trick") with commas (T23660)
+!! options
+pst
+!! wikitext
+[[Article (context), context|]]
+[[Article (context),context|]]
+[[Bar:Article (context), context|]]
+[[Bar:Article (context),context|]]
+[[:Bar:Article (context), context|]]
+[[:Bar:Article (context),context|]]
+!! html/php
+[[Article (context), context|Article]]
+[[Article (context),context|Article]]
+[[Bar:Article (context), context|Article]]
+[[Bar:Article (context),context|Article]]
+[[:Bar:Article (context), context|Article]]
+[[:Bar:Article (context),context|Article]]
+!! end
+
+!! test
+Parsoid: backwards pipe trick
+!! wikitext
+[[|'''bar''']]
+!! html/php
+<p>[[|<b>bar</b>]]
+</p>
+!! html/parsoid
+<p>[[|<b>bar</b>]]</p>
+!! end
+
+!! test
+pre-save transform: trim trailing empty lines
+!! options
+pst
+!! wikitext
+Empty lines are trimmed
+
+
+
+
+!! html/php
+Empty lines are trimmed
+!! end
+
+!! test
+pre-save transform: Signature expansion
+!! options
+pst
+!! wikitext
+* ~~~
+* ~~~~
+* ~~~~~
+* <noinclude>~~~</noinclude>
+* <includeonly>~~~</includeonly>
+* <onlyinclude>~~~</onlyinclude>
+!! html/php
+* [[Special:Contributions/127.0.0.1|127.0.0.1]]
+* [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
+* 00:02, 1 January 1970 (UTC)
+* <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
+* <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
+* <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
+!! end
+
+
+!! test
+ParserOutput flags from signature expansion (T84843)
+!! options
+pst
+showflags
+!! wikitext
+~~~~
+!! html/php
+[[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
+flags=user-signature
+!! end
+
+
+!! test
+pre-save transform: Signature expansion in nowiki tags (T2093)
+!! options
+pst disabled
+!! wikitext
+Shall not expand:
+
+<nowiki>~~~~</nowiki>
+
+<includeonly><nowiki>~~~~</nowiki></includeonly>
+
+<noinclude><nowiki>~~~~</nowiki></noinclude>
+
+<onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
+
+{{subst:Foo}} shall be converted to FOO
+
+As well as inside noinclude/onlyinclude
+<noinclude>{{subst:Foo}}</noinclude>
+<onlyinclude>{{subst:Foo}}</onlyinclude>
+
+But not inside includeonly
+<includeonly>{{subst:Foo}}</includeonly>
+!! html/php
+Shall not expand:
+
+<nowiki>~~~~</nowiki>
+
+<includeonly><nowiki>~~~~</nowiki></includeonly>
+
+<noinclude><nowiki>~~~~</nowiki></noinclude>
+
+<onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
+
+FOO shall be converted to FOO
+
+As well as inside noinclude/onlyinclude
+<noinclude>FOO</noinclude>
+<onlyinclude>FOO</onlyinclude>
+
+But not inside includeonly
+<includeonly>{{subst:Foo}}</includeonly>
+!! end
+
+!! test
+Parsoid: Recognize nowiki with trailing space in tags
+!! options
+parsoid=wt2html
+!! wikitext
+<nowiki ><div>[[foo]]</nowiki >
+
+a<nowiki / >b
+
+c<nowiki />d
+
+e<nowiki/ >f
+!! html
+<p><span typeof="mw:Nowiki">&lt;div&gt;[[foo]]</span></p>
+<p>ab</p>
+<p>cd</p>
+<p>ef</p>
+!! end
+
+!! test
+Parsoid: Recognize nowiki with odd capitalization
+!! options
+parsoid=wt2html
+!! wikitext
+<noWikI ><div>[[foo]]</Nowiki >
+!! html
+<p><span typeof="mw:Nowiki">&lt;div&gt;[[foo]]</span></p>
+!! end
+
+
+!! test
+Parsoid: Escape nowiki with trailing space in tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;nowiki &gt; foo &lt/nowiki ></p>
+<p>a&lt;nowiki /&gt;b</p>
+<p>c&lt;nowiki/ &gt;d</p>
+!! wikitext
+&lt;nowiki &gt; foo &lt;/nowiki &gt;
+
+a&lt;nowiki /&gt;b
+
+c&lt;nowiki/ &gt;d
+!! end
+
+!! test
+Parsoid: Escape weird noWikI capitalizations
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;noWikI &gt; foo &lt/NoWikI ></p>
+!! wikitext
+&lt;noWikI &gt; foo &lt;/NoWikI &gt;
+!! end
+
+###
+### Message transform tests
+###
+!! test
+message transform: magic variables
+!! options
+msg
+!! wikitext
+{{SITENAME}}
+!! html
+MediaWiki
+!! end
+
+!! test
+message transform: should not transform wiki markup
+!! options
+msg
+!! wikitext
+''test''
+!! html
+''test''
+!! end
+
+!! test
+message transform: <noinclude> in transcluded template (T6926)
+!! options
+msg
+!! wikitext
+{{Includes}}
+!! html
+Foobar
+!! end
+
+!! test
+message transform: <onlyinclude> in transcluded template (T6926)
+!! options
+msg
+!! wikitext
+{{Includes2}}
+!! html
+Foo
+!! end
+
+!! test
+{{#special:}} page name, known
+!! options
+msg
+!! wikitext
+{{#special:Recentchanges}}
+!! html
+Special:RecentChanges
+!! end
+
+!! test
+{{#special:}} page name with subpage, known
+!! options
+msg
+!! wikitext
+{{#special:Recentchanges/param}}
+!! html
+Special:RecentChanges/param
+!! end
+
+!! test
+{{#special:}} page name, unknown
+!! options
+msg
+!! wikitext
+{{#special:foobar nonexistent}}
+!! html
+Special:Foobar nonexistent
+!! end
+
+!! test
+{{#speciale:}} page name, known
+!! options
+msg
+!! wikitext
+{{#speciale:Recentchanges}}
+!! html
+Special:RecentChanges
+!! end
+
+!! test
+{{#speciale:}} page name with subpage, known
+!! options
+msg
+!! wikitext
+{{#speciale:Recentchanges/param}}
+!! html
+Special:RecentChanges/param
+!! end
+
+!! test
+{{#speciale:}} page name, unknown
+!! options
+msg
+!! wikitext
+{{#speciale:foobar nonexistent}}
+!! html
+Special:Foobar_nonexistent
+!! end
+
+###
+### Images
+###
+### For Parsoid-specific tests, see
+#### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
+
+!! test
+Simple image
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:foobar.jpg]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Serialize simple image with span wrapper
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><span class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></span></p>
+!! wikitext
+[[File:Foobar.jpg]]
+!! end
+
+!! test
+Simple image (using File: namespace, now canonical)
+!! wikitext
+[[File:Foobar.jpg]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Right-aligned image
+!! wikitext
+[[File:Foobar.jpg|right]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+!! end
+
+!! test
+Image with caption
+!! wikitext
+[[File:Foobar.jpg|right|Caption text]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
+!! end
+
+!! test
+Image with caption, T55312 #1
+!! wikitext
+[[File:Foobar.jpg|right|Caption page stuff]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page stuff"><img alt="Caption page stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page stuff</figcaption></figure>
+!! end
+
+!! test
+Image with caption, T55312 #2
+!! wikitext
+[[File:Foobar.jpg|right|Caption page=]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page="><img alt="Caption page=" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=</figcaption></figure>
+!! end
+
+!! test
+Image with caption, T55312 #3
+!! wikitext
+[[File:Foobar.jpg|right|Caption page=stuff]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption page=stuff"><img alt="Caption page=stuff" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
+!! end
+
+!! test
+Image caption with pipe entity
+!! wikitext
+[[File:Foobar.jpg|thumb|one &#x7C; two]]
+[[File:Foobar.jpg|thumb|one ''two'' &#x7C; three]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one &#x7c; two</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> &#x7c; three</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
+!! end
+
+!! test
+Allow empty links in image captions (T62753)
+!! options
+thumbsize=220
+!! wikitext
+[[File:Foobar.jpg|thumb|Caption [[Link1]]
+[[]]
+[[Link2]]
+]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Caption <a href="/index.php?title=Link1&amp;action=edit&amp;redlink=1" class="new" title="Link1 (page does not exist)">Link1</a> [[]] <a href="/index.php?title=Link2&amp;action=edit&amp;redlink=1" class="new" title="Link2 (page does not exist)">Link2</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption [[Link1]]\n[[]]\n[[Link2]]\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption <a rel="mw:WikiLink" href="./Link1" title="Link1" data-parsoid='{"stx":"simple","a":{"href":"./Link1"},"sa":{"href":"Link1"}}'>Link1</a>
+[[]]
+<a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
+</figcaption></figure>
+!! end
+
+!! test
+Titles in unlinked images (T23454)
+!! wikitext
+[[File:Foobar.jpg|link=|stuff]]
+!! html/php
+<p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
+!! end
+
+!! test
+Link with empty target
+!! wikitext
+[[]]
+!! html
+<p>[[]]
+</p>
+!! end
+
+!! test
+Image with link trail
+!! wikitext
+Linktrails should not work for images: [[File:Foobar.jpg]]s
+!! html/php
+<p>Linktrails should not work for images: <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>s
+</p>
+!! html/parsoid
+<p>Linktrails should not work for images: <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>s</p>
+!! end
+
+!! test
+Image with empty attribute
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|right||Caption text]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
+!! end
+
+!! test
+1. Block image with individual attributes from templates
+!! wikitext
+[[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["width",{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,38,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}&#39;>137px&lt;/span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
+!! end
+
+!! test
+2. Block Image with individual attributes from templates
+!! wikitext
+[[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:139px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" width="137" height="16" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/206px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/274px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption</div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt3" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"{{echo|thumb}}"},{"ck":"width","ak":"{{echo|137px}}"},{"ck":"caption","ak":"This is a caption"}]}' data-mw='{"attribs":[["thumbnail",{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,32,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"thumb\"}},\"i\":0}}]}&#39;>thumb&lt;/span>"}],["width",{"html":"&lt;span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[33,47,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"137px\"}},\"i\":0}}]}&#39;>137px&lt;/span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/137px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="16" width="137" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"16","width":"137"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>This is a caption</figcaption></figure>
+!! end
+
+!! test
+3. Inline image with individual attributes from templates
+!! wikitext
+[[File:Foobar.jpg|{{echo|50px}}]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"width","ak":"{{echo|50px}}"}]}' data-mw='{"attribs":[["width",{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[18,31,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"50px\"}},\"i\":0}}]}&#39;>50px&lt;/span>"}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+## Parsoid does not provide editing support for images where templates produce multiple image attributes.
+## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
+!! test
+Image with multiple attributes from the same template
+!! wikitext
+[[File:Foobar.jpg|{{image_attribs}}]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image mw:Placeholder"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption text</figcaption></figure>
+!! end
+
+!! test
+Image with link tails
+!! options
+thumbsize=220
+!! wikitext
+123[[File:Foobar.jpg]]456
+123[[File:Foobar.jpg|right]]456
+123[[File:Foobar.jpg|thumb]]456
+!! html/php
+<p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
+</p>
+123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
+123<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>456
+
+!! html/php+tidy
+<p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
+</p><p>
+123</p><div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div><p>456
+123</p><div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div><p>456
+</p>
+!! html/parsoid
+<p>123<figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline>456</p>
+<p>123</p><figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure><p>456</p>
+<p>123</p><figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure><p>456</p>
+!! end
+
+!! test
+Image with multiple captions -- only last one is accepted
+!! wikitext
+[[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption3 - accepted</figcaption></figure>
+!! end
+
+!! test
+Image with multiple widths -- use last
+!! wikitext
+[[File:Foobar.jpg|200px|300px|caption]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" width="300" height="34" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/450px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/600px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure-inline></p>
+!! end
+
+!! test
+Image with multiple alignments -- use first (T50664)
+!! options
+thumbsize=220
+!! wikitext
+[[File:Foobar.jpg|thumb|left|right|center|caption]]
+
+[[File:Foobar.jpg|middle|text-top|caption]]
+!! html/php
+<div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" style="vertical-align: middle" /></a>
+</p>
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+<p><figure-inline class="mw-default-size mw-valign-middle" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Image with width attribute at different positions
+!! wikitext
+[[File:Foobar.jpg|200px|right|Caption]]
+[[File:Foobar.jpg|right|200px|Caption]]
+[[File:Foobar.jpg|right|Caption|200px]]
+!! html/php
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
+
+!! html/parsoid
+<figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
+<figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
+<figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>Caption</figcaption></figure>
+!! end
+
+# a sad bit of backward-compatibility
+!! test
+Image with size specified with pxpx (T15500, T53628)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|20pxpx]]
+[[File:Foobar.jpg|200x20pxpx]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
+<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" width="177" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/265px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/353px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline> <figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/177px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="177"/></a></figure-inline></p>
+!! end
+
+!! test
+Image with link parameter, wiki target
+!! wikitext
+[[File:Foobar.jpg|link=Main Page]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+# parsoid T51293 (part 1)
+!! test
+Image with link parameter, URL target
+!! wikitext
+[[File:Foobar.jpg|link=http://example.com/]]
+!! html/php
+<p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+# parsoid T51293 (part 2)
+!! test
+Image with link parameter, protocol-less URL target
+!! wikitext
+[[File:Foobar.jpg|link=//example.com/]]
+!! html/php
+<p><a href="//example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="//example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Escaping non-block captions (T107435)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|caption]]
+!! wikitext/edited
+[[Image:Foobar.jpg|<nowiki>|</nowiki>]]
+!! end
+
+# wgExternalLinkTarget not supported by Parsoid
+!! test
+Image with link parameter, wgExternalLinkTarget
+!! wikitext
+[[Image:foobar.jpg|link=http://example.com/]]
+!! config
+wgExternalLinkTarget='foobar'
+!! html/php
+<p><a href="http://example.com/" target="foobar" rel="nofollow noreferrer noopener"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+!! test
+Image with link parameter, wgNoFollowLinks set to false
+!! wikitext
+[[Image:foobar.jpg|link=http://example.com/]]
+!! config
+wgNoFollowLinks=false
+!! html/php
+<p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+!! test
+Image with link parameter, wgNoFollowDomainExceptions
+!! wikitext
+[[Image:foobar.jpg|link=http://example.com/]]
+!! config
+wgNoFollowDomainExceptions='example.com'
+!! html/php
+<p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+# wgExternalLinkTarget not supported by Parsoid
+!! test
+Image with link parameter, wgExternalLinkTarget, unnamed parameter
+!! wikitext
+[[Image:foobar.jpg|link=http://example.com/|Title]]
+!! config
+wgExternalLinkTarget='foobar'
+!! html/php
+<p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow noreferrer noopener"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+!! test
+Image with empty link parameter
+!! wikitext
+[[File:Foobar.jpg|link=]]
+!! html/php
+<p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
+!! end
+
+!! test
+Image with link parameter (wiki target) and unnamed parameter
+!! wikitext
+[[File:Foobar.jpg|link=Main_Page|Title]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Image with link parameter (URL target) and unnamed parameter
+!! wikitext
+[[File:Foobar.jpg|link=http://example.com/|Title]]
+!! html/php
+<p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"Title"}'><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Thumbnail image with link parameter
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="http://example.com/"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Manually-specified thumbnail image
+!! options
+thumbsize=220
+!! wikitext
+[[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Manually-specified thumbnail image with explicit link to wiki page
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Manually-specified thumbnail image with explicit link to url
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="http://example.com"><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Manually-specified thumbnail image with explicit no link
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></span><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Manually-specified thumbnail image with explicit link and alt text
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Title</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-mw='{"thumb":"Thumb.png"}'><a href="./Main_Page"><img alt="alttext" resource="./File:Foobar.jpg" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a><figcaption>Title</figcaption></figure>
+!! end
+
+!! test
+Image with frame and link
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
+!! html/php
+<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
+!! end
+
+!! test
+Image with frame and link and explicit alt
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
+!! html/php
+<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img alt="Altitude" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>This is a test image <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></figcaption></figure>
+!! end
+
+!! test
+Image with wiki markup in implicit alt
+!! wikitext
+[[Image:Foobar.jpg|testing '''bold''' in alt]]
+
+[[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"testing &#39;&#39;&#39;bold&#39;&#39;&#39; in alt"}]}' data-mw='{"caption":"testing &lt;b data-parsoid=&#39;{\"dsr\":[27,37,3,3]}&#39;>bold&lt;/b> in alt"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
+
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"alt","ak":"alt=testing &#39;&#39;&#39;bold&#39;&#39;&#39; in alt"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="testing bold in alt" resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"testing bold in alt","resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=testing &#39;&#39;&#39;bold&#39;&#39;&#39; in alt","resource":"Image:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Alt image option should handle most kinds of wikitext without barfing
+!! wikitext
+[[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a link and a bold template." src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is the image caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|&apos;&apos;bold template&apos;&apos;}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a &lt;a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=&apos;{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}&apos;>link&lt;/a> and a &lt;i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&apos;{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}&apos; data-mw=&apos;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&amp;apos;&amp;apos;bold template&amp;apos;&amp;apos;\"}},\"i\":0}}]}&#39;>bold template&lt;/i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|&#39;&#39;bold template&#39;&#39;}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
+!! end
+
+!! test
+Image with table with attributes in caption
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|
+{| class="123" |
+|- class="456" |
+| ha
+|}
+]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
+<table class="123">
+<tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
+<td> ha</td></tr>
+</tbody></table>
+</figcaption></figure>
+!! end
+
+!! test
+Image with table with rows from templates in caption
+!! wikitext
+[[File:Foobar.jpg|thumb|
+{|
+{{echo|{{!}} hi}}
+|}
+]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
+<table>
+<tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
+</tbody></table>
+</figcaption></figure>
+!! end
+
+!! test
+Image with nested tables in caption
+!! wikitext
+[[File:Foobar.jpg|thumb|Foo<br />
+{|
+|
+{|
+|z
+|}
+|}
+]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo&lt;br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
+<table>
+<tbody><tr><td>
+<table>
+<tbody><tr><td>z</td></tr>
+</tbody></table></td></tr>
+</tbody></table>
+</figcaption></figure>
+!! end
+
+###################
+# Conflicting image format options.
+# First option specified should 'win'.
+# All three cases in each test should be identical.
+
+!! test
+Image with 'frameless' first.
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frameless|caption]]
+
+[[File:Foobar.jpg|frameless|frame|caption]]
+
+[[File:Foobar.jpg|frameless|thumb|caption]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
+</p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
+</p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
+!! end
+
+!! test
+Image with 'frame' first.
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frame|caption]]
+[[File:Foobar.jpg|frame|frameless|caption]]
+[[File:Foobar.jpg|frame|thumb|caption]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Image with 'thumb' first.
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|caption]]
+[[File:Foobar.jpg|thumb|frameless|caption]]
+[[File:Foobar.jpg|thumb|frame|caption]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+###################
+# Image sizing.
+# See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
+# and https://phabricator.wikimedia.org/T64258
+# Foobar has actual size of 1941x220
+# 1. Thumbs & frameless always reduce, can't be enlarged unless it's
+# a scalable format.
+# 2. Framed images always ignore size options; always render at default size.
+# 3. "Unspecified format" and border are the only types which can be
+# enlarged.
+
+!! test
+Image: unspecified format and border enlarge
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|2000px]]
+
+[[File:Foobar.jpg|border|2000px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" /></a>
+</p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="2000" height="227" class="thumbborder" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
+<p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="227" width="2000"/></a></figure-inline></p>
+!! end
+
+!! test
+Image: "unspecified format" and border reduce
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|1000px]]
+
+[[File:Foobar.jpg|border|1000px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
+</p><p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" width="1000" height="113" class="thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/1500px-Foobar.jpg 1.5x, http://example.com/images/3/3a/Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
+<p><figure-inline class="mw-image-border" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/1000px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="113" width="1000"/></a></figure-inline></p>
+!! end
+
+!! test
+Image: thumbs reduce
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|50px]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:52px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure>
+!! end
+
+!! test
+Image: bitmap thumbs can't be enlarged past original size, but vector can.
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|2000px]]
+
+[[File:Foobar.svg|thumb|2000px]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:2002px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div></div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure>
+!! end
+
+!! test
+Image: frameless can reduce in size
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frameless|50px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" width="50" height="6" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/75px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/100px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
+!! end
+
+!! test
+Image: bitmap frameless can't be enlarged past original size, but vector can
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frameless|2000px]]
+
+[[File:Foobar.svg|frameless|2000px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p><p><a href="/wiki/File:Foobar.svg" class="image"><img alt="Foobar.svg" src="http://example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" width="2000" height="1500" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/3000px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/4000px-Foobar.svg.png 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+<p><figure-inline typeof="mw:Image/Frameless"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/2000px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="1500" width="2000"/></a></figure-inline></p>
+!! end
+
+!! test
+Image: framed images are always unscaled.
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frame]]
+
+[[File:Foobar.jpg|frame|50px]]
+
+[[File:Foobar.jpg|frame|50x50px]]
+
+[[File:Foobar.jpg|frame|2000px]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+<figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+<figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+<figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
+!! end
+
+###################
+
+!! test
+Link to image page- image page normally doesn't exists, hence edit link
+Add test with existing image page
+#<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
+!! wikitext
+[[:Image:test]]
+!! html
+<p><a href="/index.php?title=File:Test&amp;action=edit&amp;redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
+</p>
+!! end
+
+!! test
+T20784 Link to non-existent image page with caption should use caption as link text
+!! wikitext
+[[:Image:test|caption]]
+!! html
+<p><a href="/index.php?title=File:Test&amp;action=edit&amp;redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
+</p>
+!! end
+
+!! test
+Frameless image caption with a free URL
+!! wikitext
+[[File:Foobar.jpg|http://example.com]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"http://example.com"}]}' data-mw='{"caption":"&lt;a rel=\"mw:ExtLink\" href=\"http://example.com\" data-parsoid=&#39;{\"stx\":\"url\",\"dsr\":[18,36,0,0]}&#39;>http://example.com&lt;/a>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Thumbnail image caption with a free URL
+!! options
+thumbsize=220
+!! wikitext
+[[File:Foobar.jpg|thumb|http://example.com]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
+!! end
+
+!! test
+Thumbnail image caption with a free URL and explicit alt
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img alt="Alteration" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
+!! end
+
+!! test
+SVG thumbnails with no language set
+!! options
+!! wikitext
+[[File:Foobar.svg|thumb|caption]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+SVG thumbnails with language de
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.svg|thumb|caption|lang=de]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=File:Foobar.svg&amp;lang=de" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/langde-180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/langde-270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/langde-360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+SVG thumbnails with invalid language code
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.svg" class="image"><img alt="" src="http://example.com/images/thumb/f/ff/Foobar.svg/180px-Foobar.svg.png" width="180" height="135" class="thumbimage" srcset="http://example.com/images/thumb/f/ff/Foobar.svg/270px-Foobar.svg.png 1.5x, http://example.com/images/thumb/f/ff/Foobar.svg/360px-Foobar.svg.png 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.svg" class="internal" title="Enlarge"></a></div>lang=invalid:language:code</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
+!! end
+
+!! test
+T3887: A ISBN with a thumbnail
+!! wikitext
+[[File:Foobar.jpg|thumb|ISBN 1235467890]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
+!! end
+
+!! test
+T3887: A RFC with a thumbnail
+!! wikitext
+[[File:Foobar.jpg|thumb|This is RFC 12354]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink" class="external text">RFC 12354</a></figcaption></figure>
+!! end
+
+!! test
+T3887: A mailto link with a thumbnail
+!! wikitext
+[[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>Please <a rel="mw:ExtLink" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
+!! end
+
+# Pending resolution to T2368
+!! test
+T2648: Frameless image caption with a link
+!! wikitext
+[[File:Foobar.jpg|text with a [[link]] in it]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]] in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,38,2,2]}&#39;>link&lt;/a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+T2648: Frameless image caption with a link (suffix)
+!! wikitext
+[[File:Foobar.jpg|text with a [[link]]foo in it]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[link]]foo in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[30,41,2,5],\"tail\":\"foo\"}&#39;>linkfoo&lt;/a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+T2648: Frameless image caption with an interwiki link
+!! wikitext
+[[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}&#39;>MeatBall:Link&lt;/a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+T2648: Frameless image caption with a piped interwiki link
+!! wikitext
+[[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\" title=\"meatball:Link\" data-parsoid=&#39;{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}&#39;>link&lt;/a> in it"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+T107474: Frameless image caption with <nowiki>
+!! wikitext
+[[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;nowiki>text with a [[MeatBall:Link|link]] in it&lt;/nowiki>"}]}' data-mw='{"caption":"&lt;span typeof=\"mw:Nowiki\" data-parsoid=&#39;{\"dsr\":[18,75,8,9]}&#39;>text with a [[MeatBall:Link|link]] in it&lt;/span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Escape HTML special chars in image alt text
+!! wikitext
+[[File:Foobar.jpg|& < > "]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="&amp; &lt; &gt; &quot;"><img alt="&amp; &lt; &gt; &quot;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&amp; &lt; > \""}]}' data-mw='{"caption":"&amp;amp; &amp;lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Escape HTML special chars in image alt text with LanguageConverter
+!! options
+language=zh
+!! wikitext
+[[File:Foobar.jpg|& < > "]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="&amp; &lt; &gt; &quot;"><img alt="&amp; &lt; &gt; &quot;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&amp; &lt; > \""}]}' data-mw='{"caption":"&amp;amp; &amp;lt; > \""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Entities in file name and attributes
+!! wikitext
+[[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"manualthumb=7%25 solution.gif"},{"ck":"link","ak":"link=7%25 solution"},{"ck":"caption","ak":"[[7%25 solution]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;a rel=\"mw:WikiLink\" href=\"./7%25_solution\" title=\"7% solution\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"./7%25_solution\"},\"sa\":{\"href\":\"7%25 solution\"},\"dsr\":[74,91,2,2]}&#39;>7% solution&lt;/a>"}'><a href="./7%25_solution" data-parsoid='{"a":{"href":"./7%25_solution"},"sa":{"href":"link=7%25 solution"}}'><img resource="./File:7%25_solution.gif" src="./Special:FilePath/7%25_solution.gif" height="220" width="220" data-parsoid='{"a":{"resource":"./File:7%25_solution.gif","height":"220","width":"220"},"sa":{"resource":"File:7%25 solution.gif"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+T2499: Alt text should have &#1234;, not &amp;1234;
+!! wikitext
+[[File:Foobar.jpg|&#9792;]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&amp;#9792;"}]}' data-mw='{"caption":"&lt;span typeof=\"mw:Entity\" data-parsoid=&#39;{\"src\":\"&amp;amp;#9792;\",\"srcContent\":\"♀\",\"dsr\":[18,25,null,null]}&#39;>♀&lt;/span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Broken image caption with link
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
+!! html/php
+<p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a href="/wiki/Main_Page" title="Main Page">this</a> is just an ordinary link.
+</p>
+!! html/parsoid
+<p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">this</a> is just an ordinary link.</p>
+!! end
+
+!! test
+Image caption containing another image
+!! wikitext
+[[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is a caption with another <a href="/wiki/File:Thumb.png" class="image" title="image"><img alt="image" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" /></a> inside it!</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is a caption with another <figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"image"}'><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></figure-inline> inside it!</figcaption></figure>
+!! end
+
+!! test
+Image: caption containing a newline
+!! wikitext
+[[File:Foobar.jpg|This
+*is some text]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"This\n*is some text"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!!end
+
+!!test
+Image: caption containing leading space
+(The leading space should not trigger nowiki escaping in wt2wt mode)
+!! wikitext
+[[File:Foobar.jpg|thumb| bar]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>bar</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> bar</figcaption></figure>
+!!end
+
+# html/php output not have newlines after table, td, th, etc. because
+# Linker::makeThumbLink2() replaces the newlines with spaces since
+# the table is inside a caption.
+# FIXME: Verify if that circa 2004 fix is still required.
+!! test
+Image: caption containing a table
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
+{|
+!Foo!!Bar
+|-
+|Foo1||Bar1
+|}
+and some more text.]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is an example image thumbnail caption with a table <table> <tr> <th>Foo</th> <th>Bar </th></tr> <tr> <td>Foo1</td> <td>Bar1 </td></tr></table> and some more text.</div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This is an example image thumbnail caption with a table
+<table>
+<tbody>
+<tr><th>Foo</th><th>Bar</th></tr>
+<tr>
+<td>Foo1</td>
+<td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
+!! end
+
+!! test
+T5090: External links other than http: in image captions
+!! wikitext
+[[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
+
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has <a rel="mw:ExtLink" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
+!! end
+
+!! test
+Custom class
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:foobar.jpg|a|class=b]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size b" typeof="mw:Image" data-mw='{"caption":"a"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!! end
+
+!! test
+Localized image handling (1).
+!! options
+parsoid=wt2html,wt2wt,html2html
+language=es
+!! wikitext
+[[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
+!! html/php
+<div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Localized image handling (2).
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+language=es
+!! wikitext
+[[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
+!! html/php
+<div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"></a></div>caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./Foo"><img resource="./Archivo:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Localized image handling (3).
+!! options
+language=fa
+parsoid=html2wt
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure>
+!! wikitext
+[[File:Foobar.jpg|بندانگشتی]]
+!! end
+
+!! test
+"border", "frameless" and "class" attributes on an image.
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frameless|border|class=extra|caption]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size mw-image-border extra" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a></figure-inline></p>
+!! end
+
+# Note that 'right' is the default alignment, despite the misspelled 'righ' below
+!! test
+Invalid image attributes (T64500)
+!! options
+thumbsize=220
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|thumb|float|left|caption]]
+
+[[File:Foobar.jpg|thumb|righ|caption]]
+
+[[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
+!! html/php
+<div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+<div class="thumb tleft"><div class="thumbinner" style="width:222px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" width="220" height="25" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/330px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/440px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size mw-halign-left" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! article
+File:Barfoo.jpg
+!! text
+#REDIRECT [[File:Barfoo.jpg]]
+!! endarticle
+
+# FIXME: Parsoid should run this test -- but we'd need to teach the
+# mockAPI about the redirected Barfoo.jpg image.
+!! test
+Redirected image
+!! wikitext
+[[Image:Barfoo.jpg]]
+!! html/php
+<p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
+</p>
+!! end
+
+!! test
+Missing image with uploads disabled
+!! options
+wgEnableUploads=0
+!! wikitext
+[[File:Foobaz.jpg]]
+!! html/php
+<p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Foobaz.jpg"><img resource="./File:Foobaz.jpg" src="./Special:FilePath/Foobaz.jpg" height="220" width="220"/></a></figure-inline></p>
+!! end
+
+# Parsoid-specific testing for images
+# https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
+# Currently imperfect due to a flaw in the Parsoid testrunner
+# Work in progress
+# THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
+# image tests.
+
+!! test
+Parsoid-specific image handling - simple image with size and middle alignment
+!! wikitext
+[[File:Foobar.jpg|middle|50px]]
+!! html/parsoid
+<p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with size, middle alignment,
+non-standard namespace alias
+!! options
+parsoid=wt2wt,wt2html,html2html
+!! wikitext
+[[Image:Foobar.jpg|middle|50px]]
+!! html/parsoid
+<p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with size and middle alignment
+(existing content)
+!! wikitext
+[[File:Foobar.jpg|50px|middle]]
+!! html/parsoid
+<p><figure-inline class="mw-valign-middle" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"middle","ak":"middle"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with size and middle alignment
+and non-standard namespace name
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[Image:Foobar.jpg|50px|middle]]
+!! html/parsoid
+<p><figure-inline class="mw-valign-middle" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
+!! wikitext
+[[File:Foobar.jpg|500x10px|baseline|caption]]
+!! html/parsoid
+<p><figure-inline class="mw-valign-baseline" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"500x10px"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption"}],"size":"500x10"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/89px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="10" width="89" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"10","width":"89"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with border and size spec
+!! wikitext
+[[File:Foobar.jpg|50px|border|caption]]
+!! html/parsoid
+<p><figure-inline class="mw-image-border" typeof="mw:Image" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"width","ak":"50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - thumbnail with halign, valign, and caption
+!! wikitext
+[[File:Foobar.jpg|left|baseline|thumb|caption content]]
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption content</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - thumbnail with halign, valign, and caption
+(existing content)
+!! wikitext
+[[File:Foobar.jpg|thumb|left|baseline|caption content]]
+!! html/parsoid
+<figure class="mw-default-size mw-halign-left mw-valign-baseline" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"left","ak":"left"},{"ck":"baseline","ak":"baseline"},{"ck":"caption","ak":"caption content"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption content</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
+!! wikitext
+[[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
+!! html/parsoid
+<figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - thumbnail with specific size, halign,
+valign, and caption (existing content)
+!! wikitext
+[[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
+!! html/parsoid
+<figure class="mw-halign-right mw-valign-middle" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"50x50px"},{"ck":"right","ak":"right"},{"ck":"middle","ak":"middle"},{"ck":"caption","ak":"caption"}],"size":"50x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="6" width="50" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"6","width":"50"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - framed image with specific size and caption
+(size is ignored)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|frame|500x50px|caption]]
+!! html/parsoid
+<figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
+(size is ignored)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+[[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
+!! html/parsoid
+<figure class="mw-halign-left mw-valign-baseline" typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - frameless image with specific size, border, and caption
+!! wikitext
+[[File:Foobar.jpg|frameless|442x50px|border|caption]]
+!! html/parsoid
+<p><figure-inline class="mw-image-border" typeof="mw:Image/Frameless" data-mw='{"caption":"caption"}' data-parsoid='{"optList":[{"ck":"frameless","ak":"frameless"},{"ck":"width","ak":"442x50px"},{"ck":"border","ak":"border"},{"ck":"caption","ak":"caption"}],"size":"442x50"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/442px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="50" width="442" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"50","width":"442"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - simple image with a formatted caption
+!! wikitext
+[[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"&lt;table>&lt;tr>&lt;td>a&lt;/td>&lt;td>b&lt;/td>&lt;/tr>&lt;tr>&lt;td>c&lt;/td>&lt;/tr>&lt;/table>"}]}' data-mw='{"caption":"&lt;table data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[18,81,7,8]}&#39;>&lt;tbody data-parsoid=&#39;{\"dsr\":[25,73,0,0]}&#39;>&lt;tr data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[25,54,4,5]}&#39;>&lt;td data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[29,39,4,5]}&#39;>a&lt;/td>&lt;td data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[39,49,4,5]}&#39;>b&lt;/td>&lt;/tr>&lt;tr data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[54,73,4,5]}&#39;>&lt;td data-parsoid=&#39;{\"stx\":\"html\",\"dsr\":[58,68,4,5]}&#39;>c&lt;/td>&lt;/tr>&lt;/tbody>&lt;/table>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Parsoid-specific image handling - caption with a template in it
+!! wikitext
+[[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"></a><figcaption>This caption has a <span about="#mwt1" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;transclusion&quot;}},&quot;i&quot;:0}}]}">transclusion</span> in it.</figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - caption with unbalanced tags in it
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+foo
+[[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
+bar
+!! html/parsoid
+<p>foo</p>
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption>This caption has a <center>unbalanced tag in it.</center></figcaption></figure>
+<p>bar</p>
+!! end
+
+!! test
+Parsoid-specific image handling - empty caption (1)
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+[[File:Foobar.jpg|thumb|]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
+!! end
+
+# empty captions don't get serialized unless we're in the "round trip" case
+!! test
+Parsoid-specific image handling - empty caption (2)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb">
+ <a href="./File:Foobar.jpg">
+ <img resource="./File:Foobar.jpg"
+ src="//example.com/images/3/3a/Foobar.jpg"
+ data-file-width="1941" data-file-height="220" data-file-type="bitmap"
+ height="25" width="220"/>
+ </a>
+ <figcaption></figcaption>
+</figure>
+!! wikitext
+[[File:Foobar.jpg|thumb]]
+!! end
+
+!! test
+Parsoid-specific image handling - whitespace caption
+!! wikitext
+[[File:Foobar.jpg|thumb| ]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption> </figcaption></figure>
+!! end
+
+!! test
+Parsoid-specific image handling - lang option
+!! wikitext
+foo
+[[File:Foobar.svg|lang=de|caption]]
+bar
+!! html/parsoid
+<p>foo
+<figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/f/ff/Foobar.svg" lang="de" data-file-width="240" data-file-height="180" data-file-type="drawing" height="180" width="240"/></a></figure-inline>
+bar</p>
+!! end
+
+## Edge case bugs in Parsoid from T93580
+!! test
+T93580: 1. Templated <ref> inside block images
+!! wikitext
+[[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
+
+<references />
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Caption with templated ref: {{echo|&lt;ref>foo&lt;/ref>}}"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>Caption with templated ref: <sup about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;ref>foo&lt;/ref>"}},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup></figcaption></figure>
+
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
+!! end
+
+!! test
+T93580: 2. <ref> inside inline images
+!! wikitext
+[[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
+
+<references />
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: &lt;ref>foo&lt;/ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,78,5,6]}&#39; data-mw=&#39;{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
+!! end
+
+!! test
+T93580: 3. Templated <ref> inside inline images
+!! wikitext
+[[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
+
+<references />
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|&lt;ref>{{echo|foo}}&lt;/ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: &lt;sup about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid=&#39;{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\"}},\"i\":0}}]}&#39;>&lt;a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\">&lt;span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]&lt;/span>&lt;/a>&lt;/sup>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
+!! end
+
+###
+### Subpages
+###
+!! article
+Subpage test/subpage
+!! text
+foo
+!! endarticle
+
+!! test
+Subpage link
+!! options
+subpage title=[[Subpage test]]
+!! wikitext
+[[/subpage]]
+!! html
+<p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
+</p>
+!! end
+
+!! test
+Subpage noslash link
+!! options
+subpage title=[[Subpage test]]
+!! wikitext
+[[/subpage/]]
+!! html
+<p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
+</p>
+!! end
+
+!! article
+Subpage test/1/2/subpage
+!! text
+blah
+!! endarticle
+
+!! test
+Relative subpage noslash link
+!! options
+parsoid=wt2wt,wt2html,html2html
+subpage title=[[Subpage test/1/2/3/4]]
+!! wikitext
+[[../../subpage/]]
+
+[[../../subpage]]
+!! html/php
+<p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
+</p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
+<p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
+!! end
+
+!! test
+Parsoid: dot-slash prefixed wikilinks
+!! wikitext
+[[./foo]]
+
+[[././bar]]
+
+[[././baz/]]
+!! html/php
+<p>[[./foo]]
+</p><p>[[././bar]]
+</p><p>[[././baz/]]
+</p>
+!! html/parsoid
+<p>[[./foo]]
+</p><p>[[././bar]]
+</p><p>[[././baz/]]
+</p>
+!! end
+
+!! test
+Render invalid page names as plain text (T53090)
+!! wikitext
+[[./../foo|bar]]
+[[foo�|bar]]
+[[foo/.|bar]]
+[[foo/..|bar]]
+[[foo~~~bar]]
+[[foo>bar]]
+[[foo[bar]]
+[[.]]
+[[..]]
+[[foo././bar]]
+[[foo[http://example.com]xyz]]
+
+[[{{echo|./../foo}}|bar]]
+[[{{echo|foo/.}}|bar]]
+[[{{echo|foo/..}}|bar]]
+[[{{echo|foo~~~~bar}}]]
+[[{{echo|foo>bar}}]]
+[[{{echo|foo././bar}}]]
+[[{{echo|foo{bar}}]]
+[[{{echo|foo}bar}}]]
+[[{{echo|foo[bar}}]]
+[[{{echo|foo]bar}}]]
+[[{{echo|foo<bar}}]]
+!!html/php
+<p>[[./../foo|bar]]
+[[foo�|bar]]
+[[foo/.|bar]]
+[[foo/..|bar]]
+[[foo~~~bar]]
+[[foo&gt;bar]]
+[[foo[bar]]
+[[.]]
+[[..]]
+[[foo././bar]]
+[[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
+</p><p>[[./../foo|bar]]
+[[foo/.|bar]]
+[[foo/..|bar]]
+[[foo~~~~bar]]
+[[foo&gt;bar]]
+[[foo././bar]]
+[[foo{bar]]
+[[foo}bar]]
+[[foo[bar]]
+[[foo]bar]]
+[[foo&lt;bar]]
+</p>
+!!html/parsoid
+<p>[[./../foo|bar]]
+[[foo�|bar]]
+[[foo/.|bar]]
+[[foo/..|bar]]
+[[foo~~~bar]]
+[[foo>bar]]
+[[foo[bar]]
+[[.]]
+[[..]]
+[[foo././bar]]
+[[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
+
+<p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
+[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo&lt;bar"}},"i":0}}]}'>foo&lt;bar</span>]]</p>
+!!end
+
+!! test
+Disabled subpages
+!! wikitext
+[[/subpage]]
+!! html
+<p><a href="/index.php?title=/subpage&amp;action=edit&amp;redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
+</p>
+!! end
+
+!! test
+T2561: {{/Subpage}}
+!! options
+subpage title=[[Page]]
+!! wikitext
+{{/Subpage}}
+!! html
+<p><a href="/index.php?title=Page/Subpage&amp;action=edit&amp;redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
+</p>
+!! end
+
+###
+### Categories
+###
+!! article
+Category:MediaWiki User's Guide
+!! text
+blah
+!! endarticle
+
+!! test
+Link to category
+!! wikitext
+[[:Category:MediaWiki User's Guide]]
+!! html
+<p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User&#39;s Guide">Category:MediaWiki User's Guide</a>
+</p>
+!! end
+
+!! test
+Simple category
+!! options
+cat
+!! wikitext
+[[Category:MediaWiki User's Guide]]
+!! html/php
+cat=MediaWiki_User's_Guide sort=
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide" data-parsoid='{"stx":"simple","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
+!! end
+
+!! test
+PAGESINCATEGORY invalid title fatal (r33546 fix)
+!! wikitext
+{{PAGESINCATEGORY:<bogus>}}
+!! html
+<p>0
+</p>
+!! end
+
+!! test
+Category with different sort key
+!! options
+cat
+!! wikitext
+[[Category:MediaWiki User's Guide|Foo]]
+!! html/php
+cat=MediaWiki_User's_Guide sort=Foo
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#Foo" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
+!! end
+
+!! test
+Category with identical sort key
+!! options
+cat
+!! wikitext
+[[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
+!! html/php
+cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:MediaWiki_User's_Guide#MediaWiki%20User's%20Guide" data-parsoid='{"stx":"piped","a":{"href":"./Category:MediaWiki_User&#39;s_Guide"},"sa":{"href":"Category:MediaWiki User&#39;s Guide"}}'/>
+!! end
+
+!! test
+Category with empty sort key
+!! options
+cat
+pst
+!! wikitext
+[[Category:MediaWiki User's Guide|]]
+!! html/php
+[[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
+!! end
+
+!! test
+Category with empty sort key and parentheses
+!! options
+cat
+pst
+!! wikitext
+[[Category:Foo (bar)|]]
+!! html/php
+[[Category:Foo (bar)|Foo]]
+!! end
+
+!! test
+Category with link tail
+!! options
+cat
+pst
+!! wikitext
+123[[Category:Foo]]456
+!! html/php
+123[[Category:Foo]]456
+!! end
+
+!! test
+Category with template
+!! options
+cat
+pst
+!! wikitext
+[[Category:{{echo|Foo}}]]
+!! html/php
+[[Category:{{echo|Foo}}]]
+!! end
+
+!! test
+Category with template in sort key
+!! options
+cat
+pst
+!! wikitext
+[[Category:Foo|{{echo|Bar}}]]
+!! html/php
+[[Category:Foo|{{echo|Bar}}]]
+!! end
+
+!! test
+Category with template in sort key and title
+!! options
+cat
+pst
+!! wikitext
+[[Category:{{echo|Foo}}|{{echo|Bar}}]]
+!! html/php
+[[Category:{{echo|Foo}}|{{echo|Bar}}]]
+!! end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+!! test
+Category / paragraph interactions
+!! options
+parsoid=wt2html
+!! wikitext
+Foo [[Category:Baz]] Bar
+
+Foo [[Category:Baz]]
+Bar
+
+Foo
+[[Category:Baz]]
+Bar
+
+Foo
+[[Category:Baz]] Bar
+
+Foo
+[[Category:Baz]]
+ [[Category:Baz]]
+[[Category:Baz]]
+Bar
+
+[[Category:Baz]]
+ [[Category:Baz]]
+[[Category:Baz]]
+
+[[Category:Baz]]
+ {{echo|[[Category:Baz]]}}
+[[Category:Baz]]
+!! html/php
+<p>Foo Bar
+</p><p>Foo
+Bar
+</p><p>Foo
+Bar
+</p><p>Foo Bar
+</p><p>Foo
+Bar
+</p>
+!! html/parsoid
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
+<link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz"/> <link rel="mw:PageProp/Category" href="./Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/>
+<link rel="mw:PageProp/Category" href="./Category:Baz"/>
+!! end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+##
+## The whitespace on the empty line is part of the test. Please do not delete
+!! test
+1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
+!! options
+parsoid=wt2html
+!! wikitext
+This
+
+[[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
+
+{{echo|[[Category:Foo]] and so should this!}}
+!! html/php
+<p>This and this should be part of same paragraph (not an indent-pre) and so should this!
+</p>
+!! html/parsoid
+<p>This
+
+<link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
+
+<link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and so should this!"}},"i":0}}]}'/><span about="#mwt1"> and so should this!</span></p>
+!! end
+
+## Parsoid will not try to wt2wt this while preserving newlines because
+## it suppresses excess newlines within list items -- and we don't want to
+## introduce a special case just for categories, which is, in reality somewhat
+## odd behavior -- categories are unlikely to be used in list items like this
+## in top-level pages and are only likely to show up in template-generated
+## list items where this RT-ing is a non-issue.
+##
+## The whitespace on the empty line is part of the test. Please do not delete
+!! test
+2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
+!! options
+parsoid=wt2html
+!! wikitext
+* This
+
+[[Category:Foo]] and this should be part of the same list item
+* So should this
+
+{{echo|[[Category:Foo]] and this should be part of the same list item}}
+!! html
+<ul><li>This and this should be part of the same list item</li>
+<li>So should this and this should be part of the same list item</li></ul>
+!! html/parsoid
+<ul>
+<li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
+<li>So should this <link rel="mw:PageProp/Category" href="./Category:Foo" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]] and this should be part of the same list item"}},"i":0}}]}'/><span> and this should be part of the same list item</span></li>
+</ul>
+!! end
+
+## Newlines and categories that follow the last item of a list
+## are treated differently because this (list followed by categories)
+## is an extremely common pattern on wikis.
+!! test
+3. Categories and newlines: newline suppression for last list item should RT properly
+!! wikitext
+* a
+* b
+
+[[Category:Foo]]
+
+[[Category:Bar]]
+[[Category:Baz]]
+!! html/parsoid
+<ul><li> a</li>
+<li> b</li></ul>
+
+<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
+
+<link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
+<link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
+!! end
+
+!! test
+4. Categories and newlines: newline suppression for last list item should RT properly
+!! wikitext
+* a
+**** b
+
+[[Category:Foo]]
+!! html/parsoid
+<ul><li> a
+<ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
+
+<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
+!! end
+
+## only wt2html for this to make sure the algo only applies to the rightmost path
+!! test
+5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
+!! options
+parsoid=wt2html
+!! wikitext
+* a
+** b
+[[Category:Foo]]
+* c
+** d
+[[Category:Foo]]
+!! html/parsoid
+<ul><li> a
+<ul><li> b
+<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
+<li> c
+<ul><li> d</li></ul></li></ul>
+<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
+!! end
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+!! test
+6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
+!! options
+parsoid=wt2html
+!! wikitext
+* a [[Category:Foo]]
+!! html/parsoid
+<ul><li>a <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
+!! end
+
+# This test also demonstrates because of newline+category tunneling
+# through the list hander, template wrapping doesn't expand to the
+# containing list when the list item swallows the category.
+!! test
+7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
+!! wikitext
+* {{echo|a
+[[Category:Foo]]}}
+!! html/parsoid
+<ul><li> <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n[[Category:Foo]]"}},"i":0}}]}'>a
+</span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul>
+!! end
+
+!! test
+8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
+!! wikitext
+* a
+
+{{echo|[[Category:Foo]]
+[[Category:Bar]]}}
+[[Category:Baz]]
+!! html/parsoid
+<ul><li> a</li></ul>
+
+<link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Foo]]\n[[Category:Bar]]"}},"i":0}}]}'/><span about="#mwt1">
+</span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
+<link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
+!! end
+
+!! test
+9. Categories and newlines: should behave properly with linkprefix (T87753)
+!! options
+language=ar
+!! wikitext
+foo bar
+foo bar
+[[تصنيف:Foo]]
+[[تصنيف:Bar]]
+!! html/php
+<p>foo bar
+foo bar
+</p>
+!! html/parsoid
+<p>foo bar
+foo bar</p>
+<link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
+<link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
+!! end
+
+!! test
+10. No regressions on internal links following category (T174639)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+[[Category:Foo]]<div>a
+
+[[Foo]]</div>
+!! html/php
+<div>a
+<a href="/wiki/Foo" title="Foo">Foo</a></div>
+
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
+
+<a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
+!! end
+
+# Note that Parsoid differs slightly from PHP due to T175421
+!! test
+11. Special case where only newlines separate links (T175416)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+[[Category:Foo]]
+
+[[Foo]][[es:Alimento]]
+
+[[Foo]]
+!! html/php
+<p><br />
+<a href="/wiki/Foo" title="Foo">Foo</a>
+</p><p><a href="/wiki/Foo" title="Foo">Foo</a>
+</p>
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Foo"/>
+
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
+
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
+!! end
+
+!! test
+Category links with multiple namespaces
+!! wikitext
+[[Category:Project:Foo]]
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
+!! end
+
+!! test
+Parsoid: Serialize link to category page with colon escape
+!! options
+parsoid
+!! wikitext
+
+[[:Category:Foo]]
+[[:Category:Foo|Bar]]
+!! html
+<p>
+<a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
+<a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
+</p>
+!! end
+
+# We used to, but no longer wt2wt this test since the default serializer
+# will normalize all categories to serialize on their own line.
+# This wikitext usage is going to be fairly uncommon in production and
+# selser will take care of preventing whitespace insertion if this
+# occurs in an article.
+#
+# html2html disabled for the same reason (whitespace insertion between
+# x and y).
+#
+# html2wt disabled because it localizes the "Category" namespace.
+!! test
+Link prefix/suffixes aren't applied to category links
+!! options
+parsoid=wt2html
+language=is
+!! wikitext
+x[[Category:Foo]]y
+!! html/php
+<p>xy
+</p>
+!! html/parsoid
+<p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
+!! end
+
+!! test
+Link prefix/suffixes aren't applied to language links
+!! options
+parsoid=wt2html
+language=is
+!! wikitext
+x[[es:Foo]]y
+!! html/php
+<p>xy
+</p>
+!! html/parsoid
+<p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
+!! end
+
+!! test
+Parsoid: Serialize link to file page with colon escape
+!! options
+parsoid
+!! wikitext
+
+[[:File:Foo.png]]
+[[:File:Foo.png|Bar]]
+!! html
+<p>
+<a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
+<a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
+</p>
+!! end
+
+!! test
+Parsoid: Serialize a genuine category link without colon escape
+!! options
+parsoid
+!! wikitext
+[[Category:Foo]]
+[[Category:Foo|Bar]]
+!! html
+<link rel="mw:PageProp/Category" href="./Category:Foo">
+<link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
+!! end
+
+!! test
+Normalize hrefs properly before testing for invalid link targets (T72894)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
+!! wikitext
+[[Category:Toxine bactérienne]]
+!! end
+
+!! test
+Parsoid: Defaultsort
+!! wikitext
+{{DEFAULTSORT:Foo}}
+!! html/parsoid
+<meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
+!! end
+
+# NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
+# But, this is a limitation of our representation and is documented in
+# TemplateHandler.js in processSpecialMagicWord
+!! test
+Parsoid: Defaultsort (template-generated)
+!! wikitext
+{{{{echo|DEFAULTSORT}}:Foo}}
+!! html/parsoid
+<meta property="mw:PageProp/categorydefaultsort" content="Foo" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"src":"{{{{echo|DEFAULTSORT}}:Foo}}","dsr":[0,26,null,null]}' data-mw='{"attribs":[[{"txt":"content"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,22,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"DEFAULTSORT\"}},\"i\":0}}]}&#39;>DEFAULTSORT&lt;/span>:Foo"}]]}'/>
+!! end
+
+###
+### Inter-language links
+###
+!! test
+Interlanguage links
+!! options
+ill
+!! wikitext
+[[es:Alimento]]
+[[fr:Nourriture]]
+[[zh:食品]]
+!! html/php
+es:Alimento fr:Nourriture zh:食品
+!! html/parsoid
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
+<link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
+<link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
+!! end
+
+!! test
+Duplicate interlanguage links (T26502)
+!! options
+ill
+!! wikitext
+[[es:1]]
+[[es:2]]
+[[fr:1]]
+[[fr:2]]
+!! html/php
+es:1 fr:1
+!! html/parsoid
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
+<link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
+<link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
+!! end
+
+###
+### Sections
+###
+!! test
+Basic section headings
+!! wikitext
+==Headline 1==
+Some text
+
+==Headline 2==
+More
+===Smaller headline===
+Blah blah
+!! html
+<h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>Some text
+</p>
+<h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>More
+</p>
+<h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Smaller headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<p>Blah blah
+</p>
+!! end
+
+!! test
+Section headings with TOC
+!! wikitext
+==Headline 1==
+===Subheadline 1===
+=====Skipping a level=====
+======Skipping a level======
+
+==Headline 2==
+Some text
+===Another headline===
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
+<ul>
+<li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
+<ul>
+<li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
+<ul>
+<li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Headline_1">Headline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Subheadline 1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
+<h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Skipping a level">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>Some text
+</p>
+<h3><span class="mw-headline" id="Another_headline">Another headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Another headline">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+
+!! end
+
+!! test
+TOC anchors don't collide
+!! wikitext
+__FORCETOC__
+==Headline 2==
+==Headline==
+==Headline 2==
+==Headline==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Headline_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Headline">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Headline_2_2">Headline 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Headline 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Headline_3">Headline</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Headline">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+# perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
+# Parsoid html2wt direction adds <nowiki> for level 7 and up.
+!! test
+Handling of sections up to level 6 and beyond
+!! options
+parsoid=wt2html
+!! wikitext
+=Level 1 Heading=
+==Level 2 Heading==
+===Level 3 Heading===
+====Level 4 Heading====
+=====Level 5 Heading=====
+======Level 6 Heading======
+=======Level 7 Heading=======
+========Level 8 Heading========
+=========Level 9 Heading=========
+==========Level 10 Heading==========
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
+<ul>
+<li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
+<ul>
+<li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
+<ul>
+<li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
+<ul>
+<li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
+<li class="toclevel-6 tocsection-7"><a href="#.3DLevel_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">=Level 7 Heading=</span></a></li>
+<li class="toclevel-6 tocsection-8"><a href="#.3D.3DLevel_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">==Level 8 Heading==</span></a></li>
+<li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3DLevel_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">===Level 9 Heading===</span></a></li>
+<li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">====Level 10 Heading====</span></a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Level 1 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Level 2 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Level 3 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Level 4 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
+<h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Level 5 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
+<h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Level 6 Heading">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h6><span class="mw-headline" id=".3DLevel_7_Heading.3D">=Level 7 Heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=7" title="Edit section: =Level 7 Heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h6><span class="mw-headline" id=".3D.3DLevel_8_Heading.3D.3D">==Level 8 Heading==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=8" title="Edit section: ==Level 8 Heading==">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h6><span class="mw-headline" id=".3D.3D.3DLevel_9_Heading.3D.3D.3D">===Level 9 Heading===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=9" title="Edit section: ===Level 9 Heading===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h6><span class="mw-headline" id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D">====Level 10 Heading====</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=10" title="Edit section: ====Level 10 Heading====">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+
+!! html/parsoid
+<h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
+<h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
+<h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
+<h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
+<h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
+<h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
+<h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3DLevel_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
+<h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3DLevel_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
+<h6 id="===Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3DLevel_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>===Level 9 Heading===</h6>
+<h6 id="====Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3DLevel_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>====Level 10 Heading====</h6>
+!! end
+
+!! test
+TOC regression (T11764)
+!! wikitext
+==title 1==
+===title 1.1===
+====title 1.1.1====
+===title 1.2===
+==title 2==
+===title 2.1===
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
+<ul>
+<li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
+</ul>
+</li>
+<li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
+<ul>
+<li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
+<h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+
+!! end
+
+!! test
+TOC for heading containing <span id="..."></span> (T96153)
+!! wikitext
+__FORCETOC__
+==<span id="old-anchor"></span>New title==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="New_title"><span id="old-anchor"></span>New title</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: New title">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+TOC with wgMaxTocLevel=3 (T8204)
+!! options
+wgMaxTocLevel=3
+!! wikitext
+==title 1==
+===title 1.1===
+====title 1.1.1====
+===title 1.2===
+==title 2==
+===title 2.1===
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
+<li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
+<ul>
+<li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
+<h3><span class="mw-headline" id="title_1.2">title 1.2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: title 1.2">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="title_2.1">title 2.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: title 2.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+
+!! end
+
+!! test
+TOC with wgMaxTocLevel=3 and two level four headings (T8204)
+!! options
+wgMaxTocLevel=3
+!! wikitext
+==Section 1==
+===Section 1.1===
+====Section 1.1.1====
+====Section 1.1.1.1====
+==Section 2==
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="Section_1.1">Section 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
+<h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Section 1.1.1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h4>
+<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+
+!! test
+Resolving duplicate section names
+!! wikitext
+==Foo bar==
+==Foo bar==
+!! html
+<h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+Resolving duplicate section names with differing case (T12721)
+!! wikitext
+==Foo bar==
+==Foo Bar==
+!! html
+<h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! article
+Template:sections
+!! text
+===Section 1===
+==Section 2==
+!! endarticle
+
+!! test
+Template with sections, __NOTOC__
+!! wikitext
+__NOTOC__
+==Section 0==
+{{sections}}
+==Section 4==
+!! html
+<h2><span class="mw-headline" id="Section_0">Section 0</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 0">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&amp;action=edit&amp;section=T-1" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Template:Sections&amp;action=edit&amp;section=T-2" title="Template:Sections">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+__NOEDITSECTION__ keyword
+!! wikitext
+__NOEDITSECTION__
+==Section 1==
+==Section 2==
+!! html
+<h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
+<h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
+
+!! end
+
+!! test
+Link inside a section heading
+!! wikitext
+==Section with a [[Main Page|link]] in it==
+!! html
+<h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section with a link in it">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+TOC regression (T14077)
+!! wikitext
+__TOC__
+==title 1==
+===title 1.1===
+==title 2==
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="title_1">title 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h3><span class="mw-headline" id="title_1.1">title 1.1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h2><span class="mw-headline" id="title_2">title 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+T3219 URL next to image (good)
+!! wikitext
+http://example.com [[File:Foobar.jpg]]
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!!end
+
+# Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
+!! test
+Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+===
+The line above must have a trailing space!
+=== <!--
+--> <!-- -->
+But just in case it doesn't...
+!! html/php
+<h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<p>The line above must have a trailing space!
+</p>
+<h1><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<p>But just in case it doesn't...
+</p>
+!! html/parsoid
+<h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
+<p>The line above must have a trailing space!</p>
+<h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
+--> <!-- -->
+<p>But just in case it doesn't...</p>
+!! end
+
+!! test
+Header with special characters (T27462)
+!! wikitext
+The tooltips shall not show entities to the user (ie. be double escaped)
+
+==text > text==
+section 1
+
+==text < text==
+section 2
+
+==text & text==
+section 3
+
+==text ' text==
+section 4
+
+==text " text==
+section 5
+!! html/php
+<p>The tooltips shall not show entities to the user (ie. be double escaped)
+</p>
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text &gt; text</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text &lt; text</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text &amp; text</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="text_.3E_text">text &gt; text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: text &gt; text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 1
+</p>
+<h2><span class="mw-headline" id="text_.3C_text">text &lt; text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: text &lt; text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 2
+</p>
+<h2><span class="mw-headline" id="text_.26_text">text &amp; text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: text &amp; text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 3
+</p>
+<h2><span class="mw-headline" id="text_.27_text">text ' text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: text &#039; text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 4
+</p>
+<h2><span class="mw-headline" id="text_.22_text">text " text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: text &quot; text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 5
+</p>
+!! html/parsoid
+<p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
+
+<h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
+<p>section 1</p>
+
+<h2 id="text_&lt;_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text &lt; text</h2>
+<p>section 2</p>
+
+<h2 id="text_&amp;_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text &amp; text</h2>
+<p>section 3</p>
+
+<h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
+<p>section 4</p>
+
+<h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
+<p>section 5</p>
+!! end
+
+!! test
+Header with space, plus and underscore as entity
+!! wikitext
+Id should not contain + for spaces
+
+==Space between Text==
+section 1
+
+==Space-Entity&#32;between&#32;Text==
+section 2
+
+==Plus+between+Text==
+section 3
+
+==Plus-Entity&#43;between&#43;Text==
+section 4
+
+==Underscore_between_Text==
+section 5
+
+==Underscore-Entity&#95;between&#95;Text==
+section 6
+
+[[#Space between Text]]
+[[#Space-Entity&#32;between&#32;Text]]
+[[#Plus+between+Text]]
+[[#Plus-Entity&#43;between&#43;Text]]
+[[#Underscore_between_Text]]
+[[#Underscore-Entity&#95;between&#95;Text]]
+!! html/php
+<p>Id should not contain + for spaces
+</p>
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Space_between_Text"><span class="tocnumber">1</span> <span class="toctext">Space between Text</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#Space-Entity_between_Text"><span class="tocnumber">2</span> <span class="toctext">Space-Entity&#32;between&#32;Text</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#Plus.2Bbetween.2BText"><span class="tocnumber">3</span> <span class="toctext">Plus+between+Text</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#Plus-Entity.2Bbetween.2BText"><span class="tocnumber">4</span> <span class="toctext">Plus-Entity&#43;between&#43;Text</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#Underscore_between_Text"><span class="tocnumber">5</span> <span class="toctext">Underscore_between_Text</span></a></li>
+<li class="toclevel-1 tocsection-6"><a href="#Underscore-Entity_between_Text"><span class="tocnumber">6</span> <span class="toctext">Underscore-Entity&#95;between&#95;Text</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Space_between_Text">Space between Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Space between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 1
+</p>
+<h2><span class="mw-headline" id="Space-Entity_between_Text">Space-Entity&#32;between&#32;Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Space-Entity between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 2
+</p>
+<h2><span class="mw-headline" id="Plus.2Bbetween.2BText">Plus+between+Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Plus+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 3
+</p>
+<h2><span class="mw-headline" id="Plus-Entity.2Bbetween.2BText">Plus-Entity&#43;between&#43;Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Plus-Entity+between+Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 4
+</p>
+<h2><span class="mw-headline" id="Underscore_between_Text">Underscore_between_Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Underscore between Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 5
+</p>
+<h2><span class="mw-headline" id="Underscore-Entity_between_Text">Underscore-Entity&#95;between&#95;Text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Underscore-Entity_between_Text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>section 6
+</p><p><a href="#Space_between_Text">#Space between Text</a>
+<a href="#Space-Entity_between_Text">#Space-Entity&#32;between&#32;Text</a>
+<a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
+<a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity&#43;between&#43;Text</a>
+<a href="#Underscore_between_Text">#Underscore_between_Text</a>
+<a href="#Underscore-Entity_between_Text">#Underscore-Entity&#95;between&#95;Text</a>
+</p>
+!! html/parsoid
+<p>Id should not contain + for spaces</p>
+
+<h2 id="Space_between_Text">Space between Text</h2>
+<p>section 1</p>
+
+<h2 id="Space-Entity_between_Text">Space-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#32;","srcContent":" "}'> </span>between<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#32;","srcContent":" "}'> </span>Text</h2>
+<p>section 2</p>
+
+<h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
+<p>section 3</p>
+
+<h2 id="Plus-Entity+between+Text"><span id="Plus-Entity.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#43;","srcContent":"+"}'>+</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#43;","srcContent":"+"}'>+</span>Text</h2>
+<p>section 4</p>
+
+<h2 id="Underscore_between_Text">Underscore_between_Text</h2>
+<p>section 5</p>
+
+<h2 id="Underscore-Entity_between_Text">Underscore-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#95;","srcContent":"_"}'>_</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&amp;#95;","srcContent":"_"}'>_</span>Text</h2>
+<p>section 6</p>
+
+<p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
+<a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&amp;#32;between&amp;#32;Text"}}'>#Space-Entity between Text</a>
+<a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
+<a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&amp;#43;between&amp;#43;Text"}}'>#Plus-Entity+between+Text</a>
+<a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
+<a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&amp;#95;between&amp;#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
+!! end
+
+# Parsoid html2wt disabled because it adds padding spaces around =
+!! test
+Headers with excess '=' characters
+(Are similar tests necessary beyond the 1st level?)
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+=foo==
+==foo=
+=''italic'' heading==
+==''italic'' heading=
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
+</ul>
+</div>
+
+<h1><span class="mw-headline" id="foo.3D">foo=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: foo=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h1><span class="mw-headline" id=".3Dfoo">=foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: =foo">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: italic heading=">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: =italic heading">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+
+!! html/parsoid
+<h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
+<h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
+<h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
+<h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
+!! end
+
+!! test
+HTML headers vs TOC (T25393)
+(__NOEDITSECTION__ for clearer output, doesn't matter here)
+!! wikitext
+<h1>Header 1</h1>
+==Header 1.1==
+==Header 1.2==
+
+<h1>Header 2
+</h1>
+==Header 2.1==
+==Header 2.2==
+__NOEDITSECTION__
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
+<li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
+<ul>
+<li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
+<li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
+<h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
+<h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
+<h1><span class="mw-headline" id="Header_2">Header 2
+</span></h1>
+<h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
+<h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
+
+!! html/parsoid
+<h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
+<h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
+<h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
+
+<h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
+</h1>
+<h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
+<h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
+<meta property="mw:PageProp/noeditsection"/>
+!! end
+
+!! test
+Single-line or multiline-comments can follow headings
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+==foo==<!---->
+==bar==<!--c1-->
+==baz==<!--
+c2
+c3-->
+!! html/php
+<h2><span class="mw-headline" id="foo">foo</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: foo">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="bar">bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="baz">baz</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: baz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<h2 id="foo">foo</h2><!---->
+<h2 id="bar">bar</h2><!--c1-->
+<h2 id="baz">baz</h2><!--
+c2
+c3-->
+!! end
+
+!! test
+T3219 URL next to image (broken)
+!! wikitext
+http://example.com[[File:Foobar.jpg]]
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure-inline></p>
+!!end
+
+!! test
+T3186 news: in the middle of text
+!! wikitext
+http://en.wikinews.org/wiki/Wikinews:Workplace
+!! html
+<p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
+</p>
+!!end
+
+
+!! test
+Namespaced link must have a title
+!! wikitext
+[[Project:]]
+!! html
+<p>[[Project:]]
+</p>
+!!end
+
+!! test
+Namespaced link must have a title (bad fragment version)
+!! wikitext
+[[Project:#fragment]]
+!! html
+<p>[[Project:#fragment]]
+</p>
+!!end
+
+
+###
+### HTML tags and HTML attributes
+###
+
+!! test
+div with no attributes
+!! wikitext
+<div>HTML rocks</div>
+!! html
+<div>HTML rocks</div>
+
+!! end
+
+!! test
+div with double-quoted attribute
+!! wikitext
+<div id="rock">HTML rocks</div>
+!! html
+<div id="rock">HTML rocks</div>
+
+!! end
+
+!! test
+div with single-quoted attribute
+!! wikitext
+<div id='rock'>HTML rocks</div>
+!! html
+<div id="rock">HTML rocks</div>
+
+!! end
+
+!! test
+div with unquoted attribute
+!! wikitext
+<div id=rock>HTML rocks</div>
+!! html
+<div id="rock">HTML rocks</div>
+
+!! end
+
+!! test
+div with illegal double attributes
+!! wikitext
+<div id="a" id="b">HTML rocks</div>
+!! html
+<div id="b">HTML rocks</div>
+
+!!end
+
+!! test
+div with empty attribute value, space before equals
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div class =>HTML rocks</div>
+!! html/php
+<div class="">HTML rocks</div>
+
+!! html/parsoid
+<div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
+!! end
+
+!! test
+div with multiple empty attribute values
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div id= title=>HTML rocks</div>
+!! html/php
+<div id="title=">HTML rocks</div>
+
+!! html/parsoid
+<div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
+!! end
+
+# FIXME Parsoid doesn't actually match PHP here.
+# Probably we should use the synthetic <foo /> or <indicator>
+# extensions for this test, which are enabled when running parser tests.
+!! test
+Extension tag in attribute value
+!! wikitext
+<span title="<translate>123</translate>">ok</span>
+!! html/php+disabled
+<p>&lt;span title="&lt;translate&gt;123&lt;/translate&gt;"&gt;ok&lt;/span&gt;
+</p>
+!! html/parsoid
+<p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"&lt;translate>123&lt;/translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"&lt;translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid=&apos;{\"dsr\":[13,39,2,2]}&apos; data-mw=&apos;{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}&apos;>123&lt;/translate>"}]]}'>ok</span></p>
+!! end
+
+!! test
+table with multiple empty attribute values
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{| title= id=
+|hi
+|}
+!! html/php
+<table title="id=">
+<tr>
+<td>hi
+</td></tr></table>
+
+!! html/parsoid
+<table title="id=">
+<tbody><tr><td>hi</td></tr>
+</tbody></table>
+!! end
+
+!! test
+div with braces in attribute value
+!! wikitext
+<div title="{}">Foo</div>
+!! html/php
+<div title="&#123;&#125;">Foo</div>
+
+!! html/parsoid
+<div title="{}">Foo</div>
+!! end
+
+!! test
+div with empty attribute value, no space before equals
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div class=>HTML rocks</div>
+!! html/php
+<div class="">HTML rocks</div>
+
+!! html/parsoid
+<div class="">HTML rocks</div>
+!! end
+
+!! test
+HTML multiple attributes correction
+!! wikitext
+<p class="error" class="awesome">Awesome!</p>
+!! html
+<p class="awesome">Awesome!</p>
+
+!!end
+
+!! test
+Table multiple attributes correction
+!! wikitext
+{|
+!+ class="error" class="awesome"|status
+|}
+!! html
+<table>
+<tr>
+<th class="awesome">status
+</th></tr></table>
+
+!!end
+
+!! test
+DIV IN UPPERCASE
+!! wikitext
+<DIV ID="x">HTML ROCKS</DIV>
+!! html
+<div id="x">HTML ROCKS</div>
+
+!!end
+
+!! test
+Non-ASCII pseudo-tags are rendered as text
+!! wikitext
+<khyô>
+!! html
+<p>&lt;khyô&gt;
+</p>
+!! end
+
+!! test
+Pseudo-tag with URL 'name' renders as url link
+!! wikitext
+<http://example.com/>
+!! html
+<p>&lt;<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>&gt;
+</p>
+!! end
+
+!! test
+text with amp in the middle of nowhere
+!! wikitext
+Remember AT&T?
+!! html
+<p>Remember AT&amp;T?
+</p>
+!! end
+
+!! test
+text with character entity: eacute
+!! wikitext
+I always thought &eacute; was a cute letter.
+!! html+tidy
+<p>I always thought &#233; was a cute letter.
+</p>
+!! end
+
+!! test
+text with entity-escaped character entity-like string: eacute
+!! wikitext
+I always thought &amp;eacute; was a cute letter.
+!! html
+<p>I always thought &amp;eacute; was a cute letter.
+</p>
+!! end
+
+!! test
+text with undefined character entity: xacute
+!! wikitext
+I always thought &xacute; was a cute letter.
+!! html
+<p>I always thought &amp;xacute; was a cute letter.
+</p>
+!! end
+
+!! test
+HTML5 tags
+!! wikitext
+<data value="5">five</data>
+<time datetime="2000-01-01T00:00Z">The new millenium started</time>
+<mark>This highlighted text</mark>
+!! html
+<p><data value="5">five</data>
+<time datetime="2000-01-01T00:00Z">The new millenium started</time>
+<mark>This highlighted text</mark>
+</p>
+!! end
+
+!! test
+HTML tag with leading space is parsed as text
+!! wikitext
+< div>foo< /div>
+!! html
+<p>&lt; div&gt;foo&lt; /div&gt;
+</p>
+!! end
+
+## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
+## the HTML5 parsing spec.
+!! test
+Element with broken attribute syntax
+!! options
+parsoid=wt2html
+!! wikitext
+<div style=" style="123">hi</div>
+<div =>ho</div>
+!! html/php
+<div style="123">hi</div>
+<div>ho</div>
+
+!! html/parsoid
+<div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
+<div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
+!! end
+
+###
+### Nesting tests (see T43545, T52604, T53081)
+###
+
+# This test case is fixed in Parsoid by domino 1.0.12. (T52604)
+# Note that html2wt is considerably more difficult if we use <b> in
+# the test case, instead of <small>
+!! test
+Ensure that HTML adoption agency algorithm is properly implemented.
+!! wikitext
+<small>X<small>Y</small>Z</small>
+!! html
+<p><small>X<small>Y</small>Z</small>
+</p>
+!! end
+
+# This was T43545 in the PHP parser.
+!! test
+Nesting of <kbd>
+!! wikitext
+<kbd>X<kbd>Y</kbd>Z</kbd>
+!! html+tidy
+<p><kbd>X<kbd>Y</kbd>Z</kbd>
+</p>
+!! end
+
+# The following cases were T53081 in the PHP parser.
+# Note that there are some other nestable tags (b, i, etc) which are
+# not covered; see T53081 for discussion.
+
+!! test
+Nesting of <em>
+!! wikitext
+<em>X<em>Y</em>Z</em>
+!! html+tidy
+<p><em>X<em>Y</em>Z</em>
+</p>
+!! end
+
+!! test
+Nesting of <strong>
+!! wikitext
+<strong>X<strong>Y</strong>Z</strong>
+!! html+tidy
+<p><strong>X<strong>Y</strong>Z</strong>
+</p>
+!! end
+
+!! test
+Nesting of <q>
+!! wikitext
+<q>X<q>Y</q>Z</q>
+!! html+tidy
+<p><q>X<q>Y</q>Z</q>
+</p>
+!! end
+
+!! test
+Nesting of <ruby>
+!! wikitext
+<ruby>X<ruby>Y</ruby>Z</ruby>
+!! html
+<p><ruby>X<ruby>Y</ruby>Z</ruby>
+</p>
+!! end
+
+!! test
+Nesting of <bdo>
+!! wikitext
+<bdo>X<bdo>Y</bdo>Z</bdo>
+!! html
+<p><bdo>X<bdo>Y</bdo>Z</bdo>
+</p>
+!! end
+
+
+###
+### Media links
+###
+
+!! test
+Media link
+!! wikitext
+[[Media:Foobar.jpg]]
+[[Media:Video.ogv]]
+[[:Media:Video.ogv]]
+!! html/php
+<p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
+<a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
+<a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
+<a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
+<a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv" data-parsoid='{"a":{"namespace":"Media"},"sa":{"namespace":":Media"}}'>Media:Video.ogv</a></p>
+!! end
+
+!! test
+Media link with text
+!! wikitext
+[[Media:Foobar.jpg|A neat file to look at]]
+!! html/php
+<p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
+!! end
+
+# FIXME: this is still bad HTML tag nesting
+# FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
+# Parsoid & Remex fix the p-wrapping since they operate on the DOM.
+!! test
+Media link with nasty text
+!! wikitext
+[[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
+!! html/php
+<a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link&lt;div style="display:none"&gt;" onmouseover="alert(document.cookie)" onfoo="&lt;/div&gt;</a>
+
+!! html/php+tidy
+<p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg"><div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
+!! html/parsoid
+<p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true}'>Safe Link</a></p><div style="display:none" data-parsoid='{"stx":"html"}'><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg" data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'>" onmouseover="alert(document.cookie)" onfoo="</a></div>
+
+!! end
+
+!! test
+Media link to nonexistent file (T3702)
+!! wikitext
+[[Media:No such.jpg]]
+[[Media:No_such file.jpg]]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
+<a href="/index.php?title=Special:Upload&amp;wpDestFile=No_such_file.jpg" class="new" title="No such file.jpg">Media:No_such file.jpg</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:MediaLink" href="./Special:FilePath/No_such.jpg" title="No such.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such.jpg"},"sa":{"fileName":"No such.jpg"}}'>Media:No such.jpg</a>
+<a rel="mw:MediaLink" href="./Special:FilePath/No_such_file.jpg" title="No such file.jpg" typeof="mw:Error" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}' data-parsoid='{"a":{"fileName":"No_such_file.jpg"},"sa":{"fileName":"No_such file.jpg"}}'>Media:No_such file.jpg</a></p>
+!! end
+
+!! test
+Image link to nonexistent file (T3850 - good)
+!! wikitext
+[[File:No_such.jpg]]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:No_such.jpg"><img resource="./File:No_such.jpg" src="./Special:FilePath/No_such.jpg" height="220" width="220"/></a></figure-inline></p>
+!! end
+
+!! test
+:Image link to nonexistent file (T3850 - bad)
+!! wikitext
+[[:Image:No such.jpg]]
+!! html/php
+<p><a href="/index.php?title=File:No_such.jpg&amp;action=edit&amp;redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
+!! end
+
+!! test
+Character reference normalization in link text (T3938)
+!! wikitext
+[[Main Page|this&that]]
+!! html
+<p><a href="/wiki/Main_Page" title="Main Page">this&amp;that</a>
+</p>
+!!end
+
+!! article
+אַ
+!! text
+Test for unicode normalization
+
+The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
+!! endarticle
+
+!! test
+(T21451) Links should refer to the normalized form.
+!! wikitext
+[[&#xFB2E;]]
+[[&#x5d0;&#x5b7;]]
+[[&#x5d0;ַ]]
+[[א&#x5b7;]]
+[[אַ]]
+!! html
+<p><a href="/wiki/%D7%90%D6%B7" title="אַ">&#xfb2e;</a>
+<a href="/wiki/%D7%90%D6%B7" title="אַ">&#x5d0;&#x5b7;</a>
+<a href="/wiki/%D7%90%D6%B7" title="אַ">&#x5d0;ַ</a>
+<a href="/wiki/%D7%90%D6%B7" title="אַ">א&#x5b7;</a>
+<a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
+</p>
+!! end
+
+!! test
+Empty attribute crash test (T4067)
+!! wikitext
+<font color="">foo</font>
+!! html
+<p><font color="">foo</font>
+</p>
+!! end
+
+!! test
+Empty attribute crash test single-quotes (T4067)
+!! wikitext
+<font color=''>foo</font>
+!! html
+<p><font color="">foo</font>
+</p>
+!! end
+
+!! test
+Attribute test: equals, then nothing
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<font color=>foo</font>
+!! html/php
+<p><font color="">foo</font>
+</p>
+!! html/parsoid
+<p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
+!! end
+
+!! test
+Attribute test: unquoted value
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<font color=x>foo</font>
+!! html/php
+<p><font color="x">foo</font>
+</p>
+!! html/parsoid
+<p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
+!! end
+
+!! test
+Attribute test: unquoted but illegal value (hash)
+!! wikitext
+<font color=#x>foo</font>
+!! html
+<p><font color="#x">foo</font>
+</p>
+!! end
+
+# Parsoid does not serialize to empty attribute syntax,
+# so wt2wt and html2wt cases are skipped
+!! test
+Attribute test: no value (T54330)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<font color>foo</font>
+!! html/php
+<p><font color="">foo</font>
+</p>
+!! html/parsoid
+<p><font color="">foo</font></p>
+!! end
+
+!! test
+T4095: link with three closing brackets
+!! wikitext
+[[Main Page]]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
+!! end
+
+!! test
+T4095: link with pipe and three closing brackets
+!! wikitext
+[[Main Page|link]]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">link</a>]
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
+!! end
+
+!! test
+T4095: link with pipe and three closing brackets, version 2
+!! wikitext
+[[Main Page|[http://example.com/]]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
+!! end
+
+
+###
+### Safety
+###
+
+!! article
+Template:Dangerous attribute
+!! text
+" onmouseover="alert(document.cookie)
+!! endarticle
+
+!! article
+Template:Dangerous style attribute
+!! text
+border-size: expression(alert(document.cookie))
+!! endarticle
+
+!! article
+Template:Div style
+!! text
+<div style="float: right; {{{1}}}">Magic div</div>
+!! endarticle
+
+!! test
+T4304: HTML attribute safety (safe template; regression T4309)
+!! wikitext
+<div title="{{test}}"></div>
+!! html/php
+<div title="This is a test template"></div>
+
+!! html/parsoid
+<div title="This is a test template" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"This is a test template"},"sa":{"title":"{{test}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[12,20,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"test\",\"href\":\"./Template:Test\"},\"params\":{},\"i\":0}}]}&#39;>This is a test template&lt;/span>"}]]}'></div>
+!! end
+
+# Parsoid has enough context to handle this case
+!! test
+T4304: HTML attribute safety (dangerous template; 2309)
+!! wikitext
+<div title="{{dangerous attribute}}"></div>
+!! html/php
+<div title=""></div>
+
+!! html/parsoid
+<div title='" onmouseover="alert(document.cookie)' about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"\" onmouseover=\"alert(document.cookie)"},"sa":{"title":"{{dangerous attribute}}"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[12,35,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous attribute\",\"href\":\"./Template:Dangerous_attribute\"},\"params\":{},\"i\":0}}]}&#39;>\" onmouseover=\"alert(document.cookie)&lt;/span>"}]]}'></div>
+!! end
+
+!! test
+T4304: HTML attribute safety (dangerous style template; 2309)
+!! wikitext
+<div style="{{dangerous style attribute}}"></div>
+!! html/php
+<div style="/* insecure input */"></div>
+
+!! html/parsoid
+<div style="/* insecure input */" about="#mwt2" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"{{dangerous style attribute}}"}}' data-mw='{"attribs":[[{"txt":"style"},{"html":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[12,41,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}&#39;>border-size: expression(alert(document.cookie))&lt;/span>"}]]}'></div>
+!! end
+
+!! test
+T4304: HTML attribute safety (safe parameter; 2309)
+!! wikitext
+{{div style|width: 200px}}
+!! html/php
+<div style="float: right; width: 200px">Magic div</div>
+
+!! html/parsoid
+<div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
+!! end
+
+!! test
+T4304: HTML attribute safety (unsafe parameter; 2309)
+!! wikitext
+{{div style|width: expression(alert(document.cookie))}}
+!! html/php
+<div style="/* insecure input */">Magic div</div>
+
+!! html/parsoid
+<div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
+!! end
+
+## Parsoid output here differs; needs investigation.
+!! test
+T4304: HTML attribute safety (unsafe breakout parameter; 2309)
+!! wikitext
+{{div style|"><script>alert(document.cookie)</script>}}
+!! html
+<div style="float: right;">&lt;script&gt;alert(document.cookie)&lt;/script&gt;"&gt;Magic div</div>
+
+!! end
+
+## Parsoid output here differs; needs investigation.
+!! test
+T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
+!! wikitext
+{{div style|" ><script>alert(document.cookie)</script>}}
+!! html
+<div style="float: right;">&lt;script&gt;alert(document.cookie)&lt;/script&gt;"&gt;Magic div</div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (link)
+!! wikitext
+<div title="[[Main Page]]"></div>
+!! html/php
+<div title="&#91;&#91;Main Page&#93;&#93;"></div>
+
+!! html/parsoid
+<div title="[[Main Page]]"></div>
+!! end
+
+!! test
+T4304: HTML attribute safety (italics)
+!! wikitext
+<div title="''foobar''"></div>
+!! html
+<div title="&#39;&#39;foobar&#39;&#39;"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (bold)
+!! wikitext
+<div title="'''foobar'''"></div>
+!! html
+<div title="&#39;&#39;&#39;foobar&#39;&#39;&#39;"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (ISBN)
+!! wikitext
+<div title="ISBN 1234567890"></div>
+!! html
+<div title="&#73;SBN 1234567890"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (RFC)
+!! wikitext
+<div title="RFC 1234"></div>
+!! html
+<div title="&#82;FC 1234"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (PMID)
+!! wikitext
+<div title="PMID 1234567890"></div>
+!! html
+<div title="&#80;MID 1234567890"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (web link)
+!! wikitext
+<div title="http://example.com/"></div>
+!! html
+<div title="http&#58;//example.com/"></div>
+
+!! end
+
+!! test
+T4304: HTML attribute safety (named web link)
+!! wikitext
+<div title="[http://example.com/ link]"></div>
+!! html/php
+<div title="&#91;http&#58;//example.com/ link&#93;"></div>
+
+!! html/parsoid
+<div title="[http://example.com/ link]"></div>
+!! end
+
+!! test
+T5244: HTML attribute safety (extension; safe)
+!! wikitext
+<div style="<nowiki>background:blue</nowiki>"></div>
+!! html/php
+<div style="background:blue"></div>
+
+!! html/parsoid
+<div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"&lt;nowiki>background:blue&lt;/nowiki>"}}'></div>
+!! end
+
+!! test
+T5244: HTML attribute safety (extension; unsafe)
+!! wikitext
+<div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
+!! html/php
+<div style="/* insecure input */"></div>
+
+!! html/parsoid
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"&lt;nowiki>border-left:expression(alert(document.cookie))&lt;/nowiki>"}}'></div>
+!! end
+
+# More MSIE fun discovered by Tom Gilder
+
+!! test
+MSIE CSS safety test: spurious slash
+!! wikitext
+<div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
+!! html/php
+<div style="/* insecure input */">evil</div>
+
+!! html/parsoid
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert(&#39;boo&#39;))"}}'>evil</div>
+!! end
+
+!! test
+MSIE CSS safety test: hex code
+!! wikitext
+<div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
+!! html/php
+<div style="/* insecure input */">evil</div>
+
+!! html/parsoid
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert(&#39;boo&#39;))"}}'>evil</div>
+!! end
+
+!! test
+MSIE CSS safety test: comment in url
+!! wikitext
+<div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
+!! html/php
+<div style="background-image:u rl(javascript:alert(&#39;boo&#39;))">evil</div>
+
+!! html/parsoid
+<div style="background-image:u rl(javascript:alert('boo'))" data-parsoid='{"stx":"html","a":{"style":"background-image:u rl(javascript:alert(&#39;boo&#39;))"},"sa":{"style":"background-image:u/**/rl(javascript:alert(&#39;boo&#39;))"}}'>evil</div>
+!! end
+
+!! test
+MSIE CSS safety test: comment in expression
+!! wikitext
+<div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
+!! html/php
+<div style="background-image:expres sion(alert(&#39;boo4&#39;))">evil4</div>
+
+!! html/parsoid
+<div style="background-image:expres sion(alert('boo4'))" data-parsoid='{"stx":"html","a":{"style":"background-image:expres sion(alert(&#39;boo4&#39;))"},"sa":{"style":"background-image:expres/**/sion(alert(&#39;boo4&#39;))"}}'>evil4</div>
+!! end
+
+!! test
+CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
+!! wikitext
+<p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
+!! html/php
+<p style="/* invalid control char */">A</p>
+
+!! html/parsoid
+<p style="/* invalid control char */" data-parsoid='{"stx":"html","a":{"style":"/* invalid control char */"},"sa":{"style":"font-size: 100px; background-image:url\\b(https://www.google.com/images/srpr/logo6w.png)"}}'>A</p>
+!! end
+
+!! test
+MSIE 6 CSS safety test: Fullwidth (T57332)
+!! wikitext
+<p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
+<div style="top:EXPRESSION(alert())">B</div>
+!! html/php
+<p style="/* insecure input */">A</p>
+<div style="/* insecure input */">B</div>
+
+!! html/parsoid
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>A</p>
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
+!! end
+
+!! test
+MSIE 6 CSS safety test: IPA extensions (T57332)
+!! wikitext
+<div style="background-image:uʀʟ(javascript:alert())">A</div>
+<p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
+!! html/php
+<div style="/* insecure input */">A</div>
+<p style="/* insecure input */">B</p>
+
+!! html/parsoid
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expʀessɪoɴ((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>B</p>
+!! end
+
+!! test
+MSIE 6 CSS safety test: sup/sub script (T57332)
+!! wikitext
+<div style="background-image:url⁽javascript:alert())">A</div>
+<div style="background-image:url₍javascript:alert())">B</div>
+<p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
+!! html/php
+<div style="/* insecure input */">A</div>
+<div style="/* insecure input */">B</div>
+<p style="/* insecure input */">C</p>
+
+!! html/parsoid
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
+<div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>C</p>
+!! end
+
+!! test
+Opera -o-link CSS
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div
+title="&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;"
+style="-o-link:attr(title);-o-link-source:current">X</div>
+!! html/php
+<div title="data:text/html,&lt;img src=1 onerror=alert(1)&gt;" style="/* insecure input */">X</div>
+
+!! html/parsoid
+<div title="data:text/html,&lt;img src=1 onerror=alert(1)>" style="/* insecure input */" data-parsoid='{"stx":"html","a":{"title":"data:text/html,&lt;img src=1 onerror=alert(1)>","style":"/* insecure input */"},"sa":{"title":"&amp;#100;&amp;#97;&amp;#116;&amp;#97;&amp;#58;&amp;#116;&amp;#101;&amp;#120;&amp;#116;&amp;#47;&amp;#104;&amp;#116;&amp;#109;&amp;#108;&amp;#44;&amp;#60;&amp;#105;&amp;#109;&amp;#103;&amp;#32;&amp;#115;&amp;#114;&amp;#99;&amp;#61;&amp;#49;&amp;#32;&amp;#111;&amp;#110;&amp;#101;&amp;#114;&amp;#114;&amp;#111;&amp;#114;&amp;#61;&amp;#97;&amp;#108;&amp;#101;&amp;#114;&amp;#116;&amp;#40;&amp;#49;&amp;#41;&amp;#62;","style":"-o-link:attr(title);-o-link-source:current"}}'>X</div>
+!! end
+
+!! test
+MSIE 6 CSS safety test: Repetition markers (T57332)
+!! wikitext
+<p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
+<p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
+<p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
+<p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
+<p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
+<p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
+<p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
+!! html/php
+<p style="/* insecure input */">A</p>
+<p style="/* insecure input */">B</p>
+<p style="/* insecure input */">C</p>
+<p style="/* insecure input */">D</p>
+<p style="/* insecure input */">E</p>
+<p style="/* insecure input */">F</p>
+<p style="/* insecure input */">G</p>
+
+!! html/parsoid
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expres〱ion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>A</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresゝion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>B</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>C</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresヽion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>D</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹽion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>E</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresﹼion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>F</p>
+<p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expresーion((title=&#39;XSSed&#39;),&#39;red&#39;)"}}'>G</p>
+!! end
+
+!! test
+Table attribute legitimate extension
+!! wikitext
+{|
+!+ style="<nowiki>color:blue</nowiki>"|status
+|}
+!! html
+<table>
+<tr>
+<th style="color:blue">status
+</th></tr></table>
+
+!!end
+
+!! test
+Table attribute safety
+!! wikitext
+{|
+!+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
+|}
+!! html
+<table>
+<tr>
+<th style="/* insecure input */">status
+</th></tr></table>
+
+!! end
+
+!! test
+CSS line continuation 1
+!! wikitext
+<div style="background-image: u\&#10;rl(test.jpg);"></div>
+!! html
+<div style="/* insecure input */"></div>
+
+!! end
+
+!! test
+CSS line continuation 2
+!! wikitext
+<div style="background-image: u\&#13;rl(test.jpg); "></div>
+!! html
+<div style="/* invalid control char */"></div>
+
+!! end
+
+!! article
+Template:Identity
+!! text
+{{{1}}}
+!! endarticle
+
+!! test
+Expansion of multi-line templates in attribute values (T8255)
+!! wikitext
+<div style="background: {{identity|#00FF00}}">-</div>
+!! html
+<div style="background: #00FF00">-</div>
+
+!! end
+
+!! test
+Expansion of multi-line templates in attribute values (T8255 sanity check)
+!! wikitext
+<div style="background:
+#00FF00">-</div>
+!! html/php
+<div style="background: #00FF00">-</div>
+
+!! html/parsoid
+<div style="background:
+#00FF00">-</div>
+!! end
+
+!! test
+Expansion of multi-line templates in attribute values (T8255 sanity check 2)
+!! wikitext
+<div style="background: &#10;#00FF00">-</div>
+!! html
+<div style="background: &#10;#00FF00">-</div>
+
+!! end
+
+!! test
+Tags which are hidden from tidiers cannot pass through the Sanitizer
+!! wikitext
+<mw:toc><script>alert();</script></mw:toc>
+!! html+tidy
+<p>&lt;mw:toc&gt;&lt;script&gt;alert();&lt;/script&gt;&lt;/mw:toc&gt;
+</p>
+!! end
+
+###
+### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
+###
+
+!! test
+Parser hook: empty input
+!! wikitext
+<tag></tag>
+!! html/php
+<pre>
+''
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: empty input using terminated empty elements
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<tag/>
+!! html/php
+<pre>
+NULL
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+!! test
+Parser hook: empty input using terminated empty elements (space before)
+!! wikitext
+<tag />
+!! html/php
+<pre>
+NULL
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+!! test
+Parser hook: basic input
+!! wikitext
+<tag>input</tag>
+!! html/php
+<pre>
+'input'
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: case insensitive
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<TAG>input</TAG>
+!! html/php
+<pre>
+'input'
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: case insensitive, redux
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<TaG>input</TAg>
+!! html/php
+<pre>
+'input'
+array (
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+!! test
+Parser hook: nested tags
+!! wikitext
+<tag><tag></tag></tag>
+!! html/php
+<pre>
+'<tag>'
+array (
+)
+</pre>&lt;/tag&gt;
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"&lt;tag>"}}' data-parsoid='{}' about="#mwt2"></pre>&lt;/tag>
+!! end
+
+!! test
+Parser hook: basic arguments
+!! wikitext
+<tag width="200" height="100" depth="50" square=""></tag>
+!! html/php
+<pre>
+''
+array (
+ 'width' => '200',
+ 'height' => '100',
+ 'depth' => '50',
+ 'square' => '',
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: basic arguments, variations
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<tag width=200 height = "100" depth = '50' square></tag>
+!! html/php
+<pre>
+''
+array (
+ 'width' => '200',
+ 'height' => '100',
+ 'depth' => '50',
+ 'square' => '',
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+!! test
+Parser hook: argument containing a forward slash (T7344)
+!! wikitext
+<tag filename="/tmp/bla"></tag>
+!! html/php
+<pre>
+''
+array (
+ 'filename' => '/tmp/bla',
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: empty input using terminated empty elements (T4374)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<tag foo=bar/>text
+!! html/php
+<pre>
+NULL
+array (
+ 'foo' => 'bar',
+)
+</pre>text
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
+!! end
+
+## </tag> should be output literally since there is no matching tag that begins it
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: basic arguments using terminated empty elements (T4374)
+!! options
+parsoid=wt2html
+!! wikitext
+<tag width=200 height = "100" depth = '50' square/>
+other stuff
+</tag>
+!! html/php
+<pre>
+NULL
+array (
+ 'width' => '200',
+ 'height' => '100',
+ 'depth' => '50',
+ 'square' => '',
+)
+</pre>
+<p>other stuff
+&lt;/tag&gt;
+</p>
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":null}' about="#mwt2"></pre><p>other stuff
+&lt;/tag></p>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: Don't allow unclosed extension tags
+!! options
+parsoid=wt2html
+!! wikitext
+test <tag>123
+
+this is a '''test'''
+!! html/php
+<p>test &lt;tag&gt;123
+</p><p>this is a <b>test</b>
+</p>
+!! html/parsoid
+<p>test &lt;tag>123</p>
+
+<p>this is a <b>test</b></p>
+!! end
+
+!! test
+Parser hook: horizontal rule inside extension tag that outputs <pre>
+!! wikitext
+<tag>
+Hello
+<hr/>
+Goodbye
+</tag>
+!! html/php
+<pre>
+'
+Hello
+<hr/>
+Goodbye
+'
+array (
+)
+</pre>
+
+!! end
+
+###
+### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
+###
+
+!! test
+Parser hook: static parser hook not inside a comment
+!! wikitext
+<statictag>hello, world</statictag>
+
+<statictag action="flush" />
+!! html/php
+<p><br />
+hello, world
+</p>
+!! html/parsoid
+<p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
+<p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
+!! end
+
+!! test
+Parser hook: static parser hook inside a comment
+!! wikitext
+<!-- <statictag>hello, world</statictag> -->
+<statictag action="flush" />
+!! html/php
+<p><br />
+</p>
+!! html/parsoid
+<!-- <statictag&#x3E;hello, world</statictag&#x3E; -->
+<p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
+!! end
+
+# Nested template calls; this case was broken by Parser.php rev 1.506,
+# since reverted.
+
+!! article
+Template:One-parameter
+!! text
+(My parameter is: {{{1}}})
+!! endarticle
+
+!! article
+Template:Map-one-parameter
+!! text
+{{{{{1}}}|{{{2}}}}}
+!! endarticle
+
+!! test
+Nested template calls
+!! wikitext
+{{Map-one-parameter|One-parameter|param}}
+!! html
+<p>(My parameter is: param)
+</p>
+!! end
+
+
+###
+### Sanitizer
+###
+
+# Remex wraps empty tag runs with p-tags.
+# Parsoid strips them out during p-wrapping.
+!! test
+Sanitizer: Closing of open tags
+!! wikitext
+<s></s><table></table>
+!! html/php+tidy
+<p><s></s></p><table></table>
+!! html/parsoid
+<s></s><table></table>
+!! end
+
+!! test
+Sanitizer: Closing of open but not closed tags
+!! wikitext
+<s>foo
+!! html
+<p><s>foo</s>
+</p>
+!! end
+
+!! test
+Sanitizer: Closing of closed but not open tags
+!! options
+parsoid=wt2html
+!! wikitext
+</s>
+!! html/php+tidy
+<p class="mw-empty-elt">
+</p>
+!! html/parsoid
+!! end
+
+!! test
+Sanitizer: Closing of closed but not open table tags
+!! options
+parsoid=wt2html
+!! wikitext
+Table not started</td></tr></table>
+!! html+tidy
+<p>Table not started
+</p>
+!! end
+
+!! test
+Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+<span id="æ: v">byte</span>[[#æ: v|backlink]]
+!! html/php
+<p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
+</p>
+!! html/parsoid
+<p><span id="æ:_v" data-parsoid='{"stx":"html","a":{"id":"æ:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#æ:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#æ:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
+!! end
+
+!! test
+Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+<span id="æ: v">byte</span>[[#æ: v|backlink]]
+!! html/php
+<p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
+</p>
+!! end
+
+# In HTML5, the restrictions are that id must contain at least one character,
+# and must not contain any space characters.
+!! test
+Sanitizer: Validating the contents of the id attribute (T6515)
+!! options
+disabled
+!! wikitext
+<br id="" /><br id="a space" />
+!! html
+Something ...
+!! end
+
+# In HTML5, id must be unique amongst all the ids in the element's home subtree.
+!! test
+Sanitizer: Validating id attribute uniqueness (T6515, T8301)
+!! options
+disabled
+!! wikitext
+<br id="foo" /><br id="foo" />
+!! html
+Something need to be done. foo-2 ?
+!! end
+
+!! test
+Sanitizer: Validating that <meta> and <link> work, but only for Microdata
+!! wikitext
+<div itemscope>
+ <meta itemprop="hello" content="world">
+ <meta http-equiv="refresh" content="5">
+ <meta itemprop="hello" http-equiv="refresh" content="5">
+ <link itemprop="hello" href="{{SERVER}}">
+ <link rel="stylesheet" href="{{SERVER}}">
+ <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
+</div>
+!! html
+<div itemscope="">
+<p> <meta itemprop="hello" content="world" />
+ &lt;meta http-equiv="refresh" content="5"&gt;
+ <meta itemprop="hello" content="5" />
+ <link itemprop="hello" href="http&#58;//example.org" />
+ &lt;link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>"&gt;
+ <link itemprop="hello" href="http&#58;//example.org" />
+</p>
+</div>
+
+!! end
+
+!! test
+Sanitizer: Strip comments from CSS attributes
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+<span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
+!! html/php
+<p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
+</p>
+!! html/parsoid
+<p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
+!! end
+
+!! test
+Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
+!! wikitext
+[[meatball:Soft"Security]]
+!! html/php
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft&quot;Security">meatball:Soft"Security</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink/Interwiki" href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
+!! end
+
+!! test
+Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
+!! wikitext
+[[meatball:Foo<Bar]]
+[[meatball:Foo>Bar]]
+[[meatball:Foo&lt;bar]]
+[[meatball:Foo&gt;bar]]
+!! html/php
+<p>[[meatball:Foo&lt;Bar]]
+[[meatball:Foo&gt;Bar]]
+[[meatball:Foo&lt;bar]]
+[[meatball:Foo&gt;bar]]
+</p>
+!! html/parsoid
+<p>[[meatball:Foo&lt;Bar]]
+[[meatball:Foo>Bar]]
+[[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&amp;lt;","srcContent":"&lt;"}'>&lt;</span>bar]]
+[[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&amp;gt;","srcContent":">"}'>></span>bar]]</p>
+!! end
+
+!! test
+Language converter: output gets cut off unexpectedly (T7757)
+!! options
+language=zh
+!! wikitext
+this bit is safe: }-
+
+but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
+
+then we get cut off here: }-
+
+all additional text is vanished
+!! html/php
+<p>this bit is safe: }-
+</p><p>but if we add a conversion instance: xxx
+</p><p>then we get cut off here: }-
+</p><p>all additional text is vanished
+</p>
+!! html/parsoid
+<p>this bit is safe: }-</p>
+<p>but if we add a conversion instance: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"xxx"},{"l":"zh-tw","t":"yyy"}]}'></span></p>
+<p>then we get cut off here: }-</p>
+<p>all additional text is vanished</p>
+!! end
+
+!! test
+Language converter glossary rules inside attributes (T119158)
+!! options
+language=sr variant=sr-el
+!! wikitext
+-{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
+
+[[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
+!! html/php
+<p>
+</p><p><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="&quot; onload=&quot;alert(1)&quot; data-foo=&quot;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
+
+<p><figure-inline class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Self closed html pairs (T7487)
+!! wikitext
+<center><font id="bug" />Centered text</center>
+<div><font id="bug2" />In div text</div>
+!! html+tidy
+<center><font id="bug"></font>Centered text</center>
+<div><font id="bug2"></font>In div text</div>
+!! end
+
+!! test
+Punctuation: nbsp before exclamation
+!! wikitext
+C'est grave !
+!! html
+<p>C'est grave&#160;!
+</p>
+!! end
+
+!! test
+Punctuation: CSS !important (T13874)
+!! wikitext
+<div style="width:50% !important">important</div>
+!! html
+<div style="width:50% !important">important</div>
+
+!!end
+
+!! test
+Punctuation: CSS ! important (T13874; with space after)
+!! wikitext
+<div style="width:50% ! important">important</div>
+!! html
+<div style="width:50% ! important">important</div>
+
+!!end
+
+!! test
+HTML bullet list, closed tags (T7497)
+!! wikitext
+<ul>
+<li>One</li>
+<li>Two</li>
+</ul>
+!! html/php
+<ul>
+<li>One</li>
+<li>Two</li>
+</ul>
+
+!! html/parsoid
+<ul data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html"}'>One</li>
+<li data-parsoid='{"stx":"html"}'>Two</li>
+</ul>
+
+!! end
+
+!! test
+HTML bullet list, unclosed tags (T7497)
+!! wikitext
+<ul>
+<li>One
+<li>Two
+</ul>
+!! html/php+tidy
+<ul>
+<li>One
+</li><li>Two
+</li></ul>
+!! html/parsoid
+<ul data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
+<li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
+</ul>
+
+!! end
+
+!! test
+HTML ordered list, closed tags (T7497)
+!! wikitext
+<ol>
+<li>One</li>
+<li>Two</li>
+</ol>
+!! html/php
+<ol>
+<li>One</li>
+<li>Two</li>
+</ol>
+
+!! html/parsoid
+<ol data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html"}'>One</li>
+<li data-parsoid='{"stx":"html"}'>Two</li>
+</ol>
+
+!! end
+
+!! test
+HTML ordered list, unclosed tags (T7497)
+!! options
+!! wikitext
+<ol>
+<li>One
+<li>Two
+</ol>
+!! html/php+tidy
+<ol>
+<li>One
+</li><li>Two
+</li></ol>
+!! html/parsoid
+<ol data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
+<li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
+</ol>
+
+!! end
+
+!! test
+HTML nested bullet list, closed tags (T7497)
+!! wikitext
+<ul>
+<li>One</li>
+<li>Two:
+<ul>
+<li>Sub-one</li>
+<li>Sub-two</li>
+</ul>
+</li>
+</ul>
+!! html/php
+<ul>
+<li>One</li>
+<li>Two:
+<ul>
+<li>Sub-one</li>
+<li>Sub-two</li>
+</ul>
+</li>
+</ul>
+
+!! html/parsoid
+<ul data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html"}'>One</li>
+<li data-parsoid='{"stx":"html"}'>Two:
+<ul data-parsoid='{"stx":"html"}'>
+<li data-parsoid='{"stx":"html"}'>Sub-one</li>
+<li data-parsoid='{"stx":"html"}'>Sub-two</li>
+</ul>
+</li>
+</ul>
+!! end
+
+!! test
+HTML nested bullet list, open tags (T7497)
+!! wikitext
+<ul>
+<li>One
+<li>Two:
+<ul>
+<li>Sub-one
+<li>Sub-two
+</ul>
+</ul>
+!! html+tidy
+<ul>
+<li>One
+</li><li>Two:
+<ul>
+<li>Sub-one
+</li><li>Sub-two
+</li></ul>
+</li></ul>
+!! end
+
+!! test
+HTML nested ordered list, closed tags (T7497)
+!! wikitext
+<ol>
+<li>One</li>
+<li>Two:
+<ol>
+<li>Sub-one</li>
+<li>Sub-two</li>
+</ol>
+</li>
+</ol>
+!! html
+<ol>
+<li>One</li>
+<li>Two:
+<ol>
+<li>Sub-one</li>
+<li>Sub-two</li>
+</ol>
+</li>
+</ol>
+
+!! end
+
+!! test
+HTML nested ordered list, open tags (T7497)
+!! wikitext
+<ol>
+<li>One
+<li>Two:
+<ol>
+<li>Sub-one
+<li>Sub-two
+</ol>
+</ol>
+!! html/php
+<ol>
+<li>One
+<li>Two:
+<ol>
+<li>Sub-one
+<li>Sub-two
+</ol>
+</ol>
+
+!! html/parsoid
+<ol>
+<li>One
+</li>
+<li>Two:
+<ol>
+<li>Sub-one
+</li>
+<li>Sub-two
+</li>
+</ol>
+</li>
+</ol>
+
+!! end
+
+!! test
+HTML ordered list item with parameters oddity
+!! wikitext
+<ol><li id="fragment">One</li>
+</ol>
+!! html
+<ol><li id="fragment">One</li>
+</ol>
+
+!! end
+
+# parsoid doesn't explicitly mark autonumbered links, see T55505
+!!test
+T7918: autonumbering
+!! wikitext
+[http://first/] [http://second] [ftp://ftp]
+
+ftp://inlineftp
+
+[mailto:enclosed@mail.tld With target]
+
+[mailto:enclosed@mail.tld]
+
+mailto:inline@mail.tld
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
+</p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
+</p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
+</p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
+</p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
+<p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
+<p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
+<p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
+<p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
+!! end
+
+
+#
+# Security and HTML correctness
+# From Nick Jenkins' fuzz testing
+#
+
+!! test
+Fuzz testing: Parser13
+!! wikitext
+{|
+| http://a|
+!! html
+<table>
+<tr>
+<td>
+</td>
+</tr>
+</table>
+
+!! end
+
+# Note that Parsoid output differs from the PHP parser here: the PHP
+# parser breaks the URL for the magic word, while in Parsoid the URL
+# production takes precedence.
+!! test
+Fuzz testing: Parser14
+!! wikitext
+==onmouseover===
+http://__TOC__
+!! html/php
+<h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
+</ul>
+</div>
+
+
+!! html/php+tidy
+<h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a><span class="mw-editsection-bracket">]</span></span></h2><p>
+http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
+</ul>
+</div>
+!! html/parsoid
+<h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
+<p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
+!! end
+
+!! test
+Fuzz testing: Parser14-table
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+==a==
+{| STYLE=__TOC__
+!! html
+<h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<table style="&#95;_TOC&#95;_">
+<tr><td></td></tr>
+</table>
+
+!! html+tidy
+<h2><span class="mw-headline" id="a">a</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: a">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<table style="__TOC__">
+<tr>
+<td></td>
+</tr>
+</table>
+!! html/parsoid
+<h2 id="a">a</h2>
+<table style="__TOC__"></table>
+!! end
+
+# Known to produce bogus xml (extra </td>)
+# Don't add the html/php section since it generates broken HTML
+!! test
+Fuzz testing: Parser16
+!! wikitext
+{|
+!https://||||||
+!! html+tidy
+<table>
+<tbody><tr>
+<th>https://</th>
+<th></th>
+<th></th>
+<th>
+
+</th></tr>
+</tbody></table>
+!! end
+
+!! test
+Fuzz testing: Parser21
+!! wikitext
+{|
+!irc://{{ftp://a" onmouseover="alert('hello world');"
+|
+!! html
+<table>
+<tr>
+<th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
+</th>
+<td>
+</td>
+</tr>
+</table>
+
+!! end
+
+!! test
+Fuzz testing: Parser22
+!! wikitext
+http://===r:::https://b
+
+{|
+!! html
+<p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
+</p>
+<table>
+<tr><td></td></tr>
+</table>
+
+!! end
+
+# Known to produce bad XML for now
+!! test
+Fuzz testing: Parser24
+!! options
+parsoid=wt2html
+!! wikitext
+{|
+{{{|
+<u CLASS=
+| {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
+<br style="onmouseover='alert(document.cookie);' " />
+
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
+|
+!! html/php
+<table>
+{{{|
+<u class="&#124;">}}}} &gt;
+<br style="onmouseover=&#39;alert(document.cookie);&#39;" />
+
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
+<tr>
+<td></u>
+</td>
+</tr>
+</table>
+
+!! html/parsoid
+<p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
+<u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true}'><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"&lt;noinclude>"}'/>}}}} >
+<br style="onmouseover='alert(document.cookie);' " data-parsoid='{"stx":"html","selfClose":true}'/></u></p><p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><u class="|" data-parsoid='{"stx":"html","a":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":null},"sa":{"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--":""},"autoInsertedEnd":true,"autoInsertedStart":true}'>MOVE YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table data-parsoid='{"autoInsertedEnd":true}'>
+
+
+
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
+!! end
+
+# Note: the current result listed for this is not what the original one was,
+# but the original bug was JavaScript injection, which is fixed in any case.
+# It's not clear that the original result listed was any more correct than the
+# current one. Original result:
+# <p>{{{|
+# </p>
+# <li class="&#124;&#124;">
+# }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
+!!test
+Fuzz testing: Parser25 (T8055)
+!! wikitext
+{{{
+|
+<LI CLASS=||
+ >
+}}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
+!! html/php
+<p>&lt;LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
+</p>
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Param" data-parsoid='{"pi":[[{"k":"1"},{"k":"2"},{"k":"3"}]]}' data-mw='{"parts":[{"templatearg":{"target":{"wt":"\n"},"params":{"1":{"wt":" \n&lt;LI CLASS="},"2":{"wt":""},"3":{"wt":"\n >\n"}},"i":0}},"blah\" onmouseover=\"alert(&#39;hello world&#39;);\" align=\"left\"&#39;&#39;&#39;MOVE MOUSE CURSOR OVER HERE"]}'>
+</span><p about="#mwt1">&lt;LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
+!! end
+
+!!test
+Fuzz testing: URL adjacent extension (with space, clean)
+!! wikitext
+http://example.com <nowiki>junk</nowiki>
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
+!! end
+
+!!test
+Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
+!! wikitext
+http://example.com<nowiki>junk</nowiki>
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
+!! end
+
+!! test
+Fuzz testing: URL adjacent extension (no space, dirty; pre)
+!! wikitext
+http://example.com<pre>junk</pre>
+!! html/php
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
+
+!! html/php+tidy
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a></p><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"junk"}}'>junk</pre>
+!! end
+
+!! test
+Fuzz testing: image with bogus manual thumbnail
+!! wikitext
+[[Image:foobar.jpg|thumbnail= ]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Error mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"manualthumb","ak":"thumbnail= "}]}' data-mw='{"errors":[{"key":"apierror-invalidtitle","message":"Invalid thumbnail title.","params":{"name":""}}],"thumb":""}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"Image:foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="./Special:FilePath/Foobar.jpg" height="220" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"220"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
+!! end
+
+# Parsoid will emit the newline literally in wt2wt; see next test case.
+!! test
+Fuzz testing: encoded newline in generated HTML replacements (T8577)
+!! options
+parsoid=wt2html
+!! wikitext
+<pre dir="&#10;"></pre>
+!! html/php
+<pre dir="&#10;"></pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" dir="
+" data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
+!! end
+
+!! test
+Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" dir="
+" data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
+!! wikitext
+<pre dir="
+"></pre>
+!! html/php
+<pre dir=""></pre>
+
+!! end
+
+!! test
+Templates in extension attributes are not expanded
+!! wikitext
+<pre dir="{{echo|ltr}}"></pre>
+!! html/php
+<pre dir="{{echo|ltr}}"></pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
+!! end
+
+!! test
+Parsing optional HTML elements (T8171)
+!! options
+!! wikitext
+<table>
+ <tr>
+ <td> Some tabular data</td>
+ <td> More tabular data ...
+ <td> And yet som tabular data</td>
+ </tr>
+</table>
+!! html
+<table>
+ <tr>
+ <td> Some tabular data</td>
+ <td> More tabular data ...
+ </td><td> And yet som tabular data</td>
+ </tr>
+</table>
+
+!! end
+
+!! test
+Correct handling of <td>, <tr> (T8171)
+!! options
+!! wikitext
+<table>
+ <tr>
+ <td> Some tabular data</td>
+ <td> More tabular data ...</td>
+ <td> And yet som tabular data</td>
+ </tr>
+</table>
+!! html
+<table>
+ <tr>
+ <td> Some tabular data</td>
+ <td> More tabular data ...</td>
+ <td> And yet som tabular data</td>
+ </tr>
+</table>
+
+!! end
+
+
+!! test
+Parsing crashing regression (fr:JavaScript)
+!! wikitext
+</body></x>
+!! html
+<p>&lt;/body&gt;&lt;/x&gt;
+</p>
+!! end
+
+!! test
+Inline wiki vs wiki block nesting
+!! wikitext
+'''Bold paragraph
+
+New wiki paragraph
+!! html
+<p><b>Bold paragraph</b>
+</p><p>New wiki paragraph
+</p>
+!! end
+
+# FIXME: The current php output is documented
+# and desired output is the parsoid target.
+!! test
+Inline HTML vs wiki block nesting
+!! wikitext
+<b>Bold paragraph
+
+New wiki paragraph
+!! html/php
+<p><b>Bold paragraph
+</p><p>New wiki paragraph</b>
+</p>
+!! html/parsoid
+<p><b>Bold paragraph</b>
+</p><p>New wiki paragraph
+</p>
+!! end
+
+# Original result was this:
+# <p><b>bold</b><b>bold<i>bolditalics</i></b>
+# </p>
+# While that might be marginally more intuitive, maybe, the six-apostrophe
+# construct is clearly pathological and the result stated here (which is what
+# the parser actually does) is about as reasonable as anything.
+!!test
+Mixing markup for italics and bold
+!! options
+!! wikitext
+'''bold''''''bold''bolditalics'''''
+!! html
+<p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
+</p>
+!! end
+
+
+!! article
+Xyzzyx
+!! text
+Article for special page transclusion test
+!! endarticle
+
+!! test
+Special page transclusion
+!! options
+!! wikitext
+{{Special:Prefixindex/Xyzzyx}}
+!! html
+<ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
+</ul>
+
+!! end
+
+!! test
+Special page transclusion twice (T7021)
+!! options
+!! wikitext
+{{Special:Prefixindex/Xyzzyx}}
+{{Special:Prefixindex/Xyzzyx}}
+!! html
+<ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
+</ul>
+<ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
+</ul>
+
+!! end
+
+!! test
+Transclusion of default MediaWiki message
+!! wikitext
+{{MediaWiki:Mainpage}}
+!! html
+<p>Main Page
+</p>
+!! end
+
+!! test
+Transclusion of nonexistent MediaWiki message
+!! wikitext
+{{MediaWiki:Mainpagexxx}}
+!! html
+<p><a href="/index.php?title=MediaWiki:Mainpagexxx&amp;action=edit&amp;redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
+</p>
+!! end
+
+!! test
+Transclusion of MediaWiki message with underscore
+!! wikitext
+{{MediaWiki:history_short}}
+!! html
+<p>History
+</p>
+!! end
+
+!! test
+Transclusion of MediaWiki message with space
+!! wikitext
+{{MediaWiki:history short}}
+!! html
+<p>History
+</p>
+!! end
+
+!! test
+Invalid header with following text
+!! wikitext
+= x = y
+!! html
+<p>= x = y
+</p>
+!! end
+
+
+!! test
+Section extraction test (section 0)
+!! options
+section=0
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+!! end
+
+!! test
+Section extraction test (section 1)
+!! options
+section=1
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+==a==
+===aa===
+====aaa====
+!! end
+
+!! test
+Section extraction test (section 2)
+!! options
+section=2
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+===aa===
+====aaa====
+!! end
+
+!! test
+Section extraction test (section 3)
+!! options
+section=3
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+====aaa====
+!! end
+
+!! test
+Section extraction test (section 4)
+!! options
+section=4
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+!! end
+
+!! test
+Section extraction test (section 5)
+!! options
+section=5
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+===ba===
+!! end
+
+!! test
+Section extraction test (section 6)
+!! options
+section=6
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+===bb===
+====bba====
+!! end
+
+!! test
+Section extraction test (section 7)
+!! options
+section=7
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+====bba====
+!! end
+
+!! test
+Section extraction test (section 8)
+!! options
+section=8
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+===bc===
+!! end
+
+!! test
+Section extraction test (section 9)
+!! options
+section=9
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+==c==
+===ca===
+!! end
+
+!! test
+Section extraction test (section 10)
+!! options
+section=10
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+===ca===
+!! end
+
+!! test
+Section extraction test (nonexistent section 11)
+!! options
+section=11
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+!! end
+
+!! test
+Section extraction test with bogus heading (section 1)
+!! options
+section=1
+!! wikitext
+==a==
+==bogus== not a legal section
+==b==
+!! html/php
+==a==
+==bogus== not a legal section
+!! end
+
+!! test
+Section extraction test with bogus heading (section 2)
+!! options
+section=2
+!! wikitext
+==a==
+==bogus== not a legal section
+==b==
+!! html/php
+==b==
+!! end
+
+!! test
+Section extraction test with comment after heading (section 1)
+!! options
+section=1
+!! wikitext
+==a==
+==b== <!-- -->
+==c==
+!! html/php
+==a==
+!! end
+
+!! test
+Section extraction test with comment after heading (section 2)
+!! options
+section=2
+!! wikitext
+==a==
+==b== <!-- -->
+==c==
+!! html/php
+==b== <!-- -->
+!! end
+
+!! test
+Section extraction test with bogus <nowiki> heading (section 1)
+!! options
+section=1
+!! wikitext
+==a==
+==bogus== <nowiki>not a legal section</nowiki>
+==b==
+!! html/php
+==a==
+==bogus== <nowiki>not a legal section</nowiki>
+!! end
+
+!! test
+Section extraction test with bogus <nowiki> heading (section 2)
+!! options
+section=2
+!! wikitext
+==a==
+==bogus== <nowiki>not a legal section</nowiki>
+==b==
+!! html/php
+==b==
+!! end
+
+# Formerly testing for T4587, now resolved by the use of unmarked sections
+# instead of respecting commented sections
+!! test
+Section extraction prefixed by comment (section 1)
+!! options
+section=1
+!! wikitext
+<!-- -->==sec1==
+==sec2==
+!! html/php
+==sec2==
+!!end
+
+!! test
+Section extraction prefixed by comment (section 2)
+!! options
+section=2
+!! wikitext
+<!-- -->==sec1==
+==sec2==
+!! html/php
+
+!!end
+
+# Formerly testing for T4607, now resolved by the use of unmarked sections
+# instead of respecting HTML-style headings
+!! test
+Section extraction, mixed wiki and html (section 1)
+!! options
+section=1
+!! wikitext
+<h2>unmarked</h2>
+unmarked
+==1==
+one
+==2==
+two
+!! html/php
+==1==
+one
+!! end
+
+!! test
+Section extraction, mixed wiki and html (section 2)
+!! options
+section=2
+!! wikitext
+<h2>unmarked</h2>
+unmarked
+==1==
+one
+==2==
+two
+!! html/php
+==2==
+two
+!! end
+
+
+# Formerly testing for T5342
+!! test
+Section extraction, heading surrounded by <noinclude>
+!! options
+section=1
+!! wikitext
+<noinclude>==unmarked==</noinclude>
+==marked==
+!! html/php
+==marked==
+!!end
+
+# Test behavior of T21910
+!! test
+Sectiion with all-equals
+!! options
+section=2
+!! wikitext
+===
+The line above must have a trailing space
+=== <!--
+--> <!-- -->
+But just in case it doesn't...
+!! html/php
+=== <!--
+--> <!-- -->
+But just in case it doesn't...
+!! end
+
+!! test
+Section replacement test (section 0)
+!! options
+replace=0,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+xxx
+
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 1)
+!! options
+replace=1,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+xxx
+
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 2)
+!! options
+replace=2,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+xxx
+
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 3)
+!! options
+replace=3,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+xxx
+
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 4)
+!! options
+replace=4,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+xxx
+
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 5)
+!! options
+replace=5,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+xxx
+
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 6)
+!! options
+replace=6,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+xxx
+
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 7)
+!! options
+replace=7,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+xxx
+
+===bc===
+==c==
+===ca===
+!! end
+
+!! test
+Section replacement test (section 8)
+!! options
+replace=8,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+xxx
+
+==c==
+===ca===
+!!end
+
+!! test
+Section replacement test (section 9)
+!! options
+replace=9,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+xxx
+!! end
+
+!! test
+Section replacement test (section 10)
+!! options
+replace=10,"xxx"
+!! wikitext
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+===ca===
+!! html/php
+start
+==a==
+===aa===
+====aaa====
+==b==
+===ba===
+===bb===
+====bba====
+===bc===
+==c==
+xxx
+!! end
+
+!! test
+Section replacement test with initial whitespace (T15728)
+!! options
+replace=2,"xxx"
+!! wikitext
+ Preformatted initial line
+==a==
+===a===
+!! html/php
+ Preformatted initial line
+==a==
+xxx
+!! end
+
+
+!! test
+Section extraction, heading followed by pre with 20 spaces (T8398)
+!! options
+section=1
+!! wikitext
+==a==
+ a
+!! html/php
+==a==
+ a
+!! end
+
+!! test
+Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
+!! options
+section=1
+!! wikitext
+==a==
+ a
+!! html/php
+==a==
+ a
+!! end
+
+
+!! test
+Section extraction, <pre> around bogus header (T12309)
+!! options
+section=2
+!! wikitext
+== Section One ==
+<pre>
+=======
+</pre>
+
+== Section Two ==
+stuff
+!! html/php
+== Section Two ==
+stuff
+!! end
+
+!! test
+Section replacement, <pre> around bogus header (T12309)
+!! options
+replace=2,"xxx"
+!! wikitext
+== Section One ==
+<pre>
+=======
+</pre>
+
+== Section Two ==
+stuff
+!! html/php
+== Section One ==
+<pre>
+=======
+</pre>
+
+xxx
+!! end
+
+!! test
+Handling of &#x0A; in URLs
+!! wikitext
+*irc://&#x0A;a
+!! html/php
+<ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
+
+!! html/parsoid
+<ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&amp;#x0A;a"}}'>irc://%0Aa</a></li></ul>
+!! end
+
+!! test
+Handling of %0A in URLs
+!! wikitext
+*irc://%0Aa
+!! html/php
+<ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
+
+!! html/parsoid
+<ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
+!! end
+
+# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
+!! test
+5 quotes, code coverage +1 line
+!! options
+parsoid=wt2html
+!! wikitext
+'''''
+!! html/php
+!! html/parsoid
+<b><i></i></b>
+!! end
+
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+# note that wt2html and html2html will put the <i> before the <b>
+!! test
+5 quotes, code coverage +1 line w/ nowiki (1)
+!! options
+parsoid=wt2wt,html2wt
+!! wikitext
+'''''<nowiki/>'''''
+!! html/php
+<p><i></i>
+</p>
+!! html/parsoid
+<p><b><i></i></b></p>
+!! end
+
+# same as previous, just swapping the <i> and <b>
+!! test
+5 quotes, code coverage +1 line w/ nowiki (2)
+!! wikitext
+'''''<nowiki/>'''''
+!! html/php
+<p><i></i>
+</p>
+!! html/parsoid
+<p><i><b></b></i></p>
+!! end
+
+!! test
+Special:Search page linking.
+!! wikitext
+{{Special:search}}
+!! html
+<p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
+</p>
+!! end
+
+!! test
+{{!}} is a magic word
+!! wikitext
+{{!}} is a magic word there and {{!}} is still a magic word here
+| is not a magic word here but {{!}} is still a magic word here
+!! html/php
+<p>| is a magic word there and | is still a magic word here
+| is not a magic word here but | is still a magic word here
+</p>
+!! html/parsoid
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
+| is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","function":"!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
+!! end
+
+!! test
+Say the magic word
+!! options
+title=[[Parser test]]
+!! wikitext
+*{{PAGENAME}}
+*{{PAGENAMEE}}
+*{{FULLPAGENAME}}
+*{{FULLPAGENAMEE}}
+*{{BASEPAGENAME}}
+*{{BASEPAGENAMEE}}
+*{{SUBPAGENAME}}
+*{{SUBPAGENAMEE}}
+*{{ROOTPAGENAME}}
+*{{ROOTPAGENAMEE}}
+*{{TALKPAGENAME}}
+*{{TALKPAGENAMEE}}
+*{{SUBJECTPAGENAME}}
+*{{SUBJECTPAGENAMEE}}
+*{{NAMESPACEE}}
+*{{NAMESPACE}}
+*{{NAMESPACENUMBER}}
+*{{TALKSPACE}}
+*{{TALKSPACEE}}
+*{{SUBJECTSPACE}}
+*{{SUBJECTSPACEE}}
+*{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
+!! html
+<ul><li>Parser test</li>
+<li>Parser_test</li>
+<li>Parser test</li>
+<li>Parser_test</li>
+<li>Parser test</li>
+<li>Parser_test</li>
+<li>Parser test</li>
+<li>Parser_test</li>
+<li>Parser test</li>
+<li>Parser_test</li>
+<li>Talk:Parser test</li>
+<li>Talk:Parser_test</li>
+<li>Parser test</li>
+<li>Parser_test</li>
+<li></li>
+<li></li>
+<li>0</li>
+<li>Talk</li>
+<li>Talk</li>
+<li></li>
+<li></li>
+<li><a href="/index.php?title=Template:Dynamic&amp;action=edit&amp;redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a></li></ul>
+
+!! end
+### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
+
+!! test
+Gallery with valid attributes
+!! wikitext
+<gallery type="123" summary="345">
+File:File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional" type="123">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" type="123" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"type":"123","summary":"345"},"body":{"extsrc":"\nFile:File:Foobar.jpg\n"}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:File:Foobar.jpg"><img resource="./File:File:Foobar.jpg" src="./Special:FilePath/File:Foobar.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+## Parsoid thinks the "centre" here is a property, not a caption.
+!! test
+Gallery
+!! options
+parsoid={
+ "modes": ["wt2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+image1.png |
+image2.gif|||||
+
+image3|
+image4 |300px| centre
+ image5.svg| http://///////
+[[x|xx]]]]
+* image6
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Image1.png</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Image2.gif</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Image3</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Image4</div>
+ <div class="gallerytext">
+<pre>centre
+</pre>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Image5.svg</div>
+ <div class="gallerytext">
+<p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">* image6</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image1.png"><img resource="./File:Image1.png" src="./Special:FilePath/Image1.png" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image2.gif"><img resource="./File:Image2.gif" src="./Special:FilePath/Image2.gif" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image5.svg"><img resource="./File:Image5.svg" src="./Special:FilePath/Image5.svg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" class="external free" href="http://///////">http://///////</a></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery (with options, html)
+!! options
+parsoid={
+ "modes": ["wt2html", "html2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
+File:Nonexistent.jpg|caption
+File:Nonexistent.jpg
+image:foobar.jpg|some '''caption''' [[Main Page]]
+image:foobar.jpg
+image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
+ <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+<p>caption
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>blabla.
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2"},"body":{}}'>
+<li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
+</ul>
+!! end
+
+!! test
+Gallery (with options, extsrc)
+!! options
+parsoid={
+ "nativeGallery": false
+}
+!! wikitext
+<gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
+File:Nonexistent.jpg|caption
+File:Nonexistent.jpg
+image:foobar.jpg|some '''caption''' [[Main Page]]
+image:foobar.jpg
+image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
+ <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+<p>caption
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>blabla.
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" style="max-width: 226px; _width: 226px;" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"widths":"70px","heights":"40px","perrow":"2","caption":"Foo [[Main Page]]"},"body":{"extsrc":"\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some &#39;&#39;&#39;caption&#39;&#39;&#39; [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.\n"}}'>
+<li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="40" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="This is a foo-bar." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext">blabla.</div></li>
+</ul>
+!! end
+
+!! test
+Gallery (without px units)
+!! wikitext
+<gallery widths="70" heights="40">
+File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 105px"><div style="width: 105px">
+ <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/105px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/140px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
+<li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="8" width="70"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery (with invalid units)
+!! wikitext
+<gallery widths="70em" heights="40em">
+File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery with link that has fragment
+!! options
+parsoid={
+ "modes": ["wt2html", "html2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+image:foobar.jpg|link=Main_Page
+image:foobar.jpg|link=Main_Page#section
+image:foobar.jpg|link=Main Page#section|caption
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Main_Page#section"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>caption
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Main_Page#section"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
+</ul>
+!! end
+
+## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
+!! test
+Gallery with template inside caption
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery caption="{{echo|hi}}">
+File:Foobar.jpg|{{echo|ho}}
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class='gallerycaption'>{{echo|hi}}</li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>ho
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerycaption"><span about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><span about="#mwt5" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"ho"}},"i":0}}]}'>ho</span></div></li>
+</ul>
+!! end
+
+!! test
+Gallery with wikitext inside caption
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
+File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>This is a test template
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image" data-mw='{"caption":"desc"}'><a href="./File:Foobar.jpg"><img alt="inneralt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"param"}},"i":0}}]}'>This is a test template</span></div></li>
+</ul>
+!! end
+
+!! test
+Gallery (with showfilename option)
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery showfilename="">
+File:Nonexistent.jpg|caption
+File:Nonexistent.jpg
+File:Foobar.jpg|some '''caption''' [[Main Page]]
+File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
+caption
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
+some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a>some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
+</ul>
+!! end
+
+## Should Parsoid be preserving these variations? See T151367
+!! test
+Gallery (with namespace-less filenames)
+!! options
+parsoid={
+ "modes": ["wt2html", "html2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Nonexistent.jpg
+Nonexistent.jpg
+image:foobar.jpg
+foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Nonexistent.jpg"><img resource="./File:Nonexistent.jpg" src="./Special:FilePath/Nonexistent.jpg" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery override link with wikilink (T36852)
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Foobar.jpg|alt=galleryalt|link=Wikilink
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery override link with absolute external link (T36852)
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery override link with absolute external link with LanguageConverter
+!! options
+language=zh
+!! wikitext
+<gallery>
+File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>caption
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="http://www.example.org"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">caption</div></li>
+</ul>
+!! end
+
+!! test
+Gallery override link with malicious javascript (T36852)
+!! options
+parsoid={
+ "modes": ["wt2html", "html2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./%22_onclick=%22alert('malicious_javascript_code!');"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+# Note that parsoid uses the invalid link as a caption, PHP does not.
+!! test
+Gallery with invalid title as link (T45964)
+!! options
+parsoid={
+ "modes": ["wt2html", "html2html"],
+ "nativeGallery": true
+}
+!! wikitext
+<gallery>
+File:Foobar.jpg|link=<
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext">link=&lt;</div></li>
+</ul>
+!! end
+
+!! test
+Serialize gallery without attrs in data-mw
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "nativeGallery": true
+}
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
+<li class="gallerycaption">123</li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><span>File:Test.png</span></div><div class="gallerytext"></div></li>
+</ul>
+!! wikitext
+<gallery caption="123">
+File:Test.png
+</gallery>
+!! end
+
+!! test
+Gallery with class and style attributes
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery class="center" style="text-align: center;">
+File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional center" style="text-align: center;">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional center" style="text-align: center;" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"class":"center","style":"text-align: center;"},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+Gallery in slideshow mode
+!! options
+parsoid={
+ "nativeGallery": true
+}
+!! wikitext
+<gallery mode="slideshow" showthumbnails="">
+File:Foobar.jpg
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
+</ul>
+!! end
+
+!! test
+HTML Hex character encoding (spells the word "JavaScript")
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+&#x4A;&#x061;&#x0076;&#x00061;&#x000053;&#x0000063;&#114;&#x0000069;&#00000112;&#x0000000074;
+!! html/php
+<p>&#x4a;&#x61;&#x76;&#x61;&#x53;&#x63;&#114;&#x69;&#112;&#x74;
+</p>
+!! html/parsoid
+<p><span typeof="mw:Entity">J</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">v</span><span typeof="mw:Entity">a</span><span typeof="mw:Entity">S</span><span typeof="mw:Entity">c</span><span typeof="mw:Entity">r</span><span typeof="mw:Entity">i</span><span typeof="mw:Entity">p</span><span typeof="mw:Entity">t</span></p>
+!! end
+
+!! test
+HTML Hex character encoding bogus encoding (T28437 regression check)
+!! wikitext
+&#xsee;&#XSEE;
+!! html
+<p>&amp;#xsee;&amp;#XSEE;
+</p>
+!! end
+
+!! test
+HTML Hex character encoding mixed case
+!! options
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+&#xEE;&#Xee;
+!! html/php
+<p>&#xee;&#xee;
+</p>
+!! html/parsoid
+<p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
+!! end
+
+# See: https://www.w3.org/TR/html5/syntax.html#character-references
+# Note that U+000C (form feed) is not a valid XML character, so
+# it is banned even though allowed in HTML5.
+!! test
+Illegal character references (T106578)
+!! wikitext
+; Null: &#00;
+; FF: &#xC;
+; CR: &#xD;
+; Control (low): &#8;
+; Control (high): &#x7F; &#x9F;
+; Surrogate: &#xD83D;&#xDCA9;
+; This is an okay astral character: &#x1F4A9;
+!! html+tidy
+<dl><dt>Null</dt>
+<dd>&amp;#00;</dd>
+<dt>FF</dt>
+<dd>&amp;#xC;</dd>
+<dt>CR</dt>
+<dd>&amp;#xD;</dd>
+<dt>Control (low)</dt>
+<dd>&amp;#8;</dd>
+<dt>Control (high)</dt>
+<dd>&amp;#x7F; &amp;#x9F;</dd>
+<dt>Surrogate</dt>
+<dd>&amp;#xD83D;&amp;#xDCA9;</dd>
+<dt>This is an okay astral character</dt>
+<dd>&#x1f4a9;</dd></dl>
+!! end
+
+!! test
+__FORCETOC__ override
+!! wikitext
+__NEWSECTIONLINK__
+__FORCETOC__
+!! html/php
+<p><br />
+</p>
+!! end
+
+!! test
+ISBN code coverage
+!! wikitext
+ISBN 978-0-1234-56&#x20;789
+!! html/php
+<p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a>&#x20;789
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/9780123456" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978-0-1234-56</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> </span>789</p>
+!! end
+
+!! test
+ISBN followed by 5 spaces
+!! wikitext
+ISBN
+!! html
+<p>ISBN
+</p>
+!! end
+
+!! test
+Double ISBN
+!! wikitext
+ISBN ISBN 1234567890
+!! html/php
+<p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
+</p>
+!! html/parsoid
+<p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
+!! end
+
+# Uppercase X and lowercase x as well
+!! test
+ISBN with an X
+!! wikitext
+ISBN 3-462-04561-X
+ISBN 3-462-04561-x
+ISBN 080442957X
+ISBN 080442957x
+ISBN 978080442957X
+ISBN 978080442957x
+!! html/php
+<p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
+<a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
+<a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
+<a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
+<a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
+<a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
+<a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
+<a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
+<a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
+<a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
+<a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
+!! end
+
+!! test
+ISBN with empty prefix (parsoid test)
+!! wikitext
+ISBN 1234567890
+!! html/php
+<p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
+!! end
+
+!! test
+T24905: <abbr> followed by ISBN followed by </a>
+!! wikitext
+<abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
+!! html/php
+<p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
+</p>
+!! html/parsoid
+<p><abbr data-parsoid='{"stx":"html"}'>(fr)</abbr> <a href="./Special:BookSources/2753300917" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 2753300917</a> <a rel="mw:ExtLink" class="external text" href="http://www.example.com">example.com</a></p>
+!! end
+
+!! test
+Double RFC
+!! wikitext
+RFC RFC 1234
+!! html
+<p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
+</p>
+!! end
+
+!! test
+Double RFC with a wiki link
+!! wikitext
+RFC [[RFC 1234]]
+!! html
+<p>RFC <a href="/index.php?title=RFC_1234&amp;action=edit&amp;redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
+</p>
+!! end
+
+!! test
+RFC code coverage
+!! wikitext
+RFC 983&#x20;987
+!! html/php
+<p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a>&#x20;987
+</p>
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external text" data-parsoid='{"stx":"magiclink"}'>RFC 983</a><span typeof="mw:Entity" data-parsoid='{"src":"&amp;#x20;","srcContent":" "}'> </span>987</p>
+!! end
+
+!! test
+Centre-aligned image
+!! wikitext
+[[Image:foobar.jpg|centre]]
+!! html/php
+<div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
+!! end
+
+!! test
+None-aligned image
+!! wikitext
+[[Image:foobar.jpg|none]]
+!! html/php
+<div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! html/parsoid
+<figure class="mw-default-size mw-halign-none" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure>
+!! end
+
+!! test
+Width + Height sized image (using px) (height is ignored)
+!! wikitext
+[[Image:foobar.jpg|640x480px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Width-sized image (using px, no following whitespace)
+!! wikitext
+[[Image:foobar.jpg|640px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Width-sized image (using px, with following whitespace - test regression from r39467)
+!! wikitext
+[[Image:foobar.jpg|640px ]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!!end
+
+!! test
+Width-sized image (using px, with preceding whitespace - test regression from r39467)
+!! wikitext
+[[Image:foobar.jpg| 640px]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Image with page parameter
+!! options
+djvu
+!! wikitext
+[[File:LoremIpsum.djvu|page=2]]
+!! html/php
+<p><a href="/index.php?title=File:LoremIpsum.djvu&amp;page=2" class="image"><img alt="LoremIpsum.djvu" src="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-2480px-LoremIpsum.djvu.jpg" width="2480" height="3508" srcset="http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-3720px-LoremIpsum.djvu.jpg 1.5x, http://example.com/images/thumb/5/5f/LoremIpsum.djvu/page2-4960px-LoremIpsum.djvu.jpg 2x" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"page","ak":"page=2"}]}' data-mw='{"page":"2"}'><a href="./File:LoremIpsum.djvu" data-parsoid='{"a":{"href":"./File:LoremIpsum.djvu"},"sa":{"href":"File:LoremIpsum.djvu"}}'><img resource="./File:LoremIpsum.djvu" src="//example.com/images/5/5f/LoremIpsum.djvu" data-file-width="2480" data-file-height="3508" data-file-type="bitmap" height="3508" width="2480" data-parsoid='{"a":{"resource":"./File:LoremIpsum.djvu","height":"3508","width":"2480"},"sa":{"resource":"File:LoremIpsum.djvu"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Another italics / bold test
+!! wikitext
+ ''' ''x'
+!! html
+<pre>'<i> </i>x'
+</pre>
+!!end
+
+# FIXME: The php output seems broken. It's interleaving some open/close tags.
+!! test
+dt/dd/dl test
+!! wikitext
+:;;;::
+!! html/php
+<dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
+
+!! html/parsoid
+<dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
+
+!!end
+
+# Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
+!! test
+Images with the "|" character in the comment
+!! wikitext
+[[File:Foobar.jpg|thumb|An [http://test/?param1=|left|&param2=|x external] URL]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx">external</a> URL</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>An <a rel="mw:ExtLink" class="external text" href="http://test/?param1=%7Cleft%7C&amp;param2=%7Cx" data-parsoid='{"a":{"href":"http://test/?param1=%7Cleft%7C&amp;param2=%7Cx"},"sa":{"href":"http://test/?param1=|left|&amp;param2=|x"}}'>external</a> URL</figcaption></figure>
+!! end
+
+!! test
+[Before] HTML without raw HTML enabled ($wgRawHtml==false)
+!! wikitext
+<html><script>alert(1);</script></html>
+!! html
+<p>&lt;html&gt;&lt;script&gt;alert(1);&lt;/script&gt;&lt;/html&gt;
+</p>
+!! end
+
+!! test
+HTML with raw HTML ($wgRawHtml==true)
+!! options
+wgRawHtml=1
+!! wikitext
+<html><script>alert(1);</script></html>
+!! html/php
+<p><script>alert(1);</script>
+</p>
+!! end
+
+!! test
+Parents of subpages, one level up
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+[[../|L2]]
+!! html
+<p><a href="/index.php?title=Subpage_test/L1/L2&amp;action=edit&amp;redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
+</p>
+!! end
+
+
+!! test
+Parents of subpages, one level up, not named
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+[[../]]
+!! html
+<p><a href="/index.php?title=Subpage_test/L1/L2&amp;action=edit&amp;redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
+</p>
+!! end
+
+
+
+!! test
+Parents of subpages, two levels up
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+[[../../|L1]]2
+
+[[../../|L1]]l
+!! html
+<p><a href="/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
+</p><p><a href="/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
+</p>
+!! end
+
+!! test
+Parents of subpages, two levels up, without trailing slash or name.
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+[[../..]]
+!! html
+<p>[[../..]]
+</p>
+!! end
+
+!! test
+Parents of subpages, two levels up, with lots of extra trailing slashes.
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+[[../../////]]
+!! html
+<p><a href="/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1" class="new" title="Subpage test/L1 (page does not exist)">Subpage test/L1</a>
+</p>
+!! end
+
+!! article
+Subpage test/L1/L2/L3Sibling
+!! text
+Sibling article
+!! endarticle
+
+!! test
+Transclusion of a sibling page (one level up)
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+!! wikitext
+{{../L3Sibling}}
+!! html
+<p>Sibling article
+</p>
+!! end
+
+!! test
+Transclusion of a child page
+!! options
+subpage title=[[Subpage test/L1/L2]]
+!! wikitext
+{{/L3Sibling}}
+!! html
+<p>Sibling article
+</p>
+!! end
+
+# This is wt2html only in Parsoid because we add <nowiki>
+# because of {{..}} and we don't expect to fix that to
+# eliminate the nowikis selective for {{..}} markup.
+!! test
+Non-transclusion because of too many up levels
+!! options
+subpage title=[[Subpage test/L1/L2/L3]]
+parsoid=wt2html
+!! wikitext
+{{../../../../More than parent}}
+!! html/php
+<p>{{../../../../More than parent}}
+</p>
+!! html/parsoid
+<p>{{../../../../More than parent}}</p>
+!! end
+
+!! test
+Definition list code coverage
+!! wikitext
+;title : def
+;title : def
+;title: def
+!! html/php
+<dl><dt>title &#160;</dt>
+<dd>def</dd>
+<dt>title&#160;</dt>
+<dd>def</dd>
+<dt>title</dt>
+<dd>def</dd></dl>
+
+!! html/parsoid
+<dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
+<dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
+<dt>title</dt><dd> def</dd></dl>
+!! end
+
+!! test
+Don't fall for the self-closing div
+!! wikitext
+<div>hello world</div/>
+!! html
+<div>hello world</div>
+
+!! end
+
+!! test
+MSGNW magic word
+!! wikitext
+{{MSGNW:msg}}
+!! html/php
+<p>&#91;&#91;:Template:Msg&#93;&#93;
+</p>
+!! end
+
+!! test
+RAW magic word
+!! wikitext
+{{RAW:QUERTY}}
+!! html
+<p><a href="/index.php?title=Template:QUERTY&amp;action=edit&amp;redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
+</p>
+!! end
+
+# This isn't needed for XHTML conformance, but would be handy as a fallback security measure
+!! test
+Always escape literal '>' in output, not just after '<'
+!! wikitext
+><>
+!! html
+<p>&gt;&lt;&gt;
+</p>
+!! end
+
+!! test
+Template caching
+!! wikitext
+{{Test}}
+{{Test}}
+!! html
+<p>This is a test template
+This is a test template
+</p>
+!! end
+
+
+!! article
+MediaWiki:Fake
+!! text
+==header==
+!! endarticle
+
+!! test
+Inclusion of !userCanEdit() content
+!! wikitext
+{{MediaWiki:Fake}}
+!! html
+<h2><span class="mw-headline" id="header">header</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=MediaWiki:Fake&amp;action=edit&amp;section=T-1" title="MediaWiki:Fake">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+
+!! test
+Out-of-order TOC heading levels
+!! wikitext
+==2==
+======6======
+===3===
+=1=
+=====5=====
+==2==
+!! html
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
+<ul>
+<li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
+<li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
+</ul>
+</li>
+<li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
+<ul>
+<li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
+<li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h6><span class="mw-headline" id="6">6</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: 6">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+<h3><span class="mw-headline" id="3">3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: 3">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
+<h1><span class="mw-headline" id="1">1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: 1">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h5><span class="mw-headline" id="5">5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: 5">edit</a><span class="mw-editsection-bracket">]</span></span></h5>
+<h2><span class="mw-headline" id="2_2">2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+
+!! test
+ISBN with a dummy number
+!! wikitext
+ISBN ---
+!! html
+<p>ISBN ---
+</p>
+!! end
+
+
+!! test
+ISBN with space-delimited number
+!! wikitext
+ISBN 92 9017 032 8
+!! html/php
+<p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
+</p>
+!! html/parsoid
+<p data-parsoid='{"dsr":[0,18,0,0]}'><a href="./Special:BookSources/9290170328" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink","dsr":[0,18,2,2]}'>ISBN 92 9017 032 8</a></p>
+!! end
+
+
+!! test
+ISBN with multiple spaces, no number
+!! wikitext
+ISBN foo
+!! html
+<p>ISBN foo
+</p>
+!! end
+
+
+!! test
+ISBN length
+!! wikitext
+ISBN 123456789
+
+ISBN 1234567890
+
+ISBN 12345678901
+!! html/php
+<p>ISBN 123456789
+</p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
+</p><p>ISBN 12345678901
+</p>
+!! html/parsoid
+<p>ISBN 123456789</p>
+
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
+
+<p>ISBN 12345678901</p>
+!! end
+
+
+!! test
+ISBN with trailing year (T9110)
+!! wikitext
+ISBN 1-234-56789-0 - 2006
+
+ISBN 1 234 56789 0 - 2006
+!! html/php
+<p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
+</p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
+</p>
+!! html/parsoid
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
+
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
+!! end
+
+
+!! test
+anchorencode
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+{{anchorencode:foo bar©#%n}}
+!! html/php
+<p>foo_bar©#%n
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:foo bar©#%n","function":"anchorencode"},"params":{},"i":0}}]}'>foo_bar©#%n</p>
+!! end
+
+!! test
+anchorencode (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+{{anchorencode:foo bar©#%n}}
+!! html/php
+<p>foo_bar.C2.A9.23.25n
+</p>
+!! end
+
+!! test
+anchorencode trims spaces
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+{{anchorencode: __pretty__please__}}
+!! html/php
+<p>pretty_please
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
+!! end
+
+!! test
+anchorencode deals with links
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+{{anchorencode: [[hello|world]] [[hi]]}}
+!! html/php
+<p>world_hi
+</p>
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
+!! end
+
+!! test
+anchorencode deals with templates
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+{{anchorencode: {{Foo}} x}}
+!! html/php
+<p>FOO_x
+</p>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
+!! end
+
+!! test
+anchorencode encodes like the TOC generator: (T20431)
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+===_ +:.3A%3A _ &&amp;]] x===
+{{anchorencode: _ +:.3A%3A _ &&amp;]] x}}
+__NOEDITSECTION__
+!! html/php
+<h3><span id=".2B:.3A.253A_.26.26.5D.5D_x"></span><span class="mw-headline" id="+:.3A%3A_&amp;&amp;]]_x">_ +:.3A%3A _ &amp;&amp;]] x</span></h3>
+<p>+:.3A%3A_&amp;&amp;&#93;&#93;_x
+</p>
+!! html/parsoid
+<h3 id="+:.3A%3A_&amp;&amp;]]_x"><span id=".2B:.3A.253A_.26.26.5D.5D_x" typeof="mw:FallbackId"></span>_ +:.3A%3A _ &amp;<span typeof="mw:Entity" data-parsoid='{"src":"&amp;amp;","srcContent":"&amp;","dsr":[18,23,null,null]}'>&amp;</span>]] x</h3>
+<p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: _ +:.3A%3A _ &amp;&amp;amp;]] x","function":"anchorencode"},"params":{},"i":0}}]}'>+:.3A%3A_&amp;&amp;<span typeof="mw:Entity">]</span><span typeof="mw:Entity">]</span>_x</p>
+<meta property="mw:PageProp/noeditsection"/>
+!! end
+
+!! test
+anchorencode encodes like the TOC generator: (T20431) (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+===_ +:.3A%3A&&amp;]]===
+{{anchorencode: _ +:.3A%3A&&amp;]] }}
+__NOEDITSECTION__
+!! html/php
+<h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&amp;&amp;]]</span></h3>
+<p>.2B:.3A.253A.26.26.5D.5D
+</p>
+!! end
+
+!! test
+T8200: blockquotes and paragraph formatting
+!! wikitext
+<blockquote>
+foo
+</blockquote>
+
+bar
+
+ baz
+!! html
+<blockquote>
+<p>foo
+</p>
+</blockquote>
+<p>bar
+</p>
+<pre>baz
+</pre>
+!! end
+
+!! test
+T10293: Use of center tag ruins paragraph formatting
+!! wikitext
+<center>
+foo
+</center>
+
+bar
+
+ baz
+!! html
+<center>
+<p>foo
+</p>
+</center>
+<p>bar
+</p>
+<pre>baz
+</pre>
+!! end
+
+!!test
+Parsing of overlapping (improperly nested) inline html tags
+!! wikitext
+<span><s>x</span></s>
+!! html/php
+<p><span><s>x&lt;/span&gt;</s></span>
+</p>
+!! html/parsoid
+<p><span><s>x</s></span>
+</p>
+!!end
+
+###
+### Language variants related tests
+###
+
+# Parsoid does not mark self-links.
+# Parsoid does not convert links; PHP will do any necessary redirects.
+
+!! test
+Self-link in language variants
+!! options
+title=[[Dunav]] language=sr
+!! wikitext
+Both [[Dunav]] and [[Дунав]] are names for this river.
+!! html/php
+<p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
+</p>
+!! html/parsoid
+<p>Both <a rel="mw:WikiLink" href="./Dunav" title="Dunav">Dunav</a> and <a rel="mw:WikiLink" href="./Дунав" title="Дунав">Дунав</a> are names for this river.</p>
+!! end
+
+!! article
+Дуна
+!! text
+content
+!! endarticle
+
+!! test
+Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
+!! options
+title=[[Duna]] language=sr
+!! wikitext
+[[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
+!! html/php
+<p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <a class="mw-selflink selflink">Duna</a> and <a class="mw-selflink selflink">Dуна</a> are still self-links.
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Дуна" title="Дуна">Дуна</a> is not a self-link while <a rel="mw:WikiLink" href="./Duna" title="Duna">Duna</a> and <a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> are still self-links.</p>
+!! end
+
+!! test
+Link to a section of a variant of this title shouldn't be parsed as self-link
+!! options
+title=[[Duna]] language=sr
+!! wikitext
+[[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
+!! html/php
+<p><a class="mw-selflink selflink">Dуна</a> is a self-link while <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dunа#Foo</a> and <a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Dуна#Foo</a> are not self-links.
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Dуна" title="Dуна">Dуна</a> is a self-link while <a rel="mw:WikiLink" href="./Dunа#Foo" title="Dunа">Dunа#Foo</a> and <a rel="mw:WikiLink" href="./Dуна#Foo" title="Dуна">Dуна#Foo</a> are not self-links.</p>
+!! end
+
+!! test
+Link to pages in language variants
+!! options
+language=sr
+!! wikitext
+Main Page can be written as [[Маин Паге]]
+!! html/php
+<p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
+</p>
+!! html/parsoid
+<p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
+!! end
+
+
+!! test
+Multiple links to pages in language variants
+!! options
+language=sr
+!! wikitext
+[[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a> can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a> same as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a>.</p>
+!! end
+
+
+!! test
+Simple template in language variants
+!! options
+language=sr
+!! wikitext
+{{тест}}
+!! html/php
+<p>This is a test template
+</p>
+!! end
+
+
+!! test
+Template with explicit namespace in language variants
+!! options
+language=sr
+!! wikitext
+{{Template:тест}}
+!! html/php
+<p>This is a test template
+</p>
+!! end
+
+
+!! test
+Basic test for template parameter in language variants
+!! options
+language=sr
+!! wikitext
+{{парамтест|param=foo}}
+!! html/php
+<p>This is a test template with parameter foo
+</p>
+!! end
+
+!! test
+Simple category in language variants
+!! options
+language=sr cat
+!! wikitext
+[[Category:МедиаWики Усер'с Гуиде]]
+!! html/php
+cat=МедиаWики_Усер'с_Гуиде sort=
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер&#39;с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер&#39;с Гуиде"}}'/>
+!! end
+
+!! article
+Category:分类
+!! text
+blah
+!! endarticle
+
+!! article
+Category:分類
+!! text
+blah
+!! endarticle
+
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+!! test
+Don't convert blue categorylinks to another variant (T35210)
+!! options
+cat
+language=zh
+parsoid=wt2html
+!! wikitext
+[[A]][[Category:分类]]
+!! html/php
+cat=分类 sort=
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
+<link rel="mw:PageProp/Category" href="./Category:分类"/>
+!! end
+
+!! test
+Stripping -{}- tags (language variants)
+!! options
+language=sr
+!! wikitext
+Latin proverb: -{Ne nuntium necare}-
+!! html/php
+<p>Latin proverb: Ne nuntium necare
+</p>
+!! html/parsoid
+<p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
+!! end
+
+
+!! test
+Prevent conversion with -{}- tags (language variants)
+!! options
+language=sr variant=sr-ec
+!! wikitext
+Latinski: -{Ne nuntium necare}-
+!! html/php
+<p>Латински: Ne nuntium necare
+</p>
+!! html/parsoid
+<p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
+!! end
+
+
+!! test
+Prevent conversion of text with -{}- tags (language variants)
+!! options
+language=sr variant=sr-ec
+!! wikitext
+Latinski: -{Ne nuntium necare}-
+!! html/php
+<p>Латински: Ne nuntium necare
+</p>
+!! html/parsoid
+<p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
+!! end
+
+
+!! test
+Prevent conversion of links with -{}- tags (language variants)
+!! options
+language=sr variant=sr-ec
+!! wikitext
+-{[[Main Page]]}-
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}&#39;>Main Page&lt;/a>"}}'></span></p>
+!! end
+
+
+!! test
+-{}- tags within headlines (within html for parserConvert())
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+language=sr variant=sr-ec
+!! wikitext
+==-{Naslov}-==
+
+Note that even an unprotected headline ID is not affected by language
+conversion:
+
+==Latinski==
+!! html/php
+<h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Уреди одељак „Naslov“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
+цонверсион:
+</p>
+<h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Уреди одељак „Латински“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
+
+<p>Note that even an unprotected headline ID is not affected by language
+conversion:</p>
+
+<h2 id="Latinski">Latinski</h2>
+!! end
+
+!! test
+Explicit definition of language variant alternatives
+!! options
+language=zh variant=zh-tw
+!! wikitext
+-{zh:China;zh-tw:Taiwan}-, not China
+!! html/php
+<p>Taiwan, not China
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, not China</p>
+!! end
+
+!! test
+Filter syntax for language variants
+!! options
+language=zh variant=zh-tw
+!! wikitext
+foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
+!! html/php
+<p>fooblog, WEBJOURNAL, WEBLOGquux
+</p>
+!! html/parsoid
+<p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
+!! end
+
+# Note that Parsoid post-processing for language variants needs to
+# update the `title` attribute here, based on the mw:ExpandedAttrs property
+!! test
+Conversion around HTML tags
+!! options
+language=sr variant=sr-ec
+!! wikitext
+-{H|span=>sr-ec:script;title=>sr-ec:src}-
+<span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
+!! html/php
+<p>
+<span title="ЛаCтин">ски</span>
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"span","l":"sr-ec","t":"script"},{"f":"title","l":"sr-ec","t":"src"}]}'/>
+<span title="Latin" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"title"},{"html":"La&lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"twoway\":[{\"l\":\"sr-el\",\"t\":\"L\"},{\"l\":\"sr-ec\",\"t\":\"C\"}]}&#39; data-parsoid=&#39;{\"fl\":[],\"tSp\":[6],\"dsr\":[57,76,null,2]}&#39;>&lt;/span>tin"}]]}'>ski</span></p>
+!! end
+
+!! test
+Explicit session-wise two-way language variant mapping (A flag and - flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
+
+Taiwan is not China.
+
+But -{A|zh:China; zh-tw:Taiwan}- is China,
+
+(This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
+
+and -{China}- is China.
+!! html/php
+<p>This is Taiwan, but we'll forget that now.
+</p><p>Taiwan is not China.
+</p><p>But Taiwan is Taiwan,
+</p><p>(This should be stripped!)
+</p><p>and China is China.
+</p>
+!! html/parsoid
+<p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
+<p>Taiwan is not China.</p>
+<p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'></span> is China,</p>
+<p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"remove":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
+<p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
+!! end
+
+!! test
+Explicit session-wise one-way language variant mapping (A flag and - flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
+
+COUNTRY is China or Taiwan.
+
+But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
+
+(This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
+
+and -{COUNTRY}- is COUNTRY.
+!! html/php
+<p>This is Taiwan, but we'll forget that now.
+</p><p>COUNTRY is China or Taiwan.
+</p><p>But Taiwan is Taiwan,
+</p><p>(This should be stripped!)
+</p><p>and COUNTRY is COUNTRY.
+</p>
+!! html/parsoid
+<p>This is <span typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span>, but we'll forget that now.</p>
+<p>COUNTRY is China or Taiwan.</p>
+<p>But <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'></span> is COUNTRY,</p>
+<p>(This<meta typeof="mw:LanguageVariant" data-mw-variant='{"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}],"remove":true}'/> should be stripped!)</p>
+<p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
+!! end
+
+!! test
+Explicit session-wise two-way language variant mapping (H flag for hide)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
+
+Taiwan is China.
+!! html/php
+<p>(This should be stripped!)
+</p><p>Taiwan is Taiwan.
+</p>
+!! html/parsoid
+<p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
+<p>Taiwan is China.</p>
+!! end
+
+!! test
+Explicit session-wise one-way language variant mapping (H flag for hide)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+(This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
+
+COUNTRY is Taiwan or China.
+!! html/php
+<p>(This should be stripped!)
+</p><p>Taiwan is Taiwan or China.
+</p>
+!! html/parsoid
+<p>(This<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[8]}' data-mw-variant='{"add":true,"oneway":[{"f":"COUNTRY","l":"zh","t":"China"},{"f":"COUNTRY","l":"zh-tw","t":"Taiwan"}]}'/> should be stripped!)</p>
+<p>COUNTRY is Taiwan or China.</p>
+!! end
+
+## Note that parsoid test runner does not support 'showtitle' option.
+!! test
+Adding explicit conversion rule for title (T flag)
+!! options
+language=zh variant=zh-tw showtitle
+!! wikitext
+Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
+
+Taiwan is China.
+!! html/php
+Taiwan
+<p>Should be stripped!
+</p><p>Taiwan is China.
+</p>
+!! html/parsoid
+<p>Should be stripped<meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
+<p>Taiwan is China.</p>
+!! end
+
+!! test
+Code coverage: T combined with H flag
+!! options
+language=zh variant=zh-tw showtitle
+!! wikitext
+Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
+
+Taiwan is China.
+!! html/php
+Taiwan
+<p>Should be stripped!
+</p><p>Taiwan is Taiwan.
+</p>
+!! html/parsoid
+<p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
+<p>Taiwan is China.</p>
+!! end
+
+!! test
+Code coverage: T with no variants
+!! options
+language=zh variant=zh-tw showtitle
+!! wikitext
+-{H|zh:China; zh-tw:Taiwan}-
+Taiwan is China.-{T|Taiwan is China}-
+!! html/php
+Taiwan is China
+<p>
+Taiwan is Taiwan.
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
+Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
+!! end
+
+!! test
+Code coverage: rules with no variants
+!! options
+language=zh variant=zh-tw
+!! wikitext
+-{H|zh:China; zh-tw:Taiwan}-
+Taiwan is China.
+-{H|China}-
+Taiwan is China.
+!! html/php
+<p>
+Taiwan is Taiwan.
+
+Taiwan is China.
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
+Taiwan is China.
+<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
+Taiwan is China.</p>
+!! end
+
+
+!! test
+Code coverage: D flag for conversion rule
+!! options
+language=zh variant=zh-tw
+!! wikitext
+-{D|zh-cn:XA; zh-tw:YA}-
+-{A;D|zh-cn:XB; zh-tw:YB}-
+-{D;H|zh-cn:XC; zh-tw:YC}-
+
+-{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
+
+-{D|0=>zh-tw:1}-
+-{A;D|2=>zh-tw:3}-
+-{D;H|4=>zh-tw:5}-
+
+XA XB XC YA YB YC FOO BAR BAT 012345
+!! html/php
+<p>大陆:XA;台灣:YA;
+
+大陆:XC;台灣:YC;
+</p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
+</p><p>0⇒台灣:1;
+
+4⇒台灣:5;
+</p><p>XA YB YC YA YB YC BAR BAR BAT 013355
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
+<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
+<span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"FOO","l":"zh-tw","t":"BAR"},{"f":"FOO","l":"zh-cn","t":"BAT"}]}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
+<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
+<span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
+<p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
+!! end
+
+!! test
+Code coverage: N flag for conversion rule
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{N|zh-cn}-
+
+-{N|zh-tw}-
+
+-{N|sr-ec}-
+!! html/php
+<p>大陆
+</p><p>台灣
+</p><p>српски (ћирилица)‎
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
+!! end
+
+# html2wt suppresses the bogus 'D' flag, so this is wt2html only
+!! test
+Code coverage: N flag for conversion rule (wt2html only)
+!! options
+language=zh variant=zh-cn
+parsoid=wt2html,html2html
+!! wikitext
+-{D;N|en}-
+!! html/php
+<p>English
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
+!! end
+
+!! test
+Testing that changing the language variant here in the tests actually works
+!! options
+language=zh variant=zh showtitle
+!! wikitext
+Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
+!! html/php
+China
+<p>Should be stripped!
+</p>
+!! html/parsoid
+<p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
+!! end
+
+!! test
+Recursive conversion of alt and title attrs shouldn't clear converter state
+!! options
+language=zh variant=zh-cn
+showtitle
+!! wikitext
+-{H|zh-cn:Exclamation; zh-tw:exclamation}-
+Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
+!! html/php
+China
+<p>
+Should be stripped<span title="Exclamation">!</span>
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
+Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/><span title="exclamation">!</span></p>
+!! end
+
+!! test
+T26072: more test on conversion rule for title
+!! options
+language=zh variant=zh-tw showtitle
+!! wikitext
+This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
+
+This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
+!! html/php
+Taiwan
+<p>This should be stripped!
+</p><p>This won't take interferes with the title rule.
+</p>
+!! html/parsoid
+<p>This should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
+<p>This won't take interferes with the title rule<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"Beijing"},{"l":"zh-tw","t":"Taipei"}]}'/>.</p>
+!! end
+
+!! test
+Partly disable title conversion if variant == main language code
+!! options
+language=zh variant=zh title=[[ZH]] showtitle
+!! wikitext
+-{T|zh-cn:CN;zh-tw:TW}-
+!! html/php
+ZH
+<p>
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"title":true,"twoway":[{"l":"zh-cn","t":"CN"},{"l":"zh-tw","t":"TW"}]}'/></p>
+!! end
+
+!! test
+Partly disable title conversion if variant == main language code, more
+!! options
+language=zh variant=zh title=[[ZH]] showtitle
+!! wikitext
+-{T|TW}-
+!! html/php
+ZH
+<p>
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
+!! end
+
+!! test
+Raw output of variant escape tags (R flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+Raw: -{R|zh:China;zh-tw:Taiwan}-
+!! html/php
+<p>Raw: zh:China;zh-tw:Taiwan
+</p>
+!! html/parsoid
+<p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
+!! end
+
+# html2wt suppresses the bogus 'D' flags, so this is wt2html only
+!! test
+Raw output of variant escape tags (R flag) (wt2html only)
+!! options
+language=zh variant=zh-tw
+parsoid=wt2html,html2html
+!! wikitext
+-{Variant}- -{D|syntax}- -{D;R|options}-
+!! html/php
+<p>Variant syntax options
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Variant"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"syntax"}}'></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"options"}}'></span></p>
+!! end
+
+!! test
+Nested markup inside raw output of variant escape tags (R flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
+!! html/php
+<p>Nested raw: nested Taiwan nested
+</p>
+!! html/parsoid
+<p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"twoway\":[{\"l\":\"zh\",\"t\":\"China\"},{\"l\":\"zh-tw\",\"t\":\"Taiwan\"}]}&#39; data-parsoid=&#39;{\"fl\":[],\"tSp\":[6],\"dsr\":[23,48,null,2]}&#39;>&lt;/span> nested"}}'></span></p>
+!! end
+
+!! test
+Nested markup and spaces inside raw output of variant escape tags (R flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+X-{ outer -{ inner }- outer }-X
+!! html/php
+<p>X outer inner outer X
+</p>
+!! html/parsoid
+<p>X<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":" outer &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"disabled\":{\"t\":\" inner \"}}&#39; data-parsoid=&#39;{\"fl\":[],\"dsr\":[10,21,null,2]}&#39;>&lt;/span> outer "}}'></span>X</p>
+!! end
+
+!! test
+Templates inside raw output of variant escape tags (R flag)
+!! options
+language=zh variant=zh-tw
+!! wikitext
+Nested raw: -{R|nested {{echo|hi}} templates}-
+!! html/php
+<p>Nested raw: nested hi templates
+</p>
+!! html/parsoid
+<p>Nested raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"nested &lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[23,34,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hi\"}},\"i\":0}}]}&#39;>hi&lt;/span> templates"}}'></span></p>
+!! end
+
+!! test
+Strings evaluating false shouldn't be ignored by Language converter (T51072)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
+!! html/php
+<p>0
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[12]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"0"},{"l":"zh-sg","t":"1"},{"l":"zh-tw","t":"2"},{"l":"zh-hk","t":"3"}]}'></span></p>
+!! end
+
+!! test
+Conversion rules from [numeric-only string] to [something else] (T48634)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
+!! html/php
+<p>D12345EE12345
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"B"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"C"},{"f":"0","l":"zh-cn","t":"D"}]}'/><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-hans","t":"A"}]}'/>012345<span typeof="mw:LanguageVariant" data-parsoid='{"fl":["A"],"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"0"},{"l":"zh-cn","t":"E"}]}'></span>012345</p>
+!! end
+
+!! test
+Two-way converter rule entries with an empty value should be ignored (T53551)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{H|zh-cn:foo;zh-tw:;}-foobar
+!! html/php
+<p>foobar
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"foo"},{"l":"zh-tw","t":""}]}'/>foobar</p>
+!! end
+
+!! test
+One-way converter rule entries with an empty "from" string should be ignored (T53551)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{H|=>zh-cn:foo;}-foobar
+!! html/php
+<p>foobar
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
+!! end
+
+!! test
+Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{H|}-foobar
+!! html/php
+<p>foobar
+</p>
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
+!! end
+
+!! test
+Nested using of manual convert syntax
+!! options
+language=zh variant=zh-hk
+!! wikitext
+Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
+!! html/php
+<p>Nested: Hello Hong Kong!
+</p>
+!! html/parsoid
+<p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&apos;{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}&apos; data-parsoid=&apos;{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}&apos;>&lt;/span>"},{"l":"zh-hant","t":"Hello &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&apos;{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&amp;lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&amp;apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&amp;apos; data-parsoid=&amp;apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&amp;apos;>&amp;lt;/span> K&amp;lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&amp;apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&amp;apos; data-parsoid=&amp;apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&amp;apos;>&amp;lt;/span>ong\"}]}&apos; data-parsoid=&apos;{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}&apos;>&lt;/span>"}]}'></span>!</p>
+!! end
+
+!! test
+HTML markups with conversion syntax in attribs, nested in other conversion blocks
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
+!! html/php
+<p><span title="X">A</span>
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"&lt;span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid=&#39;{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}&#39; data-mw=&#39;{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&amp;lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&amp;apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&amp;apos; data-parsoid=&amp;apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&amp;apos;>&amp;lt;/span>\"}]]}&#39;>A&lt;/span>"}}'></span></p>
+!! end
+
+!! test
+HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{<span title="-{X}-">A</span>}-
+!! html/php+disabled
+<p><span title="X">A</span>
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid=&#39;{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}&#39; data-mw=&#39;{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&amp;lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&amp;apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&amp;apos; data-parsoid=&amp;apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&amp;apos;>&amp;lt;/span>\"}]]}&#39;>A&lt;/span>"}}'></span></p>
+!! end
+
+# Parsoid and PHP disagree on how to parse this example: Parsoid
+# insists that the content of a language converter element be a valid
+# DOM fragment or attribute string
+!! test
+Language converter markup with block content
+!! options
+language=zh variant=zh-cn
+!! wikitext
+<span>a-{b<div>c}-d
+
+<span>a-{zh;zh-hans;zh-hant|b<div>c}-d
+
+<span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
+!! html/php+tidy
+<span>ab<div>cd
+<span>ab<div>cd
+<span>ad
+</span></div></span></div></span>
+!! html/parsoid
+<p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"b&lt;div data-parsoid=&#39;{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[10,16,5,0]}&#39;>c&lt;/div>"}}'></div><p>d</p>
+
+<p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</span></p><div typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"b&lt;div data-parsoid=&#39;{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[50,56,5,0]}&#39;>c&lt;/div>"}}'></div><p>d</p>
+
+<p><span data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a<meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"0","l":"zh-cn","t":"x&lt;span data-parsoid=&#39;{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[82,89,6,0]}&#39;>y&lt;/span>"},{"f":"0","l":"zh-tw","t":"b&lt;div data-parsoid=&#39;{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[100,106,5,0]}&#39;>c&lt;/div>"}]}'/>d</span></p>
+!! end
+
+!! test
+LanguageConverter selser (1)
+!! options
+language=zh variant=zh-cn
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
+ ]
+}
+!! wikitext
+-{raw}-
+!! wikitext/edited
+-{edited}-
+!! end
+
+!! test
+LanguageConverter selser (2)
+!! options
+language=zh variant=zh-cn
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["span[class='x']", "contents", "text", "-{foo}-"],
+ ["a", "contents", "text", "-{"],
+ ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
+ ]
+}
+!! wikitext
+<span class="x">TEXT1</span>
+[http://example.com TEXT2]
+[[Foo|TEXT3]]
+{{echo|TEXT4}}
+!! wikitext/edited
+<span class="x"><nowiki>-{foo}-</nowiki></span>
+[http://example.com -{]
+[[Foo|<nowiki>-{</nowiki>]]
+{{1x|<nowiki>-{</nowiki>}}
+!! end
+
+# Tests LanguageVariantText in ConstrainedText
+!! test
+LanguageConverter selser (3)
+!! options
+language=zh variant=zh-cn
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["td > span", "attr", "typeof", "mw:LanguageVariant"],
+ ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
+ ]
+}
+!! wikitext
+{|
+|-
+|<span>Foo</span>
+|}
+!! wikitext/edited
+{|
+|-
+|<nowiki/>-{edited}-
+|}
+!! end
+
+# Tests LanguageVariantText._fromSelSer
+!! test
+LanguageConverter selser (4)
+!! options
+language=zh variant=zh-cn
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["td > span.x", "remove"]
+ ]
+}
+!! wikitext
+{|
+|-
+|<span class="x">Foo</span>-{Bar}-
+||<span class="x">Foo</span>-{Bar}-
+|}
+!! wikitext/edited
+{|
+|-
+|<nowiki/>-{Bar}-
+||-{Bar}-
+|}
+!! end
+
+# Since Parsoid is starting to emit canonical wikitext for links,
+# [http://example.com http://example.com] will not RT back to that
+# form anymore.
+# Parsoid does not language-convert links (it is done in a
+# post-processing step)
+!! test
+Proper conversion of text in external links
+!! options
+language=sr variant=sr-ec
+parsoid=wt2html
+!! wikitext
+http://www.google.com
+gopher://www.google.com
+[http://www.google.com http://www.google.com]
+[gopher://www.google.com gopher://www.google.com]
+[https://www.google.com irc://www.google.com]
+[ftp://www.google.com www.google.com/ftp://dir]
+[//www.google.com www.google.com]
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
+<a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
+<a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
+<a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
+<a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
+<a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
+<a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
+<a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
+<a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
+!! end
+
+!! test
+Do not convert roman numbers to language variants
+!! options
+language=sr variant=sr-ec
+!! wikitext
+Fridrih IV je car.
+!! html/php
+<p>Фридрих IV је цар.
+</p>
+!! html/parsoid
+<p>Fridrih IV je car.</p>
+!! end
+
+!! test
+Unclosed language converter markup "-{"
+!! options
+language=sr
+!! wikitext
+-{T|hello
+!! html
+<p>-{T|hello
+</p>
+!! end
+
+!! test
+Don't convert raw rule "-{R|=&gt;}-" to "=>"
+!! options
+language=sr
+!! wikitext
+-{R|=&gt;}-
+!! html/php
+<p>=&gt;
+</p>
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"=&lt;span typeof=\"mw:Entity\" data-parsoid=&#39;{\"src\":\"&amp;amp;gt;\",\"srcContent\":\">\",\"dsr\":[5,9,null,null]}&#39;>>&lt;/span>"}}'></span></p>
+!!end
+
+!! test
+Don't break link parsing if language converter markup is in the caption.
+!! options
+language=sr variant=sr-ec
+!! wikitext
+[[Main Page|-{R|main page}-]]
+!! html/php
+<p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"main page"}}' data-parsoid='{"fl":["R"]}'></span></a></p>
+!! end
+
+!! test
+T146304: Don't break template parsing if language converter markup is in the parameter.
+!! options
+language=sr variant=sr-ec
+!! wikitext
+{{echo|-{R|foo}-}}
+!! html/php
+<p>foo
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo"}}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Шаблон:Echo"},"params":{"1":{"wt":"-{R|foo}-"}},"i":0}}]}'></span></p>
+!! end
+
+!! test
+T146305: Don't break image parsing if language converter markup is in the caption.
+!! options
+language=sr
+!! wikitext
+[[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећај"></a></div>caption:</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"}]}'><a href="./Датотека:Foobar.jpg"><img resource="./Датотека:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"caption:"}}' data-parsoid='{"fl":["R"]}'></span></figcaption></figure>
+!! end
+
+!! test
+T146305: Don't break image parsing if nested language converter markup is in the caption.
+!! options
+language=zh variant=zh-cn
+!! wikitext
+[[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="放大"></a></div>blog (hk: WEBJOURNAL, tw: WEBLOG)</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"blog (hk: &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBJOURNAL\"}}&#39; data-parsoid=&#39;{\"fl\":[\"zh-hans\"],\"dsr\":[43,65,null,2]}&#39;>&lt;/span>, tw: &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"WEBLOG\"}}&#39; data-parsoid=&#39;{\"fl\":[\"zh-hans\"],\"dsr\":[71,89,null,2]}&#39;>&lt;/span>)"}]}'></span></figcaption></figure>
+!! end
+
+# XXX html2wt disabled because rich markup in alt is not preserved.
+!! test
+Don't break gallery if language converter markup is inside.
+!! options
+language=zh
+!! wikitext
+<gallery>
+File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
+File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
+</gallery>
+!! html/php
+<ul class="gallery mw-gallery-traditional">
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="bat" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="bar"><img alt="foo" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
+</p>
+ </div>
+ </div></li>
+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
+ <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" /></a></div></div>
+ <div class="gallerytext">
+<p>This is a test template
+</p>
+ </div>
+ </div></li>
+</ul>
+
+!! html/parsoid
+<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-\nFile:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt\n"}}'>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><figure-inline typeof="mw:Image" data-mw='{"caption":"&lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"disabled\":{\"t\":\"bar\"}}&#39; data-parsoid=&#39;{\"fl\":[\"R\"],\"dsr\":[68,77,null,2]}&#39;>&lt;/span>"}'><a href="./File:Foobar.jpg"><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="2" width="20"/></a></figure-inline></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./File:Foobar.jpg"><img alt="galleryalt" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="14" width="120"/></a></figure-inline></div><div class="gallerytext"><span about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Test","href":"./Template:Test"},"params":{"1":{"wt":"unamedParam"},"alt":{"wt":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div></li>
+</ul>
+!! end
+
+!! test
+T153135: Don't break list handling if language converter markup is in the item.
+!! options
+language=zh variant=zh-cn
+!! wikitext
+;-{zh-cn:AAA;zh-tw:BBB}-
+;-{R|foo:bar}-
+!! html/php
+<dl><dt>AAA</dt>
+<dt>foo:bar</dt></dl>
+
+!! html/parsoid
+<dl><dt data-parsoid='{"dsr":[0,24,1,0]}'><span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[6]}' data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA"},{"l":"zh-tw","t":"BBB"}]}'></span></dt>
+<dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
+</dl>
+!! end
+
+// Note that parsoid does not protect colons unless language converter
+// markup is properly nested, because it is a backtracking parser.
+!! test
+T153135: Unclosed markup in definition list (code coverage)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+;<b>foo:bar
+;-{zh-cn:AAA
+!! html/php+tidy
+<dl><dt><b>foo:bar</b></dt><b>
+<dt>-{zh-cn:AAA</dt></b></dl><p><b>
+</b></p>
+!! html/parsoid
+<dl><dt data-parsoid='{"dsr":[0,11,1,0]}'><b data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo:bar</b></dt><b data-parsoid='{"stx":"html","autoInsertedEnd":true,"autoInsertedStart":true}'>
+<dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
+<dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
+</b></dl>
+!! end
+
+!! test
+T153135: Nested language converter markup in definition list (code coverage)
+!! options
+language=zh variant=zh-cn
+!! wikitext
+;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
+!! html/php
+<dl><dt>AAA foo:bar bat:baz</dt>
+<dd>def</dd></dl>
+
+!! html/parsoid
+<dl><dt data-parsoid='{"dsr":[0,49,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"zh-cn","t":"AAA &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"filter\":{\"l\":[\"zh-hans\"],\"t\":\"foo:bar\"}}&#39; data-parsoid=&#39;{\"fl\":[\"zh-hans\"],\"dsr\":[14,33,null,2]}&#39;>&lt;/span> &lt;span typeof=\"mw:LanguageVariant\" data-mw-variant=&#39;{\"disabled\":{\"t\":\"bat:baz\"}}&#39; data-parsoid=&#39;{\"fl\":[\"R\"],\"dsr\":[34,47,null,2]}&#39;>&lt;/span>"}]}'></span></dt>
+<dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
+</dl>
+!! end
+
+# html2wt mode disabled due to <nowiki> insertion.
+!! test
+T153140: Don't break table handling if language converter markup is in the cell.
+!! options
+language=sr variant=sr-ec
+parsoid=wt2html,wt2wt,html2html
+!! wikitext
+{|
+|-
+| -{R|B}-
+|}
+!! html/php
+<table>
+
+<tr>
+<td>B
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody>
+<tr>
+<td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
+</tr>
+</tbody>
+</table>
+!! end
+
+!! test
+Language converter tricky html2wt cases (1)
+!! options
+language=sr
+parsoid=html2wt,wt2wt
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
+!! wikitext
+-{<nowiki>}-</nowiki>}-
+!! html/php
+<p>&#125;-
+</p>
+!! end
+
+!! test
+Language converter tricky html2wt cases (2)
+!! options
+language=sr
+parsoid=html2wt,wt2wt
+!! html/parsoid
+<p>-{foo}-</p>
+!! wikitext
+<nowiki>-{foo}-</nowiki>
+!! html/php
+<p>-&#123;foo&#125;-
+</p>
+!! end
+
+!! test
+Language converter tricky html2wt cases (3)
+!! options
+language=sr
+parsoid=html2wt,wt2wt
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
+!! wikitext
+-{R||}-
+
+-{R|R|raw}-
+
+-{<nowiki>-{foo}-</nowiki>}-
+!! html/php
+<p>|
+</p><p>R|raw
+</p><p>-&#123;foo&#125;-
+</p>
+!! end
+
+!! test
+Language converter tricky html2wt cases (4)
+!! options
+language=sr
+parsoid=html2wt,wt2wt
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[2,14,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"hey\"}},\"i\":0}}]}&#39;>hey&lt;/span>"}}'></span></p>
+!! wikitext
+-{R|{{echo|hey}}}-
+!! html/php
+<p>hey
+</p>
+!! end
+
+# Note that the <nowiki> escaping added by parsoid for source text,
+# destination text, and language names only works on the PHP side
+# for *destination text*. (HTML entity escaping wouldn't work
+# any better.) This is probably a bug, at least for source texts.
+# (For language names PHP uses a precise regexp based on the languages
+# it currently knows have variants, which is fragile since this set
+# can grow/shrink over time.)
+!! test
+Language converter tricky html2wt cases (5)
+!! options
+language=zh variant=zh-cn
+!! html/parsoid
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"a:b=>c","l":"zh-cn","t":"x;foo=>zh-cn:boo"},{"f":"bar","l":"zh-cn","t":"bat;xyz=>zh-cn:abc"}]}'/>foobar</p>
+<p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-tw","t":"xyz"},{"l":"zh-cn","t":"0;zh-tw:bar"}]}'></span></p>
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
+<p>a:b=>c xyz</p>
+!! wikitext
+-{H|<nowiki>a:b=>c</nowiki>=>zh-cn:<nowiki>x;foo=>zh-cn:boo</nowiki>;bar=>zh-cn:<nowiki>bat;xyz=>zh-cn:abc</nowiki>}-foobar
+
+-{H|A=><nowiki>bo:g;us</nowiki>:B}-
+
+-{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
+
+-{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
+
+a:b=>c xyz
+!! html/php+disabled
+<p>foobat;xyz=&gt;zh-cn:abc
+</p><p>A
+</p><p>0;zh-tw:bar
+</p><p>abc
+</p><p>a:b=&gt;c 0;zh-tw:bar
+</p>
+!! end
+
+!! test
+T179579: Nowiki and lc interaction
+!! options
+parsoid=wt2html
+language=sr
+!! wikitext
+-{</nowiki>123}-
+
+-{123<nowiki>|</nowiki>456}-
+!! html/parsoid
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&amp;lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{&lt;/nowiki>123}-"}'></span></p>
+
+<p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"123&lt;span typeof=\"mw:Nowiki\" data-parsoid=&#39;{\"dsr\":[23,41,8,9]}&#39;>|&lt;/span>456"}}' data-parsoid='{"fl":[],"src":"-{123&lt;nowiki>|&lt;/nowiki>456}-"}'></span></p>
+!! end
+
+!! test
+T2529: Uncovered bullet
+!! wikitext
+*Foo {{bullet}}
+!! html
+<ul><li>Foo</li>
+<li>Bar</li></ul>
+
+!! end
+
+!! test
+T2529: Uncovered bullet in a deeply nested list
+!! wikitext
+*******Foo {{bullet}}
+!! html
+<ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li>Foo</li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li>
+<li>Bar</li></ul>
+
+!! end
+
+!! test
+T2529: Uncovered table already at line-start
+!! wikitext
+x
+
+{{table}}
+y
+!! html
+<p>x
+</p>
+<table>
+<tr>
+<td>1</td>
+<td>2
+</td></tr>
+<tr>
+<td>3</td>
+<td>4
+</td></tr></table>
+<p>y
+</p>
+!! end
+
+!! test
+T2529: Uncovered bullet in parser function result
+!! wikitext
+*Foo {{lc:{{bullet}} }}
+!! html
+<ul><li>Foo</li>
+<li>bar</li></ul>
+
+!! end
+
+!! test
+T7678: Double-parsed template argument
+!! wikitext
+{{lc:{{{1}}}|hello}}
+!! html
+<p>{{{1}}}
+</p>
+!! end
+
+!! test
+T7678: Double-parsed template invocation
+!! wikitext
+{{lc:{{paramtest {{!}} param = hello }} }}
+!! html
+<p>{{paramtest | param = hello }}
+</p>
+!! end
+
+!! test
+Case insensitivity of parser functions for non-ASCII characters (T10143)
+!! options
+language=cs
+title=[[Main Page]]
+!! wikitext
+{{PRVNÍVELKÉ:ěščř}}
+{{prvnívelké:ěščř}}
+{{PRVNÍMALÉ:ěščř}}
+{{prvnímalé:ěščř}}
+{{MALÁ:ěščř}}
+{{malá:ěščř}}
+{{VELKÁ:ěščř}}
+{{velká:ěščř}}
+!! html
+<p>Ěščř
+Ěščř
+ěščř
+ěščř
+ěščř
+ěščř
+ĚŠČŘ
+ĚŠČŘ
+</p>
+!! end
+
+!! test
+Morwen/13: Unclosed link followed by heading
+!! wikitext
+[[link
+==heading==
+!! html
+<p>[[link
+</p>
+<h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+HHP2.1: Heuristics for headings in preprocessor parenthetical structures
+!! wikitext
+{{foo|
+=heading=
+!! html
+<p>{{foo|
+</p>
+<h1><span class="mw-headline" id="heading">heading</span></h1>
+
+!! end
+
+!! test
+HHP2.2: Heuristics for headings in preprocessor parenthetical structures
+!! wikitext
+{{foo|
+==heading==
+!! html
+<p>{{foo|
+</p>
+<h2><span class="mw-headline" id="heading">heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: heading">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+Tildes in comments
+!! options
+pst
+!! wikitext
+<!-- ~~~~ -->
+!! html/php
+<!-- ~~~~ -->
+!! end
+
+!! test
+Paragraphs inside divs (no extra line breaks)
+!! wikitext
+<div>Line one
+
+Line two</div>
+!! html
+<div>Line one
+Line two</div>
+
+!! end
+
+!! test
+Paragraphs inside divs (extra line break on open)
+!! wikitext
+<div>
+Line one
+
+Line two</div>
+!! html
+<div>
+<p>Line one
+</p>
+Line two</div>
+
+!! end
+
+!! test
+Paragraphs inside divs (extra line break on close)
+!! wikitext
+<div>Line one
+
+Line two
+</div>
+!! html
+<div>Line one
+<p>Line two
+</p>
+</div>
+
+!! end
+
+!! test
+Paragraphs inside divs (extra line break on open and close)
+!! wikitext
+<div>
+Line one
+
+Line two
+</div>
+!! html
+<div>
+<p>Line one
+</p><p>Line two
+</p>
+</div>
+
+!! end
+
+# doBlockLevels screws up this output and Remex cleans up as much as it can.
+# Parsoid seems to do a better job here since its p-wrapper is probably smarter.
+!! test
+Nesting tags, paragraphs on lines which begin with <div>
+!! wikitext
+<div></div><strong>A
+B</strong>
+!! html/php+tidy
+<div></div><p><strong>A
+</strong></p><strong></strong><p><strong>B</strong>
+</p>
+!! html/parsoid
+<div></div>
+<p><strong>A
+B</strong>
+</p>
+!! end
+
+# T8200: <blockquote> should behave like <div> with respect to line breaks
+!! test
+T8200: paragraphs inside blockquotes (no extra line breaks)
+!! wikitext
+<blockquote>Line one
+
+Line two</blockquote>
+!! html
+<blockquote>Line one
+Line two</blockquote>
+
+!! html+tidy
+<blockquote><p>Line one
+Line two</p></blockquote>
+!! end
+
+!! test
+T8200: paragraphs inside blockquotes (extra line break on open)
+!! wikitext
+<blockquote>
+Line one
+
+Line two</blockquote>
+!! html
+<blockquote>
+<p>Line one
+</p>
+Line two</blockquote>
+
+!! html+tidy
+<blockquote>
+<p>Line one
+</p><p>
+Line two</p></blockquote>
+!! end
+
+# Parsoid's output is broken on this because of Tidy-compatibility cruft
+!! test
+T8200: paragraphs inside blockquotes (extra line break on close)
+!! wikitext
+<blockquote>Line one
+
+Line two
+</blockquote>
+!! html
+<blockquote>Line one
+<p>Line two
+</p>
+</blockquote>
+
+!! html+tidy
+<blockquote><p>Line one
+</p><p>Line two
+</p>
+</blockquote>
+!! end
+
+!! test
+T8200: paragraphs inside blockquotes (extra line break on open and close)
+!! wikitext
+<blockquote>
+Line one
+
+Line two
+</blockquote>
+!! html
+<blockquote>
+<p>Line one
+</p><p>Line two
+</p>
+</blockquote>
+
+!! end
+
+# FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
+!! test
+Paragraphs inside blockquotes/divs (no extra line breaks)
+!! wikitext
+<blockquote><div>Line one
+
+Line two</div></blockquote>
+!! html
+<blockquote><div>Line one
+Line two</div></blockquote>
+
+!! end
+
+!! test
+Paragraphs inside blockquotes/divs (extra line break on open)
+!! wikitext
+<blockquote><div>
+Line one
+
+Line two</div></blockquote>
+!! html
+<blockquote><div>
+<p>Line one
+</p>
+Line two</div></blockquote>
+
+!! end
+
+!! test
+Paragraphs inside blockquotes/divs (extra line break on close)
+!! wikitext
+<blockquote><div>Line one
+
+Line two
+</div></blockquote>
+!! html
+<blockquote><div>Line one
+<p>Line two
+</p>
+</div></blockquote>
+
+!! end
+
+!! test
+Paragraphs inside blockquotes/divs (extra line break on open and close)
+!! wikitext
+<blockquote><div>
+Line one
+
+Line two
+</div></blockquote>
+!! html
+<blockquote><div>
+<p>Line one
+</p><p>Line two
+</p>
+</div></blockquote>
+
+!! end
+
+!! test
+Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
+!! options
+wgLinkHolderBatchSize=0
+!! wikitext
+[[meatball:1]]
+[[meatball:2]]
+[[meatball:3]]
+!! html
+<p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
+<a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
+</p>
+!! end
+
+!! test
+Free external link invading image caption
+!! wikitext
+[[Image:Foobar.jpg|thumb|http://x|hello]]
+!! html/php
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>hello</div></div></div>
+
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"bogus","ak":"http://x"},{"ck":"caption","ak":"hello"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"Image:Foobar.jpg"}}'/></a><figcaption>hello</figcaption></figure>
+!! end
+
+!! test
+T17196: localised external link numbers
+!! options
+language=fa
+!! wikitext
+[http://en.wikipedia.org/]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
+!! end
+
+!! test
+Multibyte character in padleft
+!! wikitext
+{{padleft:-Hello|7|Æ}}
+!! html/php
+<p>Æ-Hello
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
+!! end
+
+!! test
+Multibyte character in padright
+!! wikitext
+{{padright:Hello-|7|Æ}}
+!! html/php
+<p>Hello-Æ
+</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
+!! end
+
+!!test
+formatdate parser function
+!! wikitext
+{{#formatdate:2009-03-24}}
+!! html
+<p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
+</p>
+!! end
+
+!!test
+formatdate parser function, with default format
+!! wikitext
+{{#formatdate:2009-03-24|mdy}}
+!! html
+<p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
+</p>
+!! end
+
+!! test
+Spacing of numbers in formatted dates
+!! wikitext
+{{#formatdate:January 15}}
+!! html
+<p><span class="mw-formatted-date" title="01-15">January 15</span>
+</p>
+!! end
+
+!! test
+formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
+!! options
+language=nl title=[[MediaWiki:Common.css]]
+!! wikitext
+{{#formatdate:2009-03-24|dmy}}
+!! html
+<p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
+</p>
+!! end
+
+#
+#
+#
+
+#
+# Edit comments
+#
+
+!! test
+Edit comment with link
+!! options
+comment
+!! wikitext
+I like the [[Main Page]] a lot
+!! html/php
+I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
+!!end
+
+!! test
+Edit comment with link and link text
+!! options
+comment
+!! wikitext
+I like the [[Main Page|best pages]] a lot
+!! html/php
+I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
+!!end
+
+!! test
+Edit comment with link and link text with suffix
+!! options
+comment
+!! wikitext
+I like the [[Main Page|best page]]s a lot
+!! html/php
+I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
+!!end
+
+!! test
+Edit comment with section link (non-local, eg in history list)
+!! options
+comment title=[[Main Page]]
+!! wikitext
+/* External links */ removed bogus entries
+!! html/php
+<a href="/wiki/Main_Page#External_links" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
+!!end
+
+!! test
+Edit comment with section link and text before it (non-local, eg in history list)
+!! options
+comment title=[[Main Page]]
+!! wikitext
+pre-comment text /* External links */ removed bogus entries
+!! html/php
+pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
+!!end
+
+!! test
+Edit comment with section link (local, eg in diff view)
+!! options
+comment local title=[[Main Page]]
+!! wikitext
+/* External links */ removed bogus entries
+!! html/php
+<a href="#External_links">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
+!!end
+
+!! test
+Edit comment with subpage link (T16080)
+!! options
+comment
+subpage
+title=[[Subpage test]]
+!! wikitext
+Poked at a [[/subpage]] here...
+!! html/php
+Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
+!!end
+
+!! test
+Edit comment with subpage link and link text (T16080)
+!! options
+comment
+subpage
+title=[[Subpage test]]
+!! wikitext
+Poked at a [[/subpage|neat little page]] here...
+!! html/php
+Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
+!!end
+
+!! test
+Edit comment with bogus subpage link in non-subpage NS (T16080)
+!! options
+comment
+title=[[Subpage test]]
+!! wikitext
+Poked at a [[/subpage]] here...
+!! html/php
+Poked at a <a href="/index.php?title=/subpage&amp;action=edit&amp;redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
+!!end
+
+!! test
+Edit comment with bare anchor link (local, as on diff)
+!! options
+comment
+local
+title=[[Main Page]]
+!! wikitext
+[[#section]]
+!! html/php
+<a href="#section">#section</a>
+!! end
+
+!! test
+Edit comment with bare anchor link (non-local, as on history)
+!! options
+comment
+title=[[Main Page]]
+!! wikitext
+[[#section]]
+!! html/php
+<a href="/wiki/Main_Page#section" title="Main Page">#section</a>
+!! end
+
+!! test
+Anchor starting with underscore
+!! options
+title=[[Foo]]
+!! wikitext
+[[#_ref|One]]
+!! html/php
+<p><a href="#_ref">One</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
+!! end
+
+!! test
+Id starting with underscore
+!! wikitext
+<div id="_ref"></div>
+!! html/*
+<div id="_ref"></div>
+
+!! end
+
+!! test
+Edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+[[Main Page|Many|pipes]]
+!! html/php
+<a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
+!! end
+
+!! test
+Complex edit comment with link with more than one pipe (T99346)
+!! options
+comment
+!! wikitext
+Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
+!! html/php
+Created page with &quot;&lt;noinclude&gt;<a href="/index.php?title=Category:Requests_for_permissions/Bot&amp;action=edit&amp;redlink=1" class="new" title="Category:Requests for permissions/Bot (page does not exist)">{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}</a>&lt;/noinclude&gt; === <a href="/index.php?title=User:MineoBot&amp;action=edit&amp;redlink=1" class="new" title="User:MineoBot (page does not exist)">User:MineoBot</a> 8=== {{Request for permissions/links|Mineo...&quot;
+!! end
+
+!! test
+Space normalisation on autocomment (T24784)
+!! options
+comment
+title=[[Main Page]]
+!! wikitext
+/* __hello__world__ */
+!! html/php
+<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">__hello__world__</span></span>
+!! end
+
+!! test
+percent-encoding and + signs in comments (T28410)
+!! options
+comment
+!! wikitext
+[[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
+!! html/php
+<a href="/index.php?title=ABC3D%25_%2B%2B&amp;action=edit&amp;redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="/index.php?title=ABC3D%25_%2B%2B&amp;action=edit&amp;redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
+!! end
+
+# Parsoid doesn't support this yet: see T75581
+# but it *should* omit the 'src' attribute if the image is bad.
+# PHP side of tests was disabled in
+# mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
+# because of issues in the PHP parserTests infrastructure
+# (but the output below is indeed what the PHP side emits)
+!! test
+Bad images - basic functionality
+!! wikitext
+[[File:Bad.jpg]]
+!! html/php+disabled
+!! html/parsoid
+<p><span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span></p>
+!! end
+
+!! test
+Bad images - T18039: text after bad image disappears
+!! wikitext
+Foo bar
+[[File:Bad.jpg]]
+Bar foo
+!! html/php+disabled
+<p>Foo bar
+</p><p>Bar foo
+</p>
+!! html/parsoid
+<p>Foo bar
+<span class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"bad-image","message":"This image is blacklisted in this context."}]}'><a href="./File:Bad.jpg"><img resource="./File:Bad.jpg" height="220" width="220"/></a></span>
+Bar foo</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) no displaytitle
+!! options
+showtitle
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=false
+!! wikitext
+this is not the the title
+!! html/php
+Parser test
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) RestrictDisplayTitle=false
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=false
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:whatever}}
+!! html/php
+whatever
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=true
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:whatever}}
+!! html/php
+Screen
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=true
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:screen}}
+!! html/php
+screen
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) AllowDisplayTitle=false
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=false
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:screen}}
+!! html/php
+Screen
+<p>this is not the the title
+<a href="/index.php?title=Template:DISPLAYTITLE:screen&amp;action=edit&amp;redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
+</p>
+!! end
+
+!! test
+Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=false
+!! wikitext
+this is not the the title
+!! html/php
+Screen
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle handles inline CSS styles (T28547) - rejected value
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=true
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
+!! html/php
+<span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Verify that displaytitle handles inline CSS styles (T28547) - accepted value
+!! options
+showtitle
+title=[[Screen]]
+!! config
+wgAllowDisplayTitle=true
+wgRestrictDisplayTitle=true
+!! wikitext
+this is not the the title
+{{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
+!! html/php
+<span style="color: red;">s</span>creen
+<p>this is not the the title
+</p>
+!! end
+
+!! test
+Page status indicators: Empty name is invalid
+!! options
+showindicators
+!! wikitext
+<indicator name=" "></indicator>
+<indicator></indicator>
+!! html/php
+<p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
+<span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
+</p>
+!! end
+
+!! test
+Page status indicators: Weird syntaxes that are okay
+!! options
+showindicators
+!! wikitext
+<indicator name="empty" />
+<indicator name="name"></indicator>
+!! html/php
+empty=
+name=
+<p><br />
+</p>
+!! end
+
+!! test
+Page status indicators: Torture test
+!! options
+showindicators
+!! wikitext
+<indicator name="01">hello world</indicator>
+<indicator name="02">[[Main Page]]</indicator>
+<indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
+<indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
+<indicator name="05">*foo
+*bar</indicator>
+<indicator name="06"><nowiki>foo</nowiki></indicator>
+<indicator name="07"> Preformatted</indicator>
+<indicator name="08"><div>Broken tag</indicator>
+<indicator name="09">{| class=wikitable
+|cell
+|}</indicator>
+<indicator name="10">Two
+
+paragraphs</indicator>
+!! html/php
+01=hello world
+02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+03=<img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
+04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg" width="25" height="3" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
+05=<ul><li>foo</li>
+<li>bar</li></ul>
+
+06=foo
+07=<pre>Preformatted
+</pre>
+08=<div>Broken tag</div>
+
+09=<table class="wikitable">
+<tr>
+<td>cell
+</td></tr></table>
+
+10=<p>Two
+</p><p>paragraphs
+</p>
+<p><br />
+</p><p><br />
+</p><p><br />
+</p><p><br />
+</p><p><br />
+</p>
+!! end
+
+!! test
+preload: check <noinclude> and <includeonly>
+!! options
+preload
+!! wikitext
+Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
+!! html/php
+Hello kind world.
+!! end
+
+!! test
+preload: check <onlyinclude>
+!! options
+preload
+!! wikitext
+Goodbye <onlyinclude>Hello world</onlyinclude>
+!! html/php
+Hello world
+!! end
+
+!! test
+preload: can pass tags through if we want to
+!! options
+preload
+!! wikitext
+<includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
+!! html/php
+<includeonly>Hello world</includeonly>
+!! end
+
+!! test
+preload: check that it doesn't try to do tricks
+!! options
+preload
+!! wikitext
+* <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
+!! html/php
+* <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
+!! end
+
+!! test
+Play a bit with r67090 and T5158
+!! wikitext
+<div style="width:50% !important">&nbsp;</div>
+<div style="width:50%&nbsp;!important">&nbsp;</div>
+<div style="width:50%&#160;!important">&nbsp;</div>
+<div style="border : solid;">&nbsp;</div>
+!! html/php
+<div style="width:50% !important">&#160;</div>
+<div style="width:50% !important">&#160;</div>
+<div style="width:50% !important">&#160;</div>
+<div style="border&#160;: solid;">&#160;</div>
+
+!! html/parsoid
+<div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
+<div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&amp;nbsp;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
+<div style="width:50% !important" data-parsoid='{"stx":"html","a":{"style":"width:50% !important"},"sa":{"style":"width:50%&amp;#160;!important"}}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
+<div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
+
+!! end
+
+!! test
+HTML5 data attributes
+!! wikitext
+<span data-foo="bar">Baz</span>
+<p data-abc-def_hij="">Quuz</p>
+!! html/php
+<p><span data-foo="bar">Baz</span>
+</p>
+<p data-abc-def_hij="">Quuz</p>
+
+!! html/parsoid
+<p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
+<p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
+!! end
+
+!! test
+Strip reserved data attributes
+!! wikitext
+<div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
+!! html/php
+<div data-ok="fred">d</div>
+
+!! html/parsoid
+<div data-x-data-mw="foo" data-x-data-parsoid="bar" data-x-data-mw-someext="baz" data-ok="fred" data-parsoid='{"stx":"html","a":{"data-ooui":null,"data-bad:ns":null},"sa":{"data-ooui":"xyzzy","data-bad:ns":"ns"}}'>d</div>
+!! end
+
+!! test
+percent-encoding and + signs in internal links (T28410)
+!! wikitext
+[[User:+%]] [[Page+title%]]
+[[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
+[[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
+[[%33%45]] [[%33%45+]]
+!! html/php
+<p><a href="/index.php?title=User:%2B%25&amp;action=edit&amp;redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="/index.php?title=Page%2Btitle%25&amp;action=edit&amp;redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
+<a href="/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="/index.php?title=%25%2B&amp;action=edit&amp;redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="/index.php?title=%25%2Br&amp;action=edit&amp;redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
+<a href="/index.php?title=%25&amp;action=edit&amp;redlink=1" class="new" title="% (page does not exist)">%</a> <a href="/index.php?title=%2B&amp;action=edit&amp;redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="/index.php?title=Special:Upload&amp;wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
+<a href="/index.php?title=3E&amp;action=edit&amp;redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="/index.php?title=3E%2B&amp;action=edit&amp;redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./User:+%25" title="User:+%" data-parsoid='{"stx":"simple","a":{"href":"./User:+%25"},"sa":{"href":"User:+%"}}'>User:+%</a> <a rel="mw:WikiLink" href="./Page+title%25" title="Page+title%" data-parsoid='{"stx":"simple","a":{"href":"./Page+title%25"},"sa":{"href":"Page+title%"}}'>Page+title%</a>
+<a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%+</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"piped","a":{"href":"./%25+"},"sa":{"href":"%+"}}'>%20</a> <a rel="mw:WikiLink" href="./%25+" title="%+" data-parsoid='{"stx":"simple","a":{"href":"./%25+"},"sa":{"href":"%+ "}}'>%+ </a> <a rel="mw:WikiLink" href="./%25+r" title="%+r" data-parsoid='{"stx":"simple","a":{"href":"./%25+r"},"sa":{"href":"%+r"}}'>%+r</a>
+<a rel="mw:WikiLink" href="./%25" title="%" data-parsoid='{"stx":"simple","a":{"href":"./%25"},"sa":{"href":"%"}}'>%</a> <a rel="mw:WikiLink" href="./+" title="+" data-parsoid='{"stx":"simple","a":{"href":"./+"},"sa":{"href":"+"}}'>+</a> <figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-parsoid='{"optList":[{"ck":"bogus","ak":"foo"},{"ck":"caption","ak":"[[bar]]"}]}' data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"&lt;a rel=\"mw:WikiLink\" href=\"./Bar\" title=\"Bar\" data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"./Bar\"},\"sa\":{\"href\":\"bar\"},\"dsr\":[94,101,2,2]}&#39;>bar&lt;/a>"}'><a href="./File:%25+abc9" data-parsoid='{"a":{"href":"./File:%25+abc9"},"sa":{}}'><img resource="./File:%25+abc9" src="./Special:FilePath/%25+abc9" height="220" width="220" data-parsoid='{"a":{"resource":"./File:%25+abc9","height":"220","width":"220"},"sa":{"resource":"File:%+abc%39"}}'/></a></figure-inline>
+<a rel="mw:WikiLink" href="./3E" title="3E" data-parsoid='{"stx":"simple","a":{"href":"./3E"},"sa":{"href":"%33%45"}}'>3E</a> <a rel="mw:WikiLink" href="./3E+" title="3E+" data-parsoid='{"stx":"simple","a":{"href":"./3E+"},"sa":{"href":"%33%45+"}}'>3E+</a></p>
+!! end
+
+!! test
+Special characters in embedded file links (T29679)
+!! wikitext
+[[File:Contains & ampersand.jpg]]
+[[File:Does not exist.jpg|Title with & ampersand]]
+!! html/php
+<p><a href="/index.php?title=Special:Upload&amp;wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains &amp; ampersand.jpg">File:Contains &amp; ampersand.jpg</a>
+<a href="/index.php?title=Special:Upload&amp;wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with &amp; ampersand</a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}]}'><a href="./File:Contains_&amp;_ampersand.jpg"><img resource="./File:Contains_&amp;_ampersand.jpg" src="./Special:FilePath/Contains_&amp;_ampersand.jpg" height="220" width="220"/></a></figure-inline>
+<figure-inline class="mw-default-size" typeof="mw:Error mw:Image" data-mw='{"errors":[{"key":"apierror-filedoesnotexist","message":"This image does not exist."}],"caption":"Title with &amp;amp; ampersand"}'><a href="./File:Does_not_exist.jpg"><img resource="./File:Does_not_exist.jpg" src="./Special:FilePath/Does_not_exist.jpg" height="220" width="220"/></a></figure-inline></p>
+!! end
+
+!! test
+Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
+!! wikitext
+Text&apos;s been normalized?
+!! html
+<p>Text&#39;s been normalized?
+</p>
+!! end
+
+!! test
+T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
+!! wikitext
+http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
+!! html
+<p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> &lt;-- U+3000 (vim: ^Vu3000)
+</p>
+!! end
+
+!! test
+T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
+!! wikitext
+[http://www.example.org/ ideograms]
+!! html
+<p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
+</p>
+!! end
+
+!! test
+T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
+!! wikitext
+http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
+!! html
+<p><img src="http://www.example.org/pic.png" alt="pic.png"/> &lt;-- U+3000 (vim: ^Vu3000)
+</p>
+!! end
+
+!! article
+Mediawiki:loop1
+!! text
+{{Identical|A}}
+!! endarticle
+
+!! article
+Mediawiki:loop2
+!! text
+{{Identical|B}}
+!! endarticle
+
+!! article
+Template:Identical
+!! text
+{{int:loop1}}
+{{int:loop2}}
+!! endarticle
+
+!! test
+T33098 Template which includes system messages which includes the template
+!! wikitext
+{{Identical}}
+!! html
+<p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
+<span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
+</p>
+!! end
+
+!! test
+T33490 Turkish: ucfirst 'blah'
+!! options
+language=tr
+!! wikitext
+{{ucfirst:blah}}
+!! html
+<p>Blah
+</p>
+!! end
+
+!! test
+T33490 Turkish: ucfirst 'ix'
+!! options
+language=tr
+!! wikitext
+{{ucfirst:ix}}
+!! html
+<p>İx
+</p>
+!! end
+
+!! test
+T33490 Turkish: lcfirst 'BLAH'
+!! options
+language=tr
+!! wikitext
+{{lcfirst:BLAH}}
+!! html
+<p>bLAH
+</p>
+!! end
+
+!! test
+T33490 Turkish: ucfırst (with a dotless i)
+!! options
+language=tr
+!! wikitext
+{{ucfırst:blah}}
+!! html
+<p><a href="/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
+</p>
+!! end
+
+!! test
+T33490 ucfırst (with a dotless i) with English language
+!! options
+language=en
+!! wikitext
+{{ucfırst:blah}}
+!! html
+<p><a href="/index.php?title=Template:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
+</p>
+!! end
+
+# Note that Parsoid doesn't emit an explicit TOC.
+# Note also that the html2wt direction tends to emit an extra newline
+# between the __TOC__ magicword and the first heading unless *both*
+# the <meta> and the <h2> have a data-parsoid attribute set (even if
+# it's "{}").
+
+!! test
+T28375: TOC with italics
+!! options
+title=[[Main Page]]
+!! wikitext
+__TOC__
+==''Lost'' episodes==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Lost episodes">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
+!! end
+
+!! test
+T28375: TOC with bold
+!! options
+title=[[Main Page]]
+!! wikitext
+__TOC__
+=='''should be bold''' then normal text==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: should be bold then normal text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
+!! end
+
+!! test
+T35845: Headings become cursive in TOC when they contain an image
+!! options
+title=[[Main Page]]
+!! wikitext
+__TOC__
+==Image [[Image:foobar.jpg]]==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Image">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="Image" data-parsoid='{}'>Image <figure-inline class="mw-default-size" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></h2>
+!! end
+
+!! test
+T35845 (2): Headings become bold in TOC when they contain a blockquote
+!! options
+title=[[Main Page]]
+!! wikitext
+__TOC__
+==<blockquote>Quote</blockquote>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/php+tidy
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Quote"><blockquote><p>Quote</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Quote">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
+!! end
+
+!! test
+Unclosed tags in TOC
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+title=[[Main Page]]
+!! wikitext
+__TOC__
+==Proof: 2 < 3==
+<small>Hanc marginis exiguitas non caperet.</small>
+QED
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Proof:_2_&lt;_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 &lt; 3</span></a></li>
+</ul>
+</div>
+
+<h2><span id="Proof:_2_.3C_3"></span><span class="mw-headline" id="Proof:_2_&lt;_3">Proof: 2 &lt; 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Proof: 2 &lt; 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><small>Hanc marginis exiguitas non caperet.</small>
+QED
+</p>
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="Proof:_2_&lt;_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 &lt; 3</h2>
+<p><small>Hanc marginis exiguitas non caperet.</small>
+QED</p>
+!! end
+
+!! test
+Multiple tags in TOC
+!! wikitext
+__TOC__
+==<i>Foo</i> <b>Bar</b>==
+
+==<i>Foo</i> <blockquote>Bar</blockquote>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/php+tidy
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote><p>Bar</p></blockquote></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
+
+<h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
+!! end
+
+# Don't expect Parsoid to roundtrip this until the php parser comes closer to
+# html5 tag parsing.
+!! test
+Tags with parameters in TOC
+!! options
+parsoid=wt2html
+!! wikitext
+__TOC__
+==<sup class="in-h2">Hello</sup>==
+
+==<sup class="a > b">Evilbye</sup>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b"&gt;Evilbye</sup></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Hello">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="b.22.3EEvilbye"><sup class="a"> b"&gt;Evilbye</sup></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: b&quot;&gt;Evilbye">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" />
+<h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
+
+<h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
+!! end
+
+!! test
+span tags with directionality in TOC
+!! wikitext
+__TOC__
+==<span dir="ltr">C++</span>==
+
+==<span dir="rtl">זבנג!</span>==
+
+==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
+
+==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
+
+==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#C.2B.2B"><span class="tocnumber">1</span> <span class="toctext"><span dir="ltr">C++</span></span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#.D7.96.D7.91.D7.A0.D7.92.21"><span class="tocnumber">2</span> <span class="toctext"><span dir="rtl">זבנג!</span></span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">3</span> <span class="toctext"><span>The attributes on these span tags must be deleted from the TOC</span></span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">4</span> <span class="toctext"><span>All attributes on these span tags must be deleted from the TOC</span></span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: C++">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: זבנג!">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
+<h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
+<h2 id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></h2>
+<h2 id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></h2>
+<h2 id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></h2>
+!! end
+
+!! test
+T74884: bdi element in ToC
+!! wikitext
+__TOC__
+==<bdi>test</bdi>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="test"><bdi>test</bdi></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
+!! end
+
+!! test
+T35715: s/strike element in ToC
+!! wikitext
+__TOC__
+==<s>test</s> test <strike>test</strike>==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#test_test_test"><span class="tocnumber">1</span> <span class="toctext"><s>test</s> test <strike>test</strike></span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="test_test_test"><s>test</s> test <strike>test</strike></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: test test test">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
+!! end
+
+!! test
+Empty <p> tag in TOC, removed by Sanitizer (T92892)
+!! wikitext
+__TOC__
+==x==
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="x">x</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: x">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<meta property="mw:PageProp/toc" data-parsoid='{}'/>
+<h2 id="x" data-parsoid='{}'>x</h2>
+!! end
+
+!! article
+MediaWiki:T34057
+!! text
+== {{int:headline_sample}} ==
+!! endarticle
+
+!! test
+T34057: Title needed when expanding <h> nodes.
+!! options
+title=[[Main Page]]
+!! wikitext
+{{int:T34057}}
+!! html
+<h2><span class="mw-headline" id="Headline_text">Headline text</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Main_Page&amp;action=edit&amp;section=1" title="Edit section: Headline text">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+Strip marker in urlencode
+!! wikitext
+{{urlencode:x<nowiki/>y}}
+{{urlencode:x<nowiki/>y|wiki}}
+{{urlencode:x<nowiki/>y|path}}
+{{urlencode:x<pre id="one">two</pre>y}}
+!! html/php
+<p>xy
+xy
+xy
+xy
+</p>
+!! end
+
+!! test
+Strip marker in lc
+!! wikitext
+{{lc:x<nowiki/>y}}
+!! html
+<p>xy
+</p>
+!! end
+
+!! test
+Strip marker in uc
+!! wikitext
+{{uc:x<nowiki/>y}}
+!! html
+<p>XY
+</p>
+!! end
+
+!! test
+Strip marker in formatNum
+!! wikitext
+{{formatnum:1<nowiki/>2}}
+{{formatnum:1<nowiki/>2|R}}
+!! html
+<p>12
+12
+</p>
+!! end
+
+!! test
+Check noCommafy in formatNum
+!! options
+language=be-tarask
+!! wikitext
+{{formatnum:123456.78}}
+{{formatnum:123456.78|NOSEP}}
+!! html
+<p>123 456,78
+123456.78
+</p>
+!! end
+
+!! test
+Wrong option for formatNum (T58199)
+!! wikitext
+{{formatnum:1,234.56|Random}}
+{{formatnum:1,234.56|EVERYTHING}}
+{{formatnum:1234.56|any argument that has the string 'NOSEP'}}
+!! html
+<p>1,234.56
+1,234.56
+1,234.56
+</p>
+!! end
+
+!! test
+Strip marker in grammar
+!! options
+language=fi
+!! wikitext
+{{grammar:elative|foo<nowiki/>bar}}
+!! html
+<p>foobarista
+</p>
+!! end
+
+!! test
+Strip marker in padleft
+!! wikitext
+{{padleft:|2|x<nowiki/>y}}
+!! html
+<p>xy
+</p>
+!! end
+
+!! test
+Strip marker in padright
+!! wikitext
+{{padright:|2|x<nowiki/>y}}
+!! html
+<p>xy
+</p>
+!! end
+
+!! test
+Strip marker in anchorencode
+!! wikitext
+{{anchorencode:x<nowiki/>y}}
+!! html/php
+<p>xy
+</p>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:x&lt;nowiki/>y","function":"anchorencode"},"params":{},"i":0}}]}'>xy</p>
+!! end
+
+!! test
+nowiki inside link inside heading (T20295)
+!! wikitext
+==[[foo|x<nowiki>y</nowiki>z]]==
+!! html
+<h2><span class="mw-headline" id="xyz"><a href="/wiki/Foo" title="Foo">xyz</a></span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: xyz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+!! test
+new support for bdi element (T33817)
+!! wikitext
+<p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
+!! html
+<p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
+
+!!end
+
+!! test
+Ignore pipe between table row attributes
+!! wikitext
+{|
+|quux
+|- id=foo | style='color: red'
+|bar
+|}
+!! html
+<table>
+<tr>
+<td>quux
+</td></tr>
+<tr id="foo" style="color: red">
+<td>bar
+</td></tr></table>
+
+!! end
+
+!!test
+Language parser function
+!! wikitext
+{{#language:ar}}
+!! html
+<p>العربية
+</p>
+!! end
+
+!!test
+Padleft and padright (default 0-padding)
+!! wikitext
+{{padleft:xyz|5}}
+{{padright:xyz|5}}
+!! html/php
+<p>00xyz
+xyz00
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
+!! end
+
+!!test
+Padleft and padright (partial fill)
+!! wikitext
+{{padleft:xyz|6|ab}}
+{{padright:xyz|6|ab}}
+!! html/php
+<p>abaxyz
+xyzaba
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>abaxyz</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>xyzaba</span></p>
+!! end
+
+!!test
+Padleft and padright as substr
+!! wikitext
+{{padleft:|3|abcde}}
+{{padright:|3|abcde}}
+!! html/php
+<p>abc
+abc
+</p>
+!! html/parsoid
+<p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:","function":"padleft"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span>
+<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:","function":"padright"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span></p>
+!! end
+
+!! test
+Padleft and padright with non-numerical length (T180403)
+!! wikitext
+{{padleft:abcdef|junk}}
+{{padright:abcdef|junk}}
+!! html/php
+<p>abcdef
+abcdef
+</p>
+!! end
+
+!!test
+Special parser function
+!! wikitext
+{{#special:RandomPage}}
+{{#special:BaDtItLe}}
+{{#special:Foobar}}
+!! html
+<p>Special:Random
+Special:Badtitle
+Special:Foobar
+</p>
+!! end
+
+!!test
+T36939 - Case insensitive link parsing ([HttP://])
+!! wikitext
+[HttP://MediaWiki.Org/]
+!! html/php
+<p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
+!! end
+
+!!test
+T36939 - Case insensitive link parsing ([HttP:// title])
+!! wikitext
+[HttP://MediaWiki.Org/ MediaWiki]
+!! html
+<p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
+</p>
+!! end
+
+!!test
+T36939 - Case insensitive link parsing (HttP://)
+!! wikitext
+HttP://MediaWiki.Org/
+!! html/php
+<p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
+!! end
+
+!!test
+Disable TOC
+!! options
+notoc
+!! wikitext
+Lead
+==Section 1==
+==Section 2==
+==Section 3==
+==Section 4==
+==Section 5==
+!! html
+<p>Lead
+</p>
+
+<h2><span class="mw-headline" id="Section_1">Section 1</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_2">Section 2</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 2">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_3">Section 3</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 3">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_4">Section 4</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Section 4">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Section_5">Section 5</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: Section 5">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! end
+
+
+###
+### Parsoid-specific tests
+### Parsoid-PHP parser incompatibilities
+###
+!!test
+1. SOL-sensitive wikitext tokens as template-args
+!!options
+parsoid=wt2html,wt2wt
+!! wikitext
+{{echo|*a}}
+{{echo|#a}}
+{{echo|:a}}
+!! html
+<span about="#mwt1" typeof="mw:Transclusion">
+</span><ul about="#mwt1"><li>a</li>
+</ul>
+<span about="#mwt2" typeof="mw:Transclusion">
+</span><ol about="#mwt2"><li>a</li>
+</ol>
+<span about="#mwt3" typeof="mw:Transclusion">
+</span><dl about="#mwt3"><dd>a</dd>
+</dl>
+!!end
+
+#### -----------------------------------------------------------------
+#### Parsoid-specific functionality tests
+#### -----------------------------------------------------------------
+
+# T65642/T68749: Formatting elt fixup around images is cleaned up.
+# We know wt2wt will fail, but we expect selser to pass.
+# Due to the nature of our testing, wt2wt and selser tests will enter the
+# blacklist and we'll catch selser regressions based on changes to the
+# blacklist entries for selser tests.
+!! test
+1. Bad treebuilder fixup of formatting elt is cleaned up
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+{|
+|
+<small>
+[[Image:Foobar.jpg|right|Test]]
+</small>
+|}
+!! html/parsoid
+<table>
+<tbody><tr><td>
+<small>
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Test</figcaption></figure>
+</small>
+</td></tr>
+</tbody></table>
+!! end
+
+!! test
+2. Bad treebuilder fixup of formatting elt is cleaned up
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+'''foo[[File:Foobar.jpg|thumb|caption]]bar'''
+
+<small>[[Image:Foobar.jpg|right|300px]]</small>
+!! html/parsoid
+
+<p><b>foo</b></p>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><b>caption</b></figcaption></figure>
+<p><b>bar</b></p>
+<small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small>
+!! end
+
+!! test
+3. Bad treebuilder fixup of formatting elt is cleaned up
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+<small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
+!! html/parsoid
+<p><small><b>foo</b></small></p>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><small><b>caption</b></small></figcaption></figure>
+<p><small><b>bar</b></small></p>
+!! end
+
+!! test
+4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+'''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
+!! html/parsoid
+<b><small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small></b>
+!! end
+
+#### ----------------------------------------------------------------
+#### Parsoid-only testing of Parsoid's impl of LST
+#### Not implemented yet, see
+#### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
+#### ----------------------------------------------------------------
+
+## We still need to support serializing the older format while content is stored.
+!! test
+LST Sections: Backwards compatibility
+!! options
+parsoid={
+ "suppressErrors": true,
+ "modes": ["html2wt"]
+}
+!! wikitext
+<section begin="2011-05-16" />
+<section end="2014-04-10 (MW 1.23wmf22)" />
+!! html/parsoid
+<p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
+<meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
+!! end
+
+!! test
+LST Sections: Newfangled approach
+!! wikitext
+<section begin="2011-05-16" />
+<section end="2014-04-10 (MW 1.23wmf22)" />
+!! html/parsoid
+<p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
+</span>
+<span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
+</span></p>
+!! end
+
+#--------- Test stripping of empty nodes in template content ----------
+
+!! test
+Empty LI and TR nodes should be stripped from template content
+!! wikitext
+{{EmptyLITest}}
+{{EmptyTRTest}}
+!! html/parsoid
+<ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
+<li>a</li>
+<li>b</li>
+</ul>
+<table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
+<tbody>
+<tr>
+<td>foo</td>
+</tr>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!! end
+
+!! test
+Empty LI and TR nodes should not be stripped from top-level content
+!! wikitext
+* a
+*
+* b
+
+{|
+|-
+|-
+|foo
+|}
+!! html/parsoid
+<ul>
+<li> a</li>
+<li class='mw-empty-elt'></li>
+<li> b</li>
+</ul>
+<table>
+<tbody>
+<tr class='mw-empty-elt'></tr>
+<tr>
+<td>foo</td>
+</tr>
+</tbody>
+</table>
+!! end
+
+!! test
+Empty TR nodes should not be stripped if they have any attributes set
+!! wikitext
+{{EmptyTRWithHTMLAttrTest}}
+!! html/parsoid
+<table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
+<tr align='center'></tr>
+<tr><td>foo</td></tr>
+<tr align='center'></tr>
+<tr><td>bar</td></tr>
+</table>
+!! end
+
+#### ----------------------------------------------------------------
+#### The following section of tests are primarily to test
+#### wikitext escaping capabilities of Parsoid. Given that
+#### escaping can be done any number of ways, the wikitext (input)
+#### is always adjusted to reflect how Parsoid adds nowiki
+#### escape tags.
+####
+#### We are marking several tests as parsoid-only since the
+#### HTML in the result section is different from what the
+#### PHP parser generates for it.
+#### ----------------------------------------------------------------
+
+
+#### --------------- Headings ---------------
+#### 0. Unnested
+#### 1. Nested inside html <h1>=foo=</h1>
+#### 2. Outside heading nest on a single line <h1>foo</h1>*bar
+#### 3. Nested inside html with wikitext split by html tags
+#### 4. No escape needed
+#### 5. Empty headings <h1></h1>
+#### 6. Heading chars in SOL context
+#### ----------------------------------------
+!! test
+Headings: 0. Unnested
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>=foo=</p>
+
+<p> =foo=
+<!--cmt-->
+=foo=</p>
+
+<p>=foo<i>a</i>=</p>
+!! wikitext
+<nowiki>=foo=</nowiki>
+
+<nowiki> </nowiki>=foo=
+<!--cmt-->
+<nowiki>=foo=</nowiki>
+
+=foo''a''<nowiki>=</nowiki>
+!!end
+
+# New headings and existing headings are handled differently
+!! test
+Headings: 1. Nested inside html
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h1>=foo=</h1>
+<h2>=foo=</h2>
+<h3>=foo=</h3>
+
+<h1 data-parsoid=''>=foo=</h1>
+<h2 data-parsoid=''>=foo=</h2>
+<h3 data-parsoid=''>=foo=</h3>
+<h4 data-parsoid=''>=foo=</h4>
+<h5 data-parsoid=''>=foo=</h5>
+<h6 data-parsoid=''>=foo=</h6>
+!! wikitext
+= =foo= =
+
+== =foo= ==
+
+=== =foo= ===
+
+=<nowiki>=foo=</nowiki>=
+==<nowiki>=foo=</nowiki>==
+===<nowiki>=foo=</nowiki>===
+====<nowiki>=foo=</nowiki>====
+=====<nowiki>=foo=</nowiki>=====
+======<nowiki>=foo=</nowiki>======
+
+!!end
+
+!! test
+Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h1>foo</h1>*bar
+<h1>foo</h1>=bar
+<h1>foo</h1>=bar=
+!! wikitext
+= foo =
+<nowiki>*</nowiki>bar
+
+= foo =
+=bar
+
+= foo =
+<nowiki>=bar=</nowiki>
+!!end
+
+!! test
+Headings: 3. Nested inside html with wikitext split by html tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h1>=<b>bold</b>foo=</h1>
+!! wikitext
+= ='''bold'''foo= =
+!!end
+
+!! test
+Headings: 4a. No escaping needed (testing just h1 and h2)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h1>=foo</h1>
+<h1>foo=</h1>
+<h1> =foo= </h1>
+<h1>=foo= bar</h1>
+<h2>=foo</h2>
+<h2>foo=</h2>
+<h1>=</h1>
+<h1><i>=</i>foo=</h1>
+!! wikitext
+= =foo =
+
+= foo= =
+
+= =foo= =
+
+= =foo= bar =
+
+== =foo ==
+
+== foo= ==
+
+= = =
+
+= ''=''foo= =
+!!end
+
+!! test
+Headings: 4b. No escaping needed (inside p-tags)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>=foo= x
+=foo= <s></s>
+</p>
+!! wikitext
+=foo= x
+=foo= <s></s>
+!! html/php
+<p>=foo= x
+=foo= <s></s>
+</p>
+!!end
+
+!! test
+Headings: 4c. Short headings (1)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>===
+</p>
+!! wikitext
+<nowiki>===</nowiki>
+!! html/php
+<p>===
+</p>
+!! end
+
+# in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
+!! test
+Headings: 4d. Short headings (2)
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+=
+==
+===
+====
+=====
+!! html/php
+<p>=
+==
+</p>
+<h1><span class="mw-headline" id=".3D">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h1><span class="mw-headline" id=".3D.3D">==</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: ==">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
+<h2><span class="mw-headline" id=".3D_2">=</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+
+!! html/parsoid
+<p>=
+==</p>
+<h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
+<h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
+<h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
+!! end
+
+!! test
+Headings: 5. Empty headings
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h1 data-parsoid='{}'></h1>
+
+<h2 data-parsoid='{}'></h2>
+
+<h3 data-parsoid='{}'></h3>
+
+<h4 data-parsoid='{}'></h4>
+
+<h5 data-parsoid='{}'></h5>
+
+<h6 data-parsoid='{}'></h6>
+!! wikitext
+=<nowiki/>=
+
+==<nowiki/>==
+
+===<nowiki/>===
+
+====<nowiki/>====
+
+=====<nowiki/>=====
+
+======<nowiki/>======
+!!end
+
+!! test
+Headings: 6a. Heading chars in SOL context (with trailing spaces)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>=a=</p>
+
+<p>=a=</p>
+
+<p>=a=</p>
+!! wikitext
+<nowiki>=a=</nowiki>
+
+<nowiki>=a=</nowiki>
+
+<nowiki>=a=</nowiki>
+!!end
+
+!! test
+Headings: 6b. Heading chars in SOL context (with trailing newlines)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>=a=
+b</p>
+
+<p>=a=
+b</p>
+
+<p>=a=
+b</p>
+!! wikitext
+<nowiki>=a=</nowiki>
+b
+
+<nowiki>=a=</nowiki>
+b
+
+<nowiki>=a=</nowiki>
+b
+!!end
+
+!! test
+Headings: 6c. Heading chars in SOL context (leading newline break)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>a
+=b=</p>
+!! wikitext
+a
+<nowiki>=b=</nowiki>
+!!end
+
+!! test
+Headings: 6d. Heading chars in SOL context (with interspersed comments)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<!--c0--><p>=a=</p>
+
+<!--c1--><p>=a=</p> <!--c2--> <!--c3-->
+!! wikitext
+<!--c0--><nowiki>=a=</nowiki>
+
+<!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
+!!end
+
+!! test
+Headings: 6d. Heading chars in SOL context (No escaping needed)
+!! options
+parsoid=html2wt
+!! html/parsoid
+=a=<div>b</div>
+!! wikitext
+=a=<div>b</div>
+!!end
+
+!! test
+Headings: 7. Insert a newline between new content and headings
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h2>NEW</h2>
+<p>new</p>
+<h2 data-parsoid='{}'>A</h2>
+<p data-parsoid='{}'>a</p>
+!! wikitext
+== NEW ==
+new
+
+==A==
+a
+
+!! end
+
+!! test
+Headings: Used as horizontal rule
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! options
+parsoid=wt2html
+!! wikitext
+===============
+!! html/php
+<h6><span id=".3D.3D.3D"></span><span class="mw-headline" id="===">===</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: ===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
+
+!! html/parsoid
+<h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
+!! end
+
+#### --------------- Lists ---------------
+#### 0. Outside nests (*foo, etc.)
+#### 1. Nested inside html <ul><li>*foo</li></ul>
+#### 2. Inside definition lists
+#### 3. Only bullets at start should be escaped
+#### 4. No escapes needed
+#### 5. No unnecessary escapes
+#### 6. Escape bullets in SOL position
+#### 7. Escape bullets in a multi-line context
+#### ----------------------------------------
+
+!! test
+Lists: 0. Outside nests
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>*foo</p>
+
+<p>#foo</p>
+
+<p>;Foo:bar</p>
+!! wikitext
+<nowiki>*</nowiki>foo
+
+<nowiki>#</nowiki>foo
+
+<nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
+!!end
+
+## Making these next 3 tests Parsoid-only since they are html2wt tests
+## to test wikitext escaping, and insignificant whitespace diffs
+## cause PHP parser tests to barf
+!! test
+Lists: 1. Nested inside html (No unnecessary escapes)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul>
+<li>*foo</li>
+<li>#foo</li>
+<li>:foo</li>
+<li>;foo</li>
+<li data-parsoid='{}'>*foo</li>
+<li data-parsoid='{}'>#foo</li>
+<li data-parsoid='{}'>:foo</li>
+<li data-parsoid='{}'>;foo</li>
+</ul>
+
+<ol>
+<li>*foo</li>
+<li>#foo</li>
+<li>:foo</li>
+<li>;foo</li>
+<li data-parsoid='{}'>*foo</li>
+<li data-parsoid='{}'>#foo</li>
+<li data-parsoid='{}'>:foo</li>
+<li data-parsoid='{}'>;foo</li>
+</ol>
+!! wikitext
+* *foo
+* #foo
+* :foo
+* ;foo
+*<nowiki>*foo</nowiki>
+*<nowiki>#foo</nowiki>
+*<nowiki>:foo</nowiki>
+*<nowiki>;foo</nowiki>
+
+# *foo
+# #foo
+# :foo
+# ;foo
+#<nowiki>*foo</nowiki>
+#<nowiki>#foo</nowiki>
+#<nowiki>:foo</nowiki>
+#<nowiki>;foo</nowiki>
+!!end
+
+!! test
+Lists: 2. Inside definition lists
+!! options
+parsoid=html2wt
+!! html/parsoid
+<dl><dt>;foo</dt></dl>
+<dl><dt>:foo</dt></dl>
+<dl><dt>:foo</dt>
+<dd>bar</dd></dl>
+<dl><dd>:foo</dd></dl>
+!! wikitext
+; ;foo
+
+; <nowiki>:foo</nowiki>
+
+; <nowiki>:foo</nowiki>
+: bar
+
+: :foo
+!!end
+
+!! test
+Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul>
+<li>*foo*bar</li>
+<li data-parsoid='{}'>*foo<i>it</i>*bar</li>
+</ul>
+!! wikitext
+* *foo*bar
+*<nowiki>*foo</nowiki>''it''*bar
+!!end
+
+!! test
+Lists: 4. No escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul>
+<li>foo*bar
+</li>
+</ul>
+<ul>
+<li><i>foo</i>*bar
+</li>
+</ul>
+<ul>
+<li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
+</li>
+</ul>
+<ul>
+<li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
+</li>
+</ul>
+!! wikitext
+*foo*bar
+
+*''foo''*bar
+
+*[[Foo]]: bar
+
+*[[Foo]]*bar
+!!end
+
+!! test
+Lists: 5. No unnecessary escapes
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul><li> bar <span>[[foo]]</span></li></ul>
+<ul><li> =bar <span>[[foo]]</span></li></ul>
+<ul><li> [[bar <span>[[foo]]</span></li></ul>
+<ul><li> ]]bar <span>[[foo]]</span></li></ul>
+<ul><li> =bar <span>foo]]</span>=</li></ul>
+<ul><li> <s></s>: a</li></ul>
+<ul><li> <i>* foo</i></li></ul>
+
+!! wikitext
+* bar <span><nowiki>[[foo]]</nowiki></span>
+
+* =bar <span><nowiki>[[foo]]</nowiki></span>
+
+* [[bar <span><nowiki>[[foo]]</nowiki></span>
+
+* ]]bar <span><nowiki>[[foo]]</nowiki></span>
+
+* =bar <span>foo]]</span>=
+
+* <s></s>: a
+
+* ''* foo''
+!!end
+
+!! test
+Lists: 6. Escape bullets in SOL position
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><!--cmt-->*foo</p>
+!! wikitext
+<!--cmt--><nowiki>*</nowiki>foo
+!!end
+
+!! test
+Lists: 7. Escape bullets in a multi-line context
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>a
+*b
+</p>
+!! wikitext
+a
+<nowiki>*</nowiki>b
+!!end
+
+!! test
+Lists: 8. Escape colons only if not present in tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<dl><dt>a:b<i>c:d</i></dt></dl>
+!! wikitext
+; <nowiki>a:b</nowiki>''c:d''
+!! end
+
+#### --------------- HRs ---------------
+#### 1. Single line
+#### -----------------------------------
+
+!! test
+HRs: 1. Single line
+!! options
+parsoid=html2wt
+!! html/parsoid
+<hr />----
+<hr />=foo=
+<hr />*foo
+!! wikitext
+----<nowiki>----</nowiki>
+----=foo=
+----*foo
+!! end
+
+#### --------------- Tables ---------------
+#### 1a. Simple example
+#### 1b. No escaping needed (!foo)
+#### 1c. No escaping needed (|foo)
+#### 1d. No escaping needed (|}foo)
+####
+#### 2a. Nested in td (<td>foo|bar</td>)
+#### 2b. Nested in td (<td>foo||bar</td>)
+#### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
+####
+#### 3a. Nested in th (<th>foo!bar</th>)
+#### 3b. Nested in th (<th>foo!!bar</th>)
+#### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
+####
+#### 4a. Escape -
+#### 4b. Escape +
+#### 4c. No escaping needed
+#### --------------------------------------
+
+!! test
+Tables: 1a. Simple example
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>{|
+|}
+</p>
+!! wikitext
+<nowiki>{|</nowiki>
+|}
+!! end
+
+!! test
+Tables: 1b. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>!foo
+</p>
+!! wikitext
+!foo
+!! end
+
+!! test
+Tables: 1c. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>|foo
+</p>
+!! wikitext
+|foo
+!! end
+
+!! test
+Tables: 1d. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>|}foo
+</p>
+!! wikitext
+|}foo
+!! end
+
+!! test
+Tables: 2a. Nested in td
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody><tr>
+<td>foo|bar</td></tr>
+<tr><td>x<div>a|b</div></td>
+</tbody></table>
+!! wikitext
+{|
+|<nowiki>foo|bar</nowiki>
+|-
+|x<div><nowiki>a|b</nowiki></div>
+|}
+!! html/php+tidy
+<table>
+<tbody><tr>
+<td>foo|bar
+</td></tr>
+<tr>
+<td>x<div>a|b</div>
+</td></tr></tbody></table>
+!! end
+
+!! test
+Tables: 2b. Nested in td
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody><tr>
+<td>foo||bar</td>
+<td>a<i>b||c</i></td>
+<td>a<i><div>b||c</div></i></td>
+</tr></tbody></table>
+!! wikitext
+{|
+|<nowiki>foo||bar</nowiki>
+|a''<nowiki>b||c</nowiki>''
+|a''<div><nowiki>b||c</nowiki></div>''
+|}
+!! html/php
+<table>
+<tr>
+<td>foo||bar
+</td>
+<td>a<i>b||c</i>
+</td>
+<td>a<i><div>b||c</div></i>
+</td></tr></table>
+
+!! end
+
+!! test
+Tables: 2c. Nested in td -- no escaping needed
+!! options
+parsoid=html2wt
+!! html/*
+<table>
+<tr>
+<td>foo!!bar
+</td></tr></table>
+
+!! wikitext
+{|
+|foo!!bar
+|}
+!! end
+
+!! test
+Tables: 3a. Nested in th
+!! options
+parsoid=html2wt
+!! html/*
+<table>
+<tr>
+<th>foo!bar
+</th></tr></table>
+
+!! wikitext
+{|
+!foo!bar
+|}
+!! end
+
+!! test
+Tables: 3b. Nested in th
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody>
+<tr><th>foo!!bar</th>
+<th><i>foo|bar</i></th>
+<th><i>foo!!bar</i></th>
+<th><i><span>foo!!bar</span></i></th>
+</tr></tbody></table>
+!! wikitext
+{|
+!<nowiki>foo!!bar</nowiki>
+!''<nowiki>foo|bar</nowiki>''
+!''<nowiki>foo!!bar</nowiki>''
+!''<span><nowiki>foo!!bar</nowiki></span>''
+|}
+!! html/php
+<table>
+<tr>
+<th>foo!!bar
+</th>
+<th><i>foo|bar</i>
+</th>
+<th><i>foo!!bar</i>
+</th>
+<th><i><span>foo!!bar</span></i>
+</th></tr></table>
+
+!! end
+
+!! test
+Tables: 3c. Nested in th
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody>
+<tr><th>foo||bar</th>
+<th><span typeof="mw:Nowiki">foo||bar</span></th>
+</tr></tbody></table>
+!! wikitext
+{|
+!<nowiki>foo||bar</nowiki>
+!<nowiki>foo||bar</nowiki>
+|}
+!! html/php
+<table>
+<tr>
+<th>foo||bar
+</th>
+<th>foo||bar
+</th></tr></table>
+
+!! end
+
+!! test
+Tables: 4a. Escape -
+!! options
+parsoid=html2wt
+!! html/*
+<table>
+<tr>
+<th>-bar
+</th></tr>
+<tr>
+<td>-bar
+</td></tr></table>
+
+!! wikitext
+{|
+!-bar
+|-
+|<nowiki>-bar</nowiki>
+|}
+!! end
+
+!! test
+Tables: 4b. Escape +
+!! options
+parsoid=html2wt
+!! html/*
+<table>
+<tr>
+<th>+bar
+</th></tr>
+<tr>
+<td>+bar
+</td></tr></table>
+
+!! wikitext
+{|
+!+bar
+|-
+|<nowiki>+bar</nowiki>
+|}
+!! end
+
+!! test
+Tables: 4c. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tbody>
+<tr><td>foo-bar</td><td>foo+bar</td></tr>
+<tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
+<tr><td>foo
+<p>bar|baz
++bar
+-bar</p></td></tr>
+<tr><td>x
+<div>a|b</div></td>
+</tbody></table>
+!! wikitext
+{|
+|foo-bar
+|foo+bar
+|-
+|''foo''-bar
+|''foo''+bar
+|-
+|foo
+bar|baz
++bar
+-bar
+|-
+|x
+<div>a|b</div>
+|}
+!! html/php
+<table>
+<tr>
+<td>foo-bar
+</td>
+<td>foo+bar
+</td></tr>
+<tr>
+<td><i>foo</i>-bar
+</td>
+<td><i>foo</i>+bar
+</td></tr>
+<tr>
+<td>foo
+<p>bar|baz
++bar
+-bar
+</p>
+</td></tr>
+<tr>
+<td>x
+<div>a|b</div>
+</td></tr></table>
+
+!! end
+
+!! test
+Tables: 4d. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+<tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
+<td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
+<td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
+</tbody></table>
+!! wikitext
+{|
+|[[Foo]]-bar
+||+1
+||-2
+|}
+!! html/php
+<table>
+<tr>
+<td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
+</td>
+<td>+1
+</td>
+<td>-2
+</td></tr></table>
+
+!! end
+
+!! test
+T97430: Don't emit empty nowiki pairs around marker meta tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
+|** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
+!! wikitext
+<nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
+|** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
+!! end
+
+!! test
+Unclosed xmlish element in table line shouldn't eat end delimiters
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+<tbody><tr><td> &lt;foo</td>
+<td> bar></td></tr>
+</tbody></table>
+!! wikitext
+{|
+| <foo
+| bar>
+|}
+!! html/php
+<table>
+<tr>
+<td>&lt;foo
+</td>
+<td>bar&gt;
+</td></tr></table>
+
+!! end
+
+#### --------------- Links ----------------
+#### 1. Quote marks in link text
+#### 2. Wikilinks: Escapes needed
+#### 3. Wikilinks: No escapes needed
+#### 4. Extlinks: Escapes needed
+#### 5. Extlinks: No escapes needed
+#### --------------------------------------
+!! test
+Links 1. WikiLinks: No escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
+<a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
+<a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
+!! wikitext
+[[Foo|Foo''boo'']]
+[[Foo|[Foobar]]]
+[[Foo|x [Foobar] x]]
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
+<a href="/wiki/Foo" title="Foo">[Foobar]</a>
+<a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
+</p>
+!! end
+
+!! test
+Links 2. WikiLinks: Escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href="Foo" rel="mw:WikiLink">Foobar]</a>
+<a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
+<a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
+<a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
+<a href="Foo" rel="mw:WikiLink">|Bar</a>
+<a href="Foo" rel="mw:WikiLink">]]bar</a>
+<a href="Foo" rel="mw:WikiLink">[[bar</a>
+<a href="Foo" rel="mw:WikiLink">x [[ y</a>
+<a href="Foo" rel="mw:WikiLink">x ]] y</a>
+<a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
+!! wikitext
+[[Foo|<nowiki>Foobar]</nowiki>]]
+[[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
+[[Foo|<nowiki>[[Bar]]</nowiki>]]
+[[Foo|<nowiki>x [[Bar]] x</nowiki>]]
+[[Foo|<nowiki>|Bar</nowiki>]]
+[[Foo|<nowiki>]]bar</nowiki>]]
+[[Foo|<nowiki>[[bar</nowiki>]]
+[[Foo|<nowiki>x [[ y</nowiki>]]
+[[Foo|<nowiki>x ]] y</nowiki>]]
+[[Foo|<nowiki>x ]] y [[ z</nowiki>]]
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">Foobar]</a>
+<a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
+<a href="/wiki/Foo" title="Foo">[[Bar]]</a>
+<a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
+<a href="/wiki/Foo" title="Foo">|Bar</a>
+<a href="/wiki/Foo" title="Foo">]]bar</a>
+<a href="/wiki/Foo" title="Foo">[[bar</a>
+<a href="/wiki/Foo" title="Foo">x [[ y</a>
+<a href="/wiki/Foo" title="Foo">x ]] y</a>
+<a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
+</p>
+!! end
+
+!! test
+Links 3. WikiLinks: No escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
+<a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
+!! wikitext
+[[Foo|[Foobar]]
+[[Foo|foo|bar]]
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">[Foobar</a>
+<a href="/wiki/Foo" title="Foo">foo|bar</a>
+</p>
+!! end
+
+!! test
+Links 4. ExtLinks: Escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
+<a rel="mw:ExtLink" href="http://google.com">google]</a>
+<a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
+<p>[http://google.com]</p>
+<p>[http://google.com google]</p>
+<p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
+<p>[<a rel="mw:ExtLink" href="http://google.com" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://google.com"}},"i":0}}]}'>http://google.com</a>]</p>
+!! wikitext
+[http://google.com <nowiki>[google]</nowiki>]
+[http://google.com <nowiki>google]</nowiki>]
+[http://google.com <nowiki>goog] le</nowiki>]
+
+<nowiki>[http://google.com]</nowiki>
+
+<nowiki>[http://google.com google]</nowiki>
+
+[http://google.com<nowiki>]</nowiki>
+
+[{{echo|http://google.com}}<nowiki>]</nowiki>
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
+<a rel="nofollow" class="external text" href="http://google.com">google]</a>
+<a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
+</p><p>[http://google.com]
+</p><p>[http://google.com google]
+</p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
+</p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
+</p>
+!! end
+
+!! test
+Links 5. ExtLinks: No escapes needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
+<p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
+!! wikitext
+[http://google.com [google]
+
+[[http://google.com]]
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
+</p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
+</p>
+!! end
+
+!! test
+Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&amp;x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
+<a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
+</p>
+!! wikitext
+x<nowiki/>http://example.com<nowiki/>y
+http://example.com<nowiki/>?x
+http://example.com<nowiki/>&x
+http://example.com<nowiki/>'x
+http://example.com<nowiki/>,x
+http://example.com<nowiki/>.x
+http://example.com<nowiki/>;x
+http://example.com<nowiki/>:x
+http://example.com<nowiki/>;x
+http://example.com<nowiki/>!x
+http://example.com<nowiki/>=x
+http://example.com<nowiki/>(x)
+http://example.com(x<nowiki/>)
+!! end
+
+!! test
+Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>x
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
+y
+"<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
+(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
+(<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
+<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
+</p>
+!! wikitext
+x
+http://example.com
+y
+"http://example.com"
+(http://example.com)
+(http://example.com) foo
+http://example.com,
+http://example.com, foo
+!! html/php
+<p>x
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
+y
+"<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
+(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
+(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
+<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
+</p>
+!! end
+
+!! test
+Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
+-<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
+!! wikitext
+http://example.com.,;:!?\
+-http://example.com:
+!! html/php
+<p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
+-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
+</p>
+!! end
+
+!! test
+Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
+<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
+X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
+!! wikitext
+RFC 123<nowiki/>4
+RFC 123<nowiki/>y
+X<nowiki/>RFC 123<nowiki/>y
+!! end
+
+!! test
+Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
+<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&amp;foo
+-<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
+</p>
+!! wikitext
+RFC 123?foo
+RFC 123&foo
+-RFC 123-
+!! html/php
+<p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
+<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&amp;foo
+-<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
+</p>
+!! end
+
+!! test
+Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
+<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
+X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
+!! wikitext
+PMID 123<nowiki/>4
+PMID 123<nowiki/>y
+X<nowiki/>PMID 123<nowiki/>y
+!! end
+
+!! test
+Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
+<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
+-<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
+</p>
+!! wikitext
+PMID 123?foo
+PMID 123&foo
+-PMID 123-
+!! html/php
+<p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
+<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&amp;foo
+-<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
+</p>
+!! end
+
+!! test
+Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
+<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
+a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
+</p>
+!! wikitext
+ISBN 1234567890<nowiki/>1
+ISBN 1234567890<nowiki/>x
+a<nowiki/>ISBN 1234567890<nowiki/>b
+!! end
+
+!! test
+Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
+!! wikitext
+-ISBN 1234567890's
+!! html/php
+<p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
+</p>
+!! end
+
+!! test
+Links 14. Protect link-like plain text. (Parsoid bug T78425)
+!! options
+parsoid=html2wt
+!! html/*
+<p>this is not a link: http://example.com
+</p>
+!! wikitext
+this is not a link: <nowiki>http://example.com</nowiki>
+!! end
+
+!! test
+Links 15. Link trails can't become link prefixes.
+!! options
+language=is
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="Söfnuður" title="Söfnuður" data-parsoid='{"stx":"simple","tail":"-"}'>Söfnuður-</a><a rel="mw:WikiLink" href="00" title="00">00</a></p>
+!! wikitext
+[[Söfnuður]]-[[00]]
+!! html/php
+<p><a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">Söfnuður-</a><a href="/wiki/00" title="00">00</a>
+</p>
+!! end
+
+#### --------------- Quotes ---------------
+#### 1. Quotes inside <b> and <i>
+#### 2. Link fragments separated by <i> and <b> tags
+#### 3. Link fragments inside <i> and <b>
+#### 4. No escaping needed
+#### --------------------------------------
+!! test
+1a. Quotes inside <b> and <i>
+!! options
+parsoid=html2wt
+!! html/*
+<p><i>'foo'</i>
+<i>''foo''</i>
+<i>'''foo'''</i>
+<i>foo</i>'s
+<b>'foo'</b>
+<b>''foo''</b>
+<b>'''foo'''</b>
+<b>foo'<i>bar'</i>baz</b>
+<b>foo</b>'s
+'<i>foo</i>
+<i>foo</i>'
+<i>foo'</i>'
+'<i>foo</i>'
+'<b>foo</b>
+<b>foo</b>'
+'<b>foo</b>'
+<i>fools'<span> errand</span></i>
+<i><span>fool</span>'s errand</i>
+'<i>foo</i> bar '<i>baz</i>
+a|!*#-:;+-~[]{}b'<i>x</i>
+</p>
+!! wikitext
+''<nowiki/>'foo'''
+''<nowiki>''foo''</nowiki>''
+''<nowiki>'''foo'''</nowiki>''
+''foo''<nowiki/>'s
+'''<nowiki/>'foo''''
+'''<nowiki>''foo''</nowiki>'''
+'''<nowiki>'''foo'''</nowiki>'''
+'''foo'<nowiki/>''bar'<nowiki/>''baz'''
+'''foo'''<nowiki/>'s
+'''foo''
+''foo''<nowiki/>'
+''foo'''<nowiki/>'
+'''foo''<nowiki/>'
+''''foo'''
+'''foo'''<nowiki/>'
+''''foo'''<nowiki/>'
+''fools'<span> errand</span>''
+''<span>fool</span>'s errand''
+'<nowiki/>''foo'' bar '''baz''
+a|!*#-:;+-~[]{}b'''x''
+!! end
+
+!! test
+1b. Quotes inside <b> and <i> with other tags on same line
+!! options
+parsoid=html2wt
+!! html/parsoid
+'<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
+<i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
+<i>a'</i> foo <b><a rel="mw:WikiLink" href="Bar" title="Bar" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[bar]]"}},"i":0}}]}'>bar</a></b>
+<a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
+'<i>foo</i> <span class="mw-ref" id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
+'<i>foo</i> <div title="name">test</div>
+'<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
+<li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">test</span></li>
+</ol>
+!! wikitext
+'''a'' foo ''[[bar]]''
+''a''' foo ''[[bar]]''
+''a''' foo '''{{echo|[[bar]]}}'''
+[[foo]] x'''[[bar]]''
+'''foo'' <ref>test</ref>
+'''foo'' <div title="name">test</div>
+'''foo'' and <br> bar
+<references />
+!! end
+
+!! test
+2. Link fragments separated by <i> and <b> tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>[[<i>foo</i>hello]]</p>
+<p>[[<b>foo</b>hello]]</p>
+!! wikitext
+[[''foo''<nowiki>hello]]</nowiki>
+
+[['''foo'''<nowiki>hello]]</nowiki>
+!! end
+
+# FIXME: Escaping one or both of [[ and ]] is also acceptable --
+# this is one of the shortcomings of this format
+!! test
+3. Link fragments inside <i> and <b>
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><i>[[foo</i>]]</p>
+<p><b>[[foo</b>]]</p>
+!! wikitext
+''[[foo''<nowiki>]]</nowiki>
+
+'''[[foo'''<nowiki>]]</nowiki>
+!! end
+
+!! test
+4. No escaping needed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>'<span><i>bar</i></span>'
+'<span><b>bar</b></span>'
+'a:b'foo
+</p>
+!! wikitext
+'<span>''bar''</span>'
+'<span>'''bar'''</span>'
+'a:b'foo
+!! end
+
+#### ----------- Paragraphs ---------------
+#### 1. No unnecessary escapes
+#### --------------------------------------
+
+!! test
+1. No unnecessary escapes
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>bar <span>[[foo]]</span>
+</p><p>=bar <span>[[foo]]</span>
+</p><p>[[bar <span>[[foo]]</span>
+</p><p>]]bar <span>[[foo]]</span>
+</p><p>=bar <span>foo]]</span>=
+</p>
+!! wikitext
+bar <span><nowiki>[[foo]]</nowiki></span>
+
+=bar <span><nowiki>[[foo]]</nowiki></span>
+
+[[bar <span><nowiki>[[foo]]</nowiki></span>
+
+]]bar <span><nowiki>[[foo]]</nowiki></span>
+
+=bar <span>foo]]</span><nowiki>=</nowiki>
+!!end
+
+#### ----------------------- PRE --------------------------
+#### 1. Leading whitespace in SOL context should be escaped
+#### ------------------------------------------------------
+!! test
+1. Leading whitespace in SOL context should be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p> a</p>
+
+<p> a</p>
+
+<p> a(tab)</p>
+
+<p> a
+<!--cmt-->
+ a</p>
+
+<p>a
+ b</p>
+
+<p>a
+ b</p>
+
+<p>a
+ b</p>
+!! wikitext
+<nowiki> </nowiki>a
+
+<nowiki> </nowiki> a
+
+ a(tab)
+
+<nowiki> </nowiki> a
+<!--cmt-->
+<nowiki> </nowiki>a
+
+a
+<nowiki> </nowiki>b
+
+a
+ b
+
+a
+ b
+!! html/php
+<p> a
+</p><p> a
+</p><p> a(tab)
+</p><p> a
+ a
+</p><p>a
+ b
+</p><p>a
+ b
+</p><p>a
+ b
+</p>
+!! end
+
+!! test
+2. Leading whitespace in non-indent-pre contexts should not be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
+<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
+<li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text"><i>a</i>
+ b</span></li>
+</ol>
+!! wikitext
+foo <ref>''a''
+ b</ref>
+<references />
+!! end
+
+!! test
+3. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+<blockquote>
+<p>
+ a
+ <span>b</span>
+ c</p>
+</blockquote>
+!! wikitext
+<blockquote>
+ a
+ <span>b</span>
+ c
+</blockquote>
+!! end
+
+!! test
+4. Leading whitespace in indent-pre suppressing contexts should not be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+ <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
+!! wikitext
+ [[File:Foobar.jpg|thumb|caption]]
+!! end
+
+!! test
+5. Nowiki escaping should account for indent-pres
+!! options
+parsoid=html2wt
+!! html/parsoid
+<pre>==foo==</pre>
+!! wikitext
+ ==foo==
+!! end
+
+!!test
+T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
+!! options
+parsoid=html2wt
+!! html/parsoid
+<pre>
+* foo
+* bar
+</pre>
+!! wikitext
+ * foo
+ * bar
+!! end
+
+#### --------------- Behavior Switches --------------------
+
+!! test
+1. Valid behavior switches should be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+__TOC__
+<i>__TOC__</i>
+!! wikitext
+<nowiki>__TOC__</nowiki>
+''<nowiki>__TOC__</nowiki>''
+!! end
+
+!! test
+2. Invalid behavior switches should not be escaped
+!! options
+parsoid=html2wt
+!! html/parsoid
+__TOO__
+__|__
+!! wikitext
+__TOO__
+__|__
+!! end
+
+# We use indent-pre as an indirect way to test for sol-transparent behavior.
+!! test
+Behavior switches should be SOL-transparent
+!! options
+parsoid=html2wt
+!! html/parsoid
+ <meta property="mw:PageProp/toc" />
+
+ <!-- this one's bogus -->
+<pre>__TOO__</pre>
+
+<pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
+
+<meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
+!! wikitext
+ __TOC__
+
+ <!-- this one's bogus -->
+ __TOO__
+
+ __TOC__ foo
+
+__TOC__
+ bar
+!! end
+
+#### --------------- HTML tags ---------------
+#### 1. a tags
+#### 2. other tags
+#### 3. multi-line html tag
+#### 4. extension tags
+#### -----------------------------------------
+!! test
+1. a tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+&lt;a href=&quot;http://google.com&quot;&gt;google&lt;/a&gt;
+!! wikitext
+<a href="http://google.com">google</a>
+!! end
+
+!! test
+2. other tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul><li> &lt;div&gt;foo&lt;/div&gt;</li>
+<li> &lt;div style=&quot;color:red&quot;&gt;foo&lt;/div&gt;</li>
+<li> &lt;td&gt;</li></ul>
+
+!! wikitext
+* <nowiki><div>foo</div></nowiki>
+* <nowiki><div style="color:red">foo</div></nowiki>
+* <nowiki><td></nowiki>
+!! end
+
+!! test
+3. multi-line html tag
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;div
+&gt;foo&lt;/div
+&gt;
+</p>
+!! wikitext
+<nowiki><div
+>foo</div
+></nowiki>
+!! end
+
+!! test
+4. extension tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;ref&gt;foo&lt;/ref&gt;
+</p><p>&lt;ref&gt;bar
+</p><p>baz&lt;/ref&gt;
+</p>
+!! wikitext
+<nowiki><ref>foo</ref></nowiki>
+
+<nowiki><ref>bar</nowiki>
+
+baz<nowiki></ref></nowiki>
+!! end
+
+#### --------------- Others ---------------
+!! test
+Escaping nowikis
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>&lt;nowiki&gt;foo&lt;/nowiki&gt;
+</p>
+!! wikitext
+&lt;nowiki&gt;foo&lt;/nowiki&gt;
+!! end
+
+## The quote-char in the input is necessary for triggering the bug
+!! test
+(T54035) Nowiki-escaping should not get tripped by " :" in text
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>foo's bar :</p>
+!! wikitext
+foo's bar :
+!! end
+
+#----------- End of wikitext escaping tests --------------
+
+!! test
+
+Tag-like HTML structures are passed through as text
+!! wikitext
+<x y>
+
+<x.y>
+
+<x-y>
+
+1>2
+
+x<y
+
+a>b
+
+1<d e>f
+!! html
+<p>&lt;x y&gt;
+</p><p>&lt;x.y&gt;
+</p><p>&lt;x-y&gt;
+</p><p>1&gt;2
+</p><p>x&lt;y
+</p><p>a&gt;b
+</p><p>1&lt;d e&gt;f
+</p>
+!! end
+
+!! test
+HTML tag with necessary entities in attributes
+!! wikitext
+<span title="&amp;amp;">foo</span>
+!! html
+<p><span title="&amp;amp;">foo</span>
+</p>
+!! end
+
+!! test
+HTML tag with 'unnecessary' entity encoding in attributes
+!! wikitext
+<span title="&amp;">foo</span>
+!! html
+<p><span title="&amp;">foo</span>
+</p>
+!! end
+
+!! test
+HTML tag with broken attribute value quoting
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<span title="Hello world>Foo</span>
+!! html/php
+<p><span title="Hello world">Foo</span>
+</p>
+!! html/parsoid
+<p><span title="Hello world">Foo</span></p>
+!! end
+
+!! test
+Self-closed tag with broken attribute value quoting
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div title="Hello world />Foo
+!! html/php+tidy
+<div title="Hello world"></div><p>Foo
+</p>
+!! html/parsoid
+<div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
+!! end
+
+!! test
+Table with broken attribute value quoting
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+| title="Hello world|Foo
+|}
+!! html/php
+<table>
+<tr>
+<td title="Hello world">Foo
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tr>
+<td title="Hello world">Foo
+</td></tr></table>
+
+!! end
+
+!! test
+Table with broken attribute value quoting on consecutive lines
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+{|
+| title="Hello world|Foo
+| style="color:red|Bar
+|}
+!! html/php
+<table>
+<tr>
+<td title="Hello world">Foo
+</td>
+<td style="color:red">Bar
+</td></tr></table>
+
+!! html/parsoid
+<table><tbody>
+<tr>
+<td title="Hello world">Foo
+</td><td style="color: red">Bar
+</td></tr></tbody></table>
+
+!! end
+
+!!test
+Accept empty td cell attribute
+!! wikitext
+{|
+| align="center" |foo|| |
+|}
+!! html
+<table>
+<tr>
+<td align="center">foo</td>
+<td>
+</td></tr></table>
+
+!!end
+
+!!test
+Non-empty attributes in th-cells
+!! wikitext
+{|
+!Foo!! style="color: red" |Bar
+|}
+!! html
+<table>
+<tr>
+<th>Foo</th>
+<th style="color: red">Bar
+</th></tr></table>
+
+!!end
+
+!!test
+Accept empty attributes in th-cells
+!! wikitext
+{|
+!|foo!!|bar
+|}
+!! html
+<table>
+<tr>
+<th>foo</th>
+<th>bar
+</th></tr></table>
+
+!!end
+
+!!test
+Empty table rows go away
+!! wikitext
+{|
+|Hello
+|there
+|- class="foo"
+|-
+|}
+!! html
+<table>
+<tr>
+<td>Hello
+</td>
+<td>there
+</td></tr>
+
+</table>
+
+!! end
+
+###
+### Parsoid-centric tests for testing RTing of inter-element separators
+### Edge cases not tested by existing parser tests and specific to
+### Parsoid-specific serialization strategies.
+###
+
+!!test
+RT-ed inter-element separators should be valid separators
+!! wikitext
+{|
+|- [[foo]]
+|}
+!! html/php
+<table>
+
+</table>
+
+!! html/parsoid
+<table>
+<tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
+</tbody></table>
+!!end
+
+# Parsoid-only test of a DOM pass
+!!test
+Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
+!! wikitext
+{|
+|<small>foo
+bar
+|}
+
+{|
+|<small>foo<small>
+|}
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
+<p>bar</p></small></td></tr>
+</tbody></table>
+
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo<small data-parsoid='{"stx":"html","autoInsertedEnd":true}'></small></small></td></tr>
+</tbody></table>
+!!end
+
+# Note that the "style" attribute is really a template parameter here.
+# The = would have to be {{=}} if you wanted the literal.
+!!test
+Empty TD followed by TD with tpl-generated attribute
+!! wikitext
+{|
+|-
+|
+|{{echo|style='color:red'}}|foo
+|}
+!! html
+<table>
+
+<tr>
+<td>
+</td>
+<td>foo
+</td></tr></table>
+
+!!end
+
+!!test
+Indented table with an empty td
+!! wikitext
+ {|
+ |-
+ |
+ |foo
+ |}
+!! html
+<table>
+
+<tr>
+<td>
+</td>
+<td>foo
+</td></tr></table>
+
+!!end
+
+## We have some newline diffs RT-ing this edge case
+## and it is not important enough -- we seem to be emitting
+## at most 2 newlines after a </tr> and this is unrelated to
+## the issue from T85627 that this is testing.
+!!test
+Indented table with blank lines in between (T85627)
+!! options
+parsoid=wt2html
+!! wikitext
+ {|
+ |foo
+
+
+ |}
+!! html
+<table>
+
+<tr>
+<td>foo
+</td></tr></table>
+
+!!end
+
+!!test
+Indented block & table
+!! wikitext
+ <div>foo</div>
+ {|
+ |foo
+ |}
+!! html/php
+ <div>foo</div>
+<table>
+<tr>
+<td>foo
+</td></tr></table>
+
+!! html/parsoid
+ <div data-parsoid='{"stx":"html"}'>foo</div>
+ <table><tbody>
+ <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
+ </tbody></table>
+!!end
+
+!! test
+Indent and comment before table row
+!! wikitext
+{|
+ <!--hi-->|-
+ |there
+|}
+!! html/php
+<table>
+
+<tr>
+<td>there
+</td></tr></table>
+
+!! html/parsoid
+<table>
+ <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
+ <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
+</tbody></table>
+!! end
+
+# Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
+!!test
+Empty TR followed by a template-generated TR
+!!options
+parsoid
+!! wikitext
+{|
+|-
+{{echo|<tr><td>foo</td></tr>}}
+|}
+!! html
+<table>
+<tbody>
+<tr class='mw-empty-elt'></tr>
+<tr about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<tr><td>foo</td></tr>"}},"i":0}}]}'>
+<td>foo</td></tr>
+</tbody></table>
+!!end
+
+## PHP and parsoid output differ for this, and since this is primarily
+## for testing Parsoid's serializer, marking this Parsoid only
+!!test
+Empty TR followed by mixed-ws-comment line should RT correctly
+!!options
+parsoid
+!! wikitext
+{|
+|-
+ <!--c-->
+|-
+<!--c--> <!--d-->
+|}
+!! html
+<table>
+<tbody>
+<tr class='mw-empty-elt'></tr>
+ <!--c-->
+<tr>
+<!--c--> </tr><!--d-->
+</tbody></table>
+
+!!end
+
+!!test
+Multi-line image caption generated by templates with/without trailing newlines
+!! wikitext
+[[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
+[[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
+!! html/parsoid
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt9" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt10" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt11" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span></figcaption></figure>
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a><figcaption>foo\n<span about="#mwt12" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"A"}},"i":0}}]}'>A</span>\n<span about="#mwt13" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"B"}},"i":0}}]}'>B</span>\n<span about="#mwt14" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"C"}},"i":0}}]}'>C</span>\n\n</figcaption></figure>
+!!end
+
+!! test
+New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
+!! options
+parsoid=html2wt
+!! html/parsoid
+<meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"&lt;includeonly>foo&lt;/includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
+
+<link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
+!! wikitext
+<includeonly>foo</includeonly>
+new para
+
+[[Category:Foo]]
+
+= new heading =
+!! end
+
+## PHP emits broken html for this, and since this is primarily
+## a Parsoid serializer test, marking this Parsoid only
+!!test
+Improperly nested inline or quotes tags with whitespace in between
+!! wikitext
+<span> <s>x</span> </s>
+''' ''x''' ''
+!! html/parsoid
+<p><span> <s>x</s></span><s> </s>
+<b> <i>x</i></b><i> </i>
+</p>
+!!end
+
+!!test
+Encapsulate protected attributes from wt
+!! wikitext
+<div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
+
+{| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
+| ok
+|}
+!! html/parsoid
+<div data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">foo</div>
+
+<table data-x-typeof="mw:placeholder stuff" data-x-data-mw="whoo" data-x-data-parsoid="weird" data-x-data-parsoid-other="no" data-x-about="time" data-x-rel="mw:true">
+<tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
+</tbody></table>
+!!end
+
+## Currently the p-wrapper is fragile in how it adds / removes transformations.
+## Having nested or stray pre tags results in the attempt to add duplicates,
+## causing an assertion fail. This test tries to prevent that situation.
+!!test
+Ensure ParagraphWrapper can deal with stray closing pre tags
+!!options
+parsoid=wt2html
+!! wikitext
+plain text</pre>
+!! html/parsoid
+plain text
+!!end
+
+!!test
+1. Ensure fostered text content is wrapped in element nodes
+!!options
+parsoid=wt2html
+!! wikitext
+<table>hi</table><table>ho</table>
+!! html/parsoid
+<p>hi</p>
+<table></table>
+<p>ho</p>
+<table></table>
+!!end
+
+!!test
+2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
+!!options
+parsoid=wt2html,wt2wt
+!! wikitext
+<table>
+<tr> || ||
+<td> a
+</table>
+!! html/parsoid
+<p> || ||
+</p><table>
+<tbody><tr><td> a</td></tr>
+</tbody></table>
+!!end
+
+!!test
+Encapsulation properly handles null DSR information from foster box
+!!options
+parsoid=wt2html,wt2wt
+!! wikitext
+{{echo|<table>foo<tr><td>bar</td></tr></table>}}
+!! html/parsoid
+<span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<table>foo<tr><td>bar</td></tr></table>&quot;}},&quot;i&quot;:0}}]}">foo</span><table><tbody><tr><td>bar</td></tr></tbody></table>
+!!end
+
+!!test
+1. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table>{{echo|foo<tr><td>bar</td></tr>}}</table>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo<tr><td>bar</td></tr>&quot;}},&quot;i&quot;:0}},&quot;</table>&quot;]}">foo</p><table>
+<tbody>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+2. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
+!! html/parsoid
+<div typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table><div>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo&quot;}},&quot;i&quot;:0}},&quot;</div><tr><td>bar</td></tr></table>&quot;]}">foo</div>
+<table>
+<tbody>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+3. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
+!! html/parsoid
+<div typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table><div><p>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo</p></div><tr><td>&quot;}},&quot;i&quot;:0}},&quot;bar</td></tr></table>&quot;]}">
+<p>foo</p>
+</div>
+<table>
+<tbody>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+4. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
+!! html/parsoid
+<div typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table><div><p>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo</p></div><tr><td>&quot;}},&quot;i&quot;:0}},&quot;bar</td></tr></table>&quot;]}">
+<p>foo</p>
+</div>
+<table>
+<tbody>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+5. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table><tr><td><div><p>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo</p></div></td>foo&quot;}},&quot;i&quot;:0}},&quot;</tr></table>&quot;]}">foo</p>
+<table>
+<tbody>
+<tr>
+<td>
+<div>
+<p>foo</p>
+</div>
+</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+6. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table><tr><td><div><p>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;foo</p></div></td>foo</tr></table>&quot;}},&quot;i&quot;:0}}]}">foo</p>
+<table>
+<tbody>
+<tr>
+<td>
+<div>
+<p>foo</p>
+</div>
+</td>
+</tr>
+</tbody>
+</table>
+<p>ok</p>
+!!end
+
+!!test
+7. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table>{{echo|<p>foo</p>}}<td>bar</td></table>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[&quot;<table>&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;echo&quot;,&quot;href&quot;:&quot;./Template:Echo&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;<p>foo</p>&quot;}},&quot;i&quot;:0}},&quot;<td>bar</td></table>&quot;]}">foo</p>
+<table>
+<tbody>
+<tr>
+<td>bar</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+# Note that the wt is broken on purpose: the = should be {{=}} if you
+# don't want it to be a template parameter key.
+!!test
+8. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+{{echo|a
+}}{|{{echo|style='color:red'}}
+|-
+|b
+|}
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
+<span> </span>
+<p typeof="mw:Transclusion" data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"style":{"wt":"&#39;color:red&#39;"}},"i":0}},"\n|-\n|b\n|}"]}'>{{{1}}}</p>
+<table>
+<tbody>
+<tr>
+<td>b</td>
+</tr>
+</tbody>
+</table>
+!!end
+
+!!test
+9. Encapsulate foster-parented transclusion content
+!!options
+parsoid=wt2wt,wt2html
+!! wikitext
+<table>{{echo|hi</table>hello}}
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":["&lt;table>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi&lt;/table>hello"}},"i":0}}]}' data-parsoid='{"fostered":true,"autoInsertedEnd":true,"autoInsertedStart":true,"pi":[[{"k":"1"}]]}'>hi</p><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><p about="#mwt2">hello</p>
+!!end
+
+!!test
+Table in fosterable position
+!!options
+parsoid=wt2html
+!! wikitext
+{{OpenTable}}
+<div>
+{|
+|}
+</div>
+|}
+!! html/parsoid
+<div about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"OpenTable","href":"./Template:OpenTable"},"params":{},"i":0}},"\n&lt;div>\n"]}' data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[]]}'></div><span about="#mwt1">
+</span>
+<table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
+
+<table>
+</table>
+!!end
+
+# Parsoid only for T66747
+!! test
+Properly encapsulate empty-content transclusions in fosterable positions
+!! wikitext
+<table>
+{{#if:|
+<td>foo</td>
+}}
+</table>
+!! html/parsoid
+<table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["&lt;table>\n",{"template":{"target":{"wt":"#if:","function":"if"},"params":{"1":{"wt":"\n&lt;td>foo&lt;/td>\n"}},"i":0}},"\n&lt;/table>"]}' data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}'>
+
+</table>
+!! end
+
+!! test
+Always encapsulate foster box when template range is expanded to table
+!! options
+parsoid=wt2wt
+!! wikitext
+{|
+hello
+{{OpenTable}}
+|}
+!! html/parsoid
+
+!! end
+
+!! test
+T115289: Unclosed table
+!! wikitext
+{{echo|<table>}}<!--c-->[[Category:Two]]
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;table>"}},"i":0}},"&lt;!--c-->[[Category:Two]]"]}'/><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><!--c--></table>
+!! end
+
+!! test
+T115289: Don't migrate newlines out of tables with fostered content
+!! wikitext
+<table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:One" about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"stx":"simple","a":{"href":"./Category:One"},"sa":{"href":"Category:One"},"fostered":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["&lt;table>&lt;td>&lt;/td>",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;tr>[[Category:One]]"}},"i":0}},"&lt;!--c-->[[Category:Two]]"]}'/><link rel="mw:PageProp/Category" href="./Category:Two" about="#mwt2"/><table about="#mwt2" data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr><td></td></tr><tr><!--c--></tr></tbody></table>
+!! end
+
+!! test
+T73074: More fostering fun
+!! wikitext
+<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Two" data-parsoid='{"stx":"simple","a":{"href":"./Category:Two"},"sa":{"href":"Category:Two"},"fostered":true}'/><table data-parsoid='{"stx":"html","autoInsertedEnd":true}'><tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"stx":"html"}'></td></tr><tr about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;tr>"}},"i":0}},"&lt;!--c-->[[Category:Two]]"]}'><!--c--></tr></tbody></table>
+!! end
+
+!!test
+Support <object> element with .data attribute
+!!options
+parsoid=html2wt
+!! html/parsoid
+<object data="test.swf"></object>
+!! wikitext
+<object data="test.swf"></object>
+!!end
+
+!! test
+Don't block XML namespace declaration
+!! wikitext
+<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
+!! html/php
+<p><span xmlns:dct="http&#58;//purl.org/dc/terms/" property="dct:title">MediaWiki</span>
+</p>
+!! html/parsoid
+<p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
+!! end
+
+# -----------------------------------------------------------------
+# The following section of tests are primarily to spec requirements
+# around Parsoid's serialization (old, new, edited content)
+#
+# All these tests are marked Parsoid html2wt and html2html only
+# ----------------------------------------------------------------
+
+!! test
+Ignore rel attribute in a-tags during serialization to url-links
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
+<a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
+<a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
+!! wikitext
+http://en.wikipedia.org/wiki/Foobar
+http://en.wikipedia.org/wiki/Foobar
+http://en.wikipedia.org/wiki/Foobar
+!! end
+
+# 'mi' is a localinterwiki prefix as well as a language
+!! test
+Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
+!! wikitext
+[[Foo]]
+!! end
+
+!! test
+Parsoid should accept interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
+<a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
+<a href='./fr:Foo'>Foo</a></p>
+<p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
+<a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
+<a href='fr%3AFoo'>Foo</a></p>
+<p><a href='FR%3AFoo'>Foo</a>
+<a href='./FR:Foo'>Foo</a></p>
+!! wikitext
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+
+[[:fr:Foo|Foo]]
+[[:fr:Foo|Foo]]
+!! end
+
+!! test
+Parsoid should not accept invalid interwiki shortcuts
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
+<a rel='mw:ExtLink' href='news:Foo'>Foo</a>
+<a href='news:Foo'>Foo</a></p>
+!! wikitext
+[news:Foo Foo]
+[news:Foo Foo]
+[news:Foo Foo]
+!! end
+
+# See T93839
+!! test
+New wikilinks should be serialized properly
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
+<a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
+<a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
+<a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
+!! wikitext
+[[Foo]]
+[[Foo]]
+[[:en:Foo|//en.wikipedia.org/wiki/Foo]]
+http://en.wikipedia.org/wiki/Foo
+[[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
+!! end
+
+!! test
+New wiki links (href variations)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
+<a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
+<a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
+<a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
+!! wikitext
+[[Foo_bar]]
+[[Foo_bar]]
+[[Foo_bar]]
+[[Toxine bactérienne]]
+!! end
+
+!! test
+New wiki links (content string variations)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
+<a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
+<a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
+!! wikitext
+[[Foo_bar]]
+[[Foo bar]]
+[[Foo_bar|./Foo_bar]]
+!! end
+
+!! test
+New category links (href variations)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
+<link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
+<link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
+!! wikitext
+[[Category:Toxine bactérienne]]
+[[Category:Toxine bactérienne]]
+[[Category:Toxine bactérienne]]
+!! end
+
+!! test
+New sol transparent links don't need indent-pre nowiki protection
+!! options
+parsoid=html2wt
+language=de
+!! html/parsoid
+ <link rel="mw:PageProp/redirect" href="./Main_Page">
+<!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
+<!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
+!! wikitext
+ #WEITERLEITUNG [[Main Page]]
+<!-- this is good --> [[Category:Good]]
+<!-- this is great --> [[Kategorie:Great]]
+!! end
+
+!! test
+New interlanguage links (href variations)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
+<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
+!! wikitext
+[[es:Toxine bactérienne]]
+[[es:Toxine_bactérienne]]
+[[es:Toxine_bactérienne]]
+!! end
+
+!! test
+Image: Modifying size of an image (1)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["img[height]", "attr", "height", "22"],
+ ["img[width]", "attr", "width", "200"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|230x230px]]
+!! wikitext/edited
+[[Image:Foobar.jpg|200x200px]]
+!!end
+
+!! test
+Image: Modifying size of an image (2)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["img[height]", "attr", "height", "100"],
+ ["img[width]", "attr", "width", "500"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|230x230px]]
+!! wikitext/edited
+[[Image:Foobar.jpg|500x500px]]
+!!end
+
+# Change in size is ignored so long as class='mw-default-size'
+!! test
+Image: Modifying size of an image (3)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["figure[class]", "removeClass", "mw-default-size"],
+ ["figure img", "attr", "height", "19"],
+ ["figure img", "attr", "width", "170"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|thumb]]
+!! wikitext/edited
+[[Image:Foobar.jpg|thumb|170x170px]]
+!!end
+
+!! test
+Image: Modifying alignment of an image (T50665)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["figure[class]", "removeClass", "mw-halign-right"],
+ ["figure[class]", "addClass", "mw-halign-left"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|thumb|caption|right]]
+!! wikitext/edited
+[[Image:Foobar.jpg|thumb|caption|left]]
+!! end
+
+!! test
+Image: Modifying mw-default-size of an frameless image (T64805)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["figure.mw-default-size", "removeClass", "mw-default-size"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|frameless|right]]
+!! wikitext/edited
+[[Image:Foobar.jpg|frameless|right|220x220px]]
+!! end
+
+!! test
+Image: Modifying valign of an image (T51221)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
+ ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
+ ]
+}
+!! wikitext
+[[File:Foobar.jpg|20px|middle]]
+!! wikitext/edited
+[[File:Foobar.jpg|20px|text-top]]
+!! end
+
+!! test
+Image: Modifying alt attribute of an image (T58400)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["img[alt]", "attr", "alt", "some alternate edited text"]
+ ]
+}
+!! wikitext
+[[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
+!! wikitext/edited
+[[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
+!!end
+
+!! test
+Image: Modifying caption of an image
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ ["figcaption", "text", "new caption"]
+ ]
+}
+!! wikitext
+[[Image:Foobar.jpg|thumb|original caption]]
+!! wikitext/edited
+[[Image:Foobar.jpg|thumb|new caption]]
+!!end
+
+!! test
+Image: empty alt attribute (T50924)
+!! options
+parsoid
+!! wikitext
+[[File:Foobar.jpg|thumb|alt=|bar]]
+!! html
+<figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"alt","ak":"alt="},{"ck":"caption","ak":"bar"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img alt="" resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=","resource":"File:Foobar.jpg"}}'/></a><figcaption>bar</figcaption></figure>
+!! end
+
+!! test
+Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
+!! options
+parsoid=html2wt
+language=ar
+disabled
+!! html/parsoid
+<figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb"><a href="./Imagen:Foobar.jpg"><img resource="./Imagen:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="20" width="180"/></a></figure>
+!! wikitext
+[[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
+!! end
+
+!! test
+Image: Block level image should have \n before and after
+!! wikitext
+123
+[[File:Foobar.jpg|right|thumb|150x150px]]
+456
+!! html/parsoid
+<p>123</p>
+<figure class="mw-halign-right" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150"/></a></figure>
+<p>456</p>
+!! end
+
+!! test
+Image: New block level image should have \n before and after (existing content)
+!! wikitext
+123
+[[File:Foobar.jpg|right|thumb|150x150px]]
+456
+!! html/parsoid
+<p>123</p>
+<figure class="mw-halign-right" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"right","ak":"right"},{"ck":"thumbnail","ak":"thumb"},{"ck":"width","ak":"150x150px"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/150px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="17" width="150" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"17","width":"150"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure>
+<p>456</p>
+!! end
+
+!! test
+Image: upright option (parsoid)
+!! wikitext
+[[File:Foobar.jpg|thumb|upright|caption]]
+[[File:Foobar.jpg|thumb|upright=0.5|caption]]
+[[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/170px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="19" width="170"/></a><figcaption>caption</figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/110px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="12" width="110"/></a><figcaption>caption</figcaption></figure>
+<figure typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a><figcaption>caption</figcaption></figure>
+!! end
+
+!! test
+Image: upright option is ignored on inline and frame images (parsoid)
+!! wikitext
+[[File:Foobar.jpg|500x500px|upright=0.5|caption]]
+!! html/parsoid
+<p><figure-inline typeof="mw:Image" data-mw='{"caption":"caption"}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/500px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="57" width="500"/></a></figure-inline></p>
+!! end
+
+!! test
+Image: in template parameter with empty parameter
+!! wikitext
+{{echo|[[File:Foobar.jpg|link=]]}}
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Transclusion mw:Image" about="#mwt1" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[File:Foobar.jpg|link=]]"}},"i":0}}]}'><span><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></span></figure-inline></p>
+!! end
+
+!! test
+Image: from basic HTML (1)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<span typeof="mw:Image">
+ <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
+</span>
+!! wikitext
+[[File:Foobar.jpg|link=|alt=Alt|100x100px]]
+!! end
+
+!! test
+Image: from basic HTML (2)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
+!! wikitext
+[[File:Foobar.jpg|link=|alt=Alt|100x100px]]
+!! end
+
+!! test
+Image: from basic HTML (3)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
+!! wikitext
+[[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
+!! end
+
+!! test
+Image: from basic HTML (4)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<img src="./File:Foobar.jpg">
+!! wikitext
+[[File:Foobar.jpg|link=]]
+!! end
+
+!! test
+Image: Invalid title as link
+!! wikitext
+[[File:Foobar.jpg|link=<]]
+!! html/php
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="link=&lt;"><img alt="link=&lt;" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! html/parsoid
+<p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"link","ak":"link=&lt;"}]}' data-mw='{"caption":"link=&amp;lt;"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+!! end
+
+!! test
+Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul>
+<li><p>foo</p></li>
+</ul>
+!! wikitext
+* foo
+!! end
+
+!! test
+Lists: Serialize correctly even when list tags has unneeded whitespace between tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul> <li>foo</li></ul>
+!! wikitext
+* foo
+!! end
+
+!! test
+Don't strip leading whitespace when handling indent-pre suppressing tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+ <tr><td> indented row</td></tr>
+</table>
+<blockquote><p>
+ <b>This is very bold of you!</b>
+</p>
+<table><tr><td>
+ indented cell (no pre-wrapping!)
+</td></tr></table>
+</blockquote>
+<p>foo</p>
+ <div>bar</div>
+!! wikitext
+{|
+ | indented row
+|}
+<blockquote>
+ '''This is very bold of you!'''
+
+{|
+|
+ indented cell (no pre-wrapping!)
+|}
+</blockquote>
+foo
+ <div>bar</div>
+!! end
+
+!! test
+Nowiki-wrap leading whitespace when handling indent-pre inducing tags
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>foo</p>
+ <span>bar</span>
+
+<span>foo2
+ </span>bar2
+
+<div>foo</div>
+ <span>bar</span>
+
+<div>
+ <span>foo</span>
+</div>
+!! wikitext
+foo
+
+<span>bar</span>
+
+<span>foo2
+<nowiki> </nowiki></span>bar2
+
+<div>foo</div>
+<nowiki> </nowiki><span>bar</span>
+
+<div>
+<nowiki> </nowiki><span>foo</span>
+</div>
+!! end
+
+!! test
+Lists: Dont insert newlines in a serialized list item.
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul><li>a<br>b</li><li>c</li></ul>
+!! wikitext
+* a<br />b
+* c
+!! end
+
+!! test
+1. Headings: Force sol-transparent links and behavior switches to serialize before/after
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html/parsoid
+<h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
+<h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
+
+<h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
+<h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
+
+<h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
+
+<h2><meta property="mw:PageProp/toc" /> ok</h2>
+!! wikitext
+== hello there [[Category:A1]] ==
+
+== [[Category:A2]] hi pal ==
+
+== <!--foo--> [[Category:A3]] how goes it ==
+
+== it goes well [[Category:A4]] <!--bar--> ==
+
+==howdy [[Category:A5]]==
+
+== __TOC__ ok ==
+!! end
+
+!! test
+2. Headings: Force sol-transparent links and behavior switches to serialize before/after
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
+<h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
+
+<h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
+<h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
+
+<h2><meta property="mw:PageProp/toc" /> ok</h2>
+!! wikitext
+== hello there ==
+[[Category:A1]]
+[[Category:A2]]
+
+== hi pal ==
+
+<!--foo--> [[Category:A3]]
+
+== how goes it ==
+
+== it goes well ==
+[[Category:A4]] <!--bar-->
+
+__TOC__
+
+== ok ==
+!! end
+
+!! test
+Headings: Don't hoist metas that come from templates
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2><span about="#mwt1" typeof="mw:Transclusion" data-parsoid="{}" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo [[Category:Foo]]"}},"i":0}}]}'>foo </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1" data-parsoid="{}" /></h2>
+!! wikitext
+== {{echo|foo [[Category:Foo]]}} ==
+!! end
+
+!! test
+Headings: Category in ref isn't hoisted
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
+
+<ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">bar <link rel="mw:PageProp/Category" href="./Category:Baz" /> </span></li></ol>
+!! wikitext
+== foo <ref>bar
+[[Category:Baz]] </ref> ==
+
+<references />
+!! end
+
+!! test
+Parsoid: Serialize positional parameters with = in them as named parameter
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p about="#mwt1" typeof="mw:Transclusion"
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
+
+<p about="#mwt1" typeof="mw:Transclusion"
+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
+
+<!--Orig params with data-parsoid has heuristics for handling = chars-->
+<!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
+<p data-parsoid='{"pi":[[{"k":"1"},{"k":"2"}]]}' about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"},"2":{"wt":"bar"}},"i":0}}]}'>foo</p>
+!! wikitext
+{{echo|1=f=oo}}
+
+{{echo|1=f=oo|2=bar}}
+
+<!--Orig params with data-parsoid has heuristics for handling = chars-->
+<!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
+{{echo|<nowiki>f=oo</nowiki>|bar}}
+!! end
+
+!! test
+Parsoid: Serialize positional parameters with = in extlink as named parameter
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://stuff?is=ok" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://stuff?is=ok"}},"i":0}}]}'>http://stuff?is=ok</a></p>
+!! wikitext
+{{echo|1=http://stuff?is=ok}}
+!! end
+
+!! test
+Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
+!! options
+parsoid=html2wt
+!! html/parsoid
+<div>a<p>b</p></div>
+<div>a
+<p>b</p></div>
+<div>
+a
+<p>b</p></div>
+!! wikitext
+<div>a
+b
+</div>
+<div>a
+b
+</div>
+<div>
+a
+
+b
+</div>
+!! end
+
+!! test
+Substrings resembling wikitext in hrefs should not get nowiki escapes
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
+!! wikitext
+[[Foo''bar''baz]]
+!! end
+
+!! test
+Enforce single-line context in the serializer
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h2>testing
+123</h2>
+
+<h2> hi <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bogus","href":"./Template:Bogus"},"params":{"1":{"wt":"there\nyou"}},"i":0}}]}'>there</span><span about="#mwt1">
+</span><span about="#mwt1">you</span> </h2>
+
+<h2> foo <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="./Main_Page#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> </h2>
+
+<ol class="references" typeof="mw:Extension/references" about="#mwt3" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><span rel="mw:referencedBy"><a href="./Main_Page#cite_ref-1">↑</a></span> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">hello
+there</span></li></ol>
+
+<ul><li>asd
+sdf</li></ul>
+
+<ul><li>foo
+bar
+baz</li>
+<li>foo <b>bar</b>
+baz</li></ul>
+
+<dl><dt>hi
+ho </dt><dd data-parsoid='{"stx":"row"}'> hi
+ho</dd></dl>
+
+<dl><dd> <table>
+<tbody><tr><td> ha
+ha
+ha</td></tr>
+</tbody></table></dd></dl>
+!! wikitext
+== testing 123 ==
+
+== hi {{bogus|there
+you}} ==
+
+== foo <ref>hello
+there</ref> ==
+
+<references />
+
+* asd sdf
+
+* foo bar baz
+* foo '''bar''' baz
+
+; hi ho : hi ho
+
+: {|
+| ha
+ha
+ha
+|}
+!! end
+
+!! test
+Serialize new placeholder space without spans
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
+
+<p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
+
+<span typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;foo<span typeof=\&quot;mw:Placeholder\&quot;>&amp;nbsp;</span>: bar&quot;}}"><sup>[1]</sup></span>ok</p>
+!! wikitext
+foo : bar
+
+foo : bar
+
+<ref>foo : bar</ref>ok
+!! end
+
+
+#-----------------------
+# Tag minimization tests
+#-----------------------
+
+!! test
+1. I/B quote minimization: wikitext-only tags should be combined
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><i>A</i><i>B</i></p>
+<p><b>A</b><b>B</b></p>
+<p><i>A</i><b><i>B</i></b></p>
+<p><b>A</b><i><b>B</b></i></p>
+<p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
+<p><i><b>A</b></i><i><b>B</b></i></p>
+<p><i><b>A</b></i><b><i>B</i></b></p>
+<p><b><i>A</i></b><i><b>B</b></i></p>
+!! wikitext
+''AB''
+
+'''AB'''
+
+''A'''B'''''
+
+'''A''B'''''
+
+'''A''BC''D'''
+
+'''''AB'''''
+
+'''''AB'''''
+
+'''''AB'''''
+!! end
+
+!! test
+2. I/B quote minimization: wikitext and html tags should not be combined
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
+<p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
+!! wikitext
+''A''<i>B</i>
+
+''A''<nowiki/>'''<i>B</i>'''
+!! end
+
+!! test
+3. I/B quote minimization: templated content stops minimization
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><i>A</i><i about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&#39;&#39;B&#39;&#39;"}},"i":0}}]}'>B</i>
+<p><i>A</i><b about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&#39;&#39;&#39;&#39;&#39;B&#39;&#39;&#39;&#39;&#39;"}},"i":0}}]}'><i>B</i></b>
+!! wikitext
+''A''{{echo|''B''}}
+
+''A''{{echo|'''''B'''''}}
+!! end
+
+!! test
+4. I/B quote minimization: new content should be mimimized with adjacent old content
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><i>A</i><i>B</i></p>
+<p><b>A</b><b>B</b></p>
+<p><i>A</i><b><i>B</i></b></p>
+!! wikitext
+''AB''
+
+'''AB'''
+
+''A'''B'''''
+!! end
+
+!! test
+5a. Merge adjacent quote nodes if they've been edited
+!! options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["p", "contents", "remove", ":contains('b')"]
+ ]
+}
+!! wikitext
+''a''b''c''
+!! wikitext/edited
+''ac''
+!! end
+
+!! test
+5b. Merge adjacent quote nodes if they've been edited
+!! options
+parsoid={
+ "modes": ["wt2wt", "selser"],
+ "changes": [
+ ["#x", "remove"]
+ ]
+}
+!! wikitext
+''a''<span id="x">b</span>''c''
+!! wikitext/edited
+''ac''
+!! end
+
+!! test
+1. Merge adjacent link nodes as long as at least one element is new
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
+<a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
+<a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
+!! wikitext
+[[Football]]
+[[Football]]
+[[Football|Foot]][[Football|ball]]
+!! end
+
+!! test
+2. Merge adjacent link nodes and enable additional normalizations
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
+!! wikitext
+[[Football|''Football'']]
+!! end
+
+!! test
+3. Don't merge adjacent link nodes if scrubWikitext is false
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
+!! wikitext
+[[Football|Foot]][[Football|ball]]
+!! end
+
+#------------------------------
+# End of tag minimization tests
+#------------------------------
+
+!!test
+T56262: New entities
+!! options
+parsoid=html2wt
+!! html/parsoid
+<span typeof="mw:Entity">&nbsp;</span>
+!! wikitext
+&nbsp;
+!! end
+
+## Note that there is no wikitext output for 'unknownproperty' ##
+## Unknown magic words are silently dropped ##
+
+!! test
+Magic words
+!! options
+parsoid=html2wt
+!! html/parsoid
+<meta property='mw:PageProp/toc' />
+<meta property='mw:PageProp/notoc' />
+<meta property='mw:PageProp/forcetoc' />
+<meta property='mw:PageProp/index' />
+<meta property='mw:PageProp/noindex' />
+<meta property='mw:PageProp/nogallery' />
+<meta property='mw:PageProp/noeditsection' />
+<meta property='mw:PageProp/notitleconvert' />
+<meta property='mw:PageProp/nocontentconvert' />
+<meta property='mw:PageProp/unknownproperty' />
+!! wikitext
+__TOC__
+__NOTOC__
+__FORCETOC__
+__INDEX__
+__NOINDEX__
+__NOGALLERY__
+__NOEDITSECTION__
+__NOTITLECONVERT__
+__NOCONTENTCONVERT__
+!! end
+
+!! test
+Consecutive <pre>s should not get merged
+!! options
+parsoid=html2wt,html2html
+!! html/parsoid
+<pre>a</pre><pre>b</pre>
+
+<pre>c
+</pre><pre>
+d</pre>
+
+<pre>e
+
+</pre><pre>
+
+f</pre>
+!! wikitext
+ a
+
+ b
+
+ c
+
+ d
+
+ e
+
+
+
+ f
+!! end
+
+!! test
+Edited ISBN links not serializable as ISBN links should serialize as wikilinks
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
+!! wikitext
+[[Special:BookSources/1234567890|ISBN 1234567895]]
+!! end
+
+!! test
+Edited RFC links not serializable as RFC links should serialize as extlinks
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
+!! wikitext
+[https://tools.ietf.org/html/rfc123 New RFC]
+!! end
+
+!! test
+Edited PMID links not serializable as PMID links should serialize as extlinks
+!! options
+parsoid=html2wt
+!! html/parsoid
+<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
+!! wikitext
+[//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
+!! end
+
+!! test
+WTS of autolinks with trailing/surrounding context
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
+<p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
+<p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
+<p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
+<p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
+<p><a href="http://cscott.net">http://cscott.net</a>x</p>
+!! wikitext
+http://cscott.net'''foo'''
+
+http://cscott.net<b>foo</b>
+
+'''http://cscott.net'''
+
+'''http://cscott.net '''
+
+'''http://cscott.net<nowiki/>x'''
+
+http://cscott.net<nowiki/>x
+!! end
+
+!! test
+WTS of autolinks with nowikis (round-trip)
+!! wikitext
+x<nowiki/>http://cscott.net<nowiki/>x
+!! html/parsoid
+<p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
+!! end
+
+# this is the "easy" test because it leaves in place all the
+# data-parsoid information indicating this is an autolink
+!! test
+WTS of autolinks with escapes (editing)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ [ "span", "remove" ]
+ ]
+}
+!! wikitext
+x<nowiki/>http://cscott.net<nowiki/>x
+!! wikitext/edited
+x<nowiki/>http://cscott.net<nowiki/>x
+!! end
+
+!! test
+WTS of edited autolink-like text (T103364)
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ [ "span[typeof]", "removeAttr", "typeof" ]
+ ]
+}
+!! wikitext
+Not a link: <nowiki>http://example.com</nowiki>.
+!! wikitext/edited
+Not a link: <span><nowiki>http://example.com</nowiki></span>.
+!! end
+
+!! test
+WTS of newly-authored autolink-like text (T103364)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>http://example.com is not a link.</p>
+!! wikitext
+<nowiki>http://example.com</nowiki> is not a link.
+!! end
+
+!! test
+WTS of autolink-like text after an autolink (T108563)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
+!! wikitext
+http://example.com <nowiki>http://example.com</nowiki> is not a link.
+!! end
+
+!! test
+Magic links inside links (not autolinked)
+!! wikitext
+[[Foo|http://example.com]]
+[[Foo|RFC 1234]]
+[[Foo|PMID 1234]]
+[[Foo|ISBN 123456789x]]
+
+[http://foo.com http://example.com]
+[http://foo.com RFC 1234]
+[http://foo.com PMID 1234]
+[http://foo.com ISBN 123456789x]
+!! html+tidy
+<p><a href="/wiki/Foo" title="Foo">http://example.com</a>
+<a href="/wiki/Foo" title="Foo">RFC 1234</a>
+<a href="/wiki/Foo" title="Foo">PMID 1234</a>
+<a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
+</p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
+<a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
+<a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
+<a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
+
+<p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
+<a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
+!! end
+
+!! test
+Magic links inside image captions (autolinked)
+!! wikitext
+[[File:Foobar.jpg|thumb|http://example.com]]
+[[File:Foobar.jpg|thumb|RFC 1234]]
+[[File:Foobar.jpg|thumb|PMID 1234]]
+[[File:Foobar.jpg|thumb|ISBN 123456789x]]
+!! html+tidy
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
+<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div><a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink" class="external text">RFC 1234</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></figcaption></figure>
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/123456789X" rel="mw:WikiLink">ISBN 123456789x</a></figcaption></figure>
+!! end
+
+!! test
+WTS of magic word text (T109371)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>RFC 1234</p>
+<p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
+<p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
+!! wikitext
+<nowiki>RFC 1234</nowiki>
+
+[http://foo.com RFC 1234]
+
+[[Foo|RFC 1234]]
+!! end
+
+!! test
+Edited Redirect link should emit a non-piped wikitext link
+!! options
+parsoid=html2wt
+!! html/parsoid
+<link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
+!! wikitext
+#REDIRECT [[Bar]]
+!! end
+
+!! test
+T75121: Infer extension name from typeOf if data-mw is not present
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<div typeOf="mw:Extension/foo"></div>
+!! wikitext
+<foo />
+!! end
+
+# Note that the <p> wrapping isn't present in PHP parser output
+# The important thing for this test is that P-wrapping doesn't
+# interfere with the <nowiki> protection for leading - in <td>
+# (which isn't necessary for <th>).
+!! test
+T88318: p-wrapped dash in table.
+!! options
+parsoid=html2wt,wt2wt
+!! html/parsoid
+<table><tbody>
+<tr><th><p>-</p></th><th><p>- </p></th></tr>
+<tr><td><p>-</p></td><td><p>- </p></td></tr>
+<tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
+</tbody></table>
+!! wikitext
+{|
+!-
+!-
+|-
+|<nowiki>-</nowiki>
+|<nowiki>- </nowiki>
+|-
+|<small>-</small>
+|<br />
+-
+|<br />
+-
+|}
+!! html/php+tidy
+<table>
+<tbody><tr>
+<th>-
+</th>
+<th>-
+</th></tr>
+<tr>
+<td>-
+</td>
+<td>-
+</td></tr>
+<tr>
+<td><small>-</small>
+</td>
+<td><br />
+<p>-
+</p>
+</td>
+<td><br />
+<p>-
+</p>
+</td></tr></tbody></table>
+!! end
+
+!! test
+T149209: WTS: Handle newlines in table cells properly
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table>
+<tbody>
+<tr><td>a
+b
+</td><td data-parsoid='{"stx":"row"}'>c</td></tr>
+<tr><td><p>x</p>
+</td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
+</tbody></table>
+<table>
+<tbody>
+<tr><th>a
+b
+</th><th data-parsoid='{"stx":"row"}'>c</th></tr>
+<tr><th><p>x</h>
+</th><th data-parsoid='{"stx":"row"}'>y</th></tr>
+</tbody></table>
+!! wikitext
+{|
+|a
+b
+|c
+|-
+|x
+{{!}}y
+|}
+{|
+!a
+b
+!c
+|-
+!x
+!y
+|}
+!! end
+
+!! test
+T149209: Selser: Handle newlines in table cells properly
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "#h1", "html", "a\nb\n" ],
+ [ "#h2", "html", "a\nb\n" ],
+ [ "#c1", "html", "a\nb\n" ],
+ [ "#c2", "html", "<p>a</p>" ],
+ [ "#c3", "html", "<p>a</p>" ],
+ [ "#c4", "html", "edit-me<p>a</p>" ]
+ ]
+}
+!! wikitext
+{|
+! id="h1" |edit-me!!1
+|-
+! id="h2" |edit-me||2
+|-
+| id="c1" |edit-me||3
+|-
+| id="c2" |edit-me||4
+|-
+| id="c3" |edit-me||p||q||r
+|-
+| id="c4" |edit-me||p||q||r
+|}
+!! wikitext/edited
+{|
+! id="h1" |a
+b
+!1
+|-
+! id="h2" |a
+b
+!2
+|-
+| id="c1" |a
+b
+|3
+|-
+| id="c2" |a
+|4
+|-
+| id="c3" |a
+|p||q||r
+|-
+| id="c4" |edit-me
+a
+|p||q||r
+|}
+!! end
+
+!! test
+HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table id='mwAb'>
+<td id='mwAc'>foo</td>
+<td id='serialize-this'>bar</td>
+</table>
+!! wikitext
+{|
+|foo
+| id="serialize-this" |bar
+|}
+!! end
+
+!! test
+Parsoid-like element ids should not be serialized to wikitext unless shadowed
+!! options
+parsoid=html2wt
+!! html/parsoid
+<div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
+!! wikitext
+<div id="hello">ok</div>
+!! end
+
+!! test
+WTS change modes
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "changes": [
+ [ "#xyz", "before", "<b>before</b> stuff " ],
+ [ "#xyz", "after", " stuff <i>after</i>" ],
+ [ "#xyz", "html", "x <b>y</b> z" ]
+ ]
+}
+!! wikitext
+<span id="xyz">hello</span>
+!! wikitext/edited
+'''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
+!! end
+
+!! test
+Never serialize a-tag as html, regardless of what data-parsoid has to say
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
+!! wikitext
+[[Foo]]
+!! end
+
+## SSS FIXME: This is broken output nevertheless.
+## What might be a reasonable non-broken output for this?
+## This is an edge case unlikely to be seen in production
+## that I am not wasting more time on this right now.
+!! test
+Never serialize a-tag as html, no matter what attributes it has
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
+!! wikitext
+[http://boo.org http://boohoo.org]
+!! end
+
+# Misnested is an indication that selser can reuse the source but these have
+# shown to sneak through on occasion. See T101768.
+# The original wikitext here is: [http://test.com [[one]] two three]
+!! test
+Strip span tags added to mark misnested links
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p data-parsoid='{}'><a rel="mw:ExtLink" href="http://test.com" data-parsoid='{"targetOff":17,"contentOffsets":[17,34]}'></a><a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"simple","a":{"href":"./One"},"sa":{"href":"one"},"misnested":true}'>one</a><span data-parsoid='{"misnested":true}'> two three</span></p>
+!! wikitext
+[http://test.com][[one]] two three
+!! end
+
+!! test
+Catch regression when unpacking misnested links
+!! options
+parsoid=wt2html
+!! wikitext
+{{echo|hi}}[http://example.com [[ho]]]
+!! html/parsoid
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</span><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
+!! end
+
+!! test
+Catch regression when unpacking with trailing content
+!! wikitext
+{{echo|Foo <references/> bar}}
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Foo &lt;references/> bar"}},"i":0}}]}'>Foo </p><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol><p about="#mwt2"> bar</p>
+!! end
+
+!! test
+Use data-parsoid.firstWikitextNode to compute newline constraints for template content
+!! options
+parsoid=html2wt
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
+<tbody><tr><td>d
+</td></tr>
+</tbody></table>
+!! wikitext
+{{echo|a}}
+{|{{echo|c
+{{!}}d
+}}
+|}
+!! end
+
+## This test verifies the presence and computation of this attribute indirectly
+## by making an edit and ensuring that the serialization is correct (which it would be
+## only if firstWikitextNode is properly set).
+!! test
+data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
+!! options
+parsoid= {
+ "modes": ["wt2wt"],
+ "changes": [
+ [ "div#x", "remove" ],
+ [ "div", "before", "<div>new</div>" ]
+ ]
+}
+!! wikitext
+<div id="x">foo</div>
+{|
+{{echo|<div>boo</div>
+{{!}}b}}
+|c
+|}
+!! wikitext/edited
+
+<div>new</div>
+{|
+{{echo|<div>boo</div>
+{{!}}b}}
+|c
+|}
+!! end
+
+# --------------------------------------------
+# Tests spec'ing wikitext serialization norms |
+# --------------------------------------------
+
+!! test
+Serialize multi-line indent-pre starting with wikitext syntax
+!! options
+parsoid=html2wt
+!! html/parsoid
+<pre>* 1
+** 2
+* 3</pre>
+!! wikitext
+ * 1
+ ** 2
+ * 3
+!! end
+
+!! test
+1. Categories should always be serialized on their own line
+!! options
+parsoid=html2wt
+!! html/parsoid
+foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
+!! wikitext
+foo
+[[Category:Foo]]
+bar
+!! end
+
+!! test
+2. Categories that are part of templates should not introduce a line break
+!! wikitext
+foo {{echo|<span>bar</span> [[Category:baz]]}} bar
+!! html/parsoid
+<p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;span>bar&lt;/span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
+!! end
+
+# Careful while editing these next 2 tests. There are \u200f characters
+# before and after the <link> tags in the HTML and following some
+# of the categories in wikitext
+# Do not remove these characters in edits.
+#
+# As part of the serialization, these bidi characters will get stripped.
+!! test
+RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<p>‏<link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />‏
+‏<link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" />‏</p>
+!! wikitext
+[[קטגוריה:טקסים]]
+[[קטגוריה: שיטות משפט]]
+!! end
+
+!! test
+RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<p>‏<link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />‏y</p>
+!! wikitext
+[[קטגוריה:טקסים]]
+‏y
+!! end
+
+!! test
+Lists: Add space after bullets
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul>
+<li>foo</li>
+<li> bar</li>
+<li><span> baz</span></li>
+</ul>
+!! wikitext
+* foo
+* bar
+* <span> baz</span>
+!! end
+
+!! test
+1. Headings: Add space before/after == (T53744)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h2>foo</h2>
+<h2> bar</h2>
+<h2>baz </h2>
+<h2><span> baz</span></h2>
+!! wikitext
+== foo ==
+
+== bar ==
+
+== baz ==
+
+== <span> baz</span> ==
+!! end
+
+!! test
+2. Headings: Add space before/after == even after hoisted content
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
+!! wikitext
+ [[Category:A2]]
+
+== ok ==
+!! end
+
+!! test
+1. Headings: suppress newly created empty headings
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2></h2>
+!! wikitext
+!! end
+
+!! test
+2. Headings: don't suppress empty headings if scrubWikitext is false
+!! options
+parsoid=html2wt
+!! html/parsoid
+<h2></h2>
+!! wikitext
+==<nowiki/>==
+!! end
+
+!! test
+3. Headings: suppress empty headings on edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "remove"]
+ ]
+}
+!! wikitext
+==<span id="x">foo</span>==
+!! wikitext/edited
+!! end
+
+!! test
+Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<h2>foo<br/>bar</h2>
+<h2>foo <span><br/>bar</span> baz</h2>
+!! wikitext
+== foo bar ==
+
+== foo <span> bar</span> baz ==
+!! end
+
+!! test
+Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html/parsoid
+<h2>foo<br/>bar</h2>
+!! wikitext
+== foo<br /> bar ==
+!! end
+
+!! test
+1. WT Quote Tags: suppress newly created empty style tags
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<i></i><b></b>
+!! wikitext
+!! end
+
+!! test
+2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
+!! options
+parsoid=html2wt
+!! html/parsoid
+<i></i><b></b>
+!! wikitext
+''<nowiki/>'''''<nowiki/>'''
+!! end
+
+!! test
+3. WT Quote Tags: suppress empty style tags on edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "remove"]
+ ]
+}
+!! wikitext
+'''<span id="x">foo</span>'''
+!! wikitext/edited
+!! end
+
+!! test
+1. Anchors: suppress newly created empty anchors
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Test" title="Test"></a>
+!! wikitext
+!! end
+
+!! test
+2. Anchors: don't suppress empty anchors if scrubWikitext is false
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html/parsoid
+<a rel="mw:WikiLink" href="./Test" title="Test"></a>
+!! wikitext
+[[Test|<nowiki/>]]
+!! end
+
+!! test
+3. Anchors: suppress empty anchors on edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "remove"]
+ ]
+}
+!! wikitext
+[[Test|<span id="x">foo</span>]]
+!! wikitext/edited
+!! end
+
+!! test
+3a. Anchors: do not suppress numbered extlinks
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "scrubWikitext": true
+}
+!! wikitext
+[http://foo.com]
+!! html/parsoid
+<a rel="mw:ExtLink" href="http://foo.com"></a>
+!! end
+
+!! test
+3b. Anchors: do not suppress numbered extlinks
+!! options
+parsoid={
+ "modes": ["wt2wt"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "remove"]
+ ]
+}
+!! wikitext
+[http://foo.com <span id="x">foo</span>]
+!! wikitext/edited
+[http://foo.com]
+!! end
+
+!!test
+Normalizations should be restricted to edited content
+!!options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "h1", "before", "<i></i>"]
+ ]
+}
+!!wikitext
+a
+= =
+b
+!!wikitext/edited
+a
+= =
+b
+!!end
+
+!! test
+1. Multiple normalizations (html2wt)
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html
+<h2><i></i></h2>
+<p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
+ </a><b><i></i></b>x</p>
+!! wikitext
+
+[[foo]]
+x
+
+!! end
+
+!! test
+2. Multiple normalizations (selser)
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
+ ]
+}
+!! wikitext
+<span id="x">foo</span>
+!! wikitext/edited
+<span id="x">foo</span>
+
+x
+!! end
+
+!! test
+1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<p> hi</p>
+<p> hello</p>
+!! wikitext
+hi
+
+hello
+!! end
+
+!! test
+2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p> hi</p>
+<p> hello</p>
+!! wikitext
+<nowiki> </nowiki>hi
+
+<nowiki> </nowiki> hello
+!! end
+
+!! test
+3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<p>Foo
+ bar
+baz</p>
+
+<table><tr><td>Foo
+ bar
+ baz bang</td></tr></table>
+
+<p><!--boo--> foo
+ bar</p>
+
+<p> foo
+ bar<span>boo</span></p>
+!! wikitext
+Foo
+bar
+baz
+
+{|
+|Foo
+bar
+baz bang
+|}
+
+<!--boo-->foo
+bar
+
+foo
+bar<span>boo</span>
+!! end
+
+!! test
+4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "p", "html", " a\n b" ]
+ ]
+}
+!! wikitext
+xyz
+!! wikitext/edited
+a
+b
+!! end
+
+!! test
+1. New links that end in spaces
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
+<p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
+!! wikitext
+[[Berlin ]]<nowiki/>is the capital of Germany.
+
+[[Foo ]]'''bar'''
+
+[[Boston ]] is a city.
+!! end
+
+!! test
+2. New links that end in spaces
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
+<p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
+!! wikitext
+[[Berlin]] is the capital of Germany.
+
+[[Foo]] '''bar'''
+
+[[Boston]] is a city.
+!! end
+
+!! test
+1. Table cells with escapable prefixes
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html
+<table>
+<tr><td>a</td></tr>
+<tr><td>-</td></tr>
+<tr><td>+</td></tr>
+</table>
+!! wikitext
+{|
+|a
+|-
+|<nowiki>-</nowiki>
+|-
+|<nowiki>+</nowiki>
+|}
+!! end
+
+!! test
+2. Table cells with escapable prefixes
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html
+<table>
+<tr><td>a</td></tr>
+<tr><td>-</td></tr>
+<tr><td>+</td></tr>
+</table>
+!! wikitext
+{|
+|a
+|-
+| -
+|-
+| +
+|}
+!! end
+
+!! test
+3a. Table cells with escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "table tbody tr:first-child td:first-child", "remove"]
+ ]
+}
+!! wikitext
+{|
+|a||-
+|}
+!! wikitext/edited
+{|
+| -
+|}
+!! end
+
+!! test
+3b. Table cells with escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "table tbody tr:first-child td:first-child", "html", "-" ],
+ [ "#x", "remove" ]
+ ]
+}
+!! wikitext
+{|
+|pqr
+|<span id="x">foo</span>+
+|}
+!! wikitext/edited
+{|
+| -
+| +
+|}
+!! end
+
+# FIXME: This test will fail because
+# normalization doesn't realize that the id attribute
+# will eliminate the escapable scenario
+!! test
+4a. Table cells without escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "#x", "html", "-" ]
+ ]
+}
+!! wikitext
+{|
+| id="x" |abcd
+|}
+!! wikitext/edited
+{|
+| id="x" |-
+|}
+!! end
+
+## This tests normalizer's ability to discriminate between
+## cells having identical content.
+!! test
+4b. Table cells without escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "td", "html", "-" ]
+ ]
+}
+!! wikitext
+{|
+|a||b
+|}
+!! wikitext/edited
+{|
+| -||-
+|}
+!! end
+
+## This tests normalizer's ability to not be tripped by
+## comments (and whitespace)
+!! test
+4c. Table cells without escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "table tbody tr td:first-child", "remove" ]
+ ]
+}
+!! wikitext
+{|
+|-
+<!--foo--> |a||-
+|}
+!! wikitext/edited
+{|
+|-
+<!--foo--> | -
+|}
+!! end
+
+## This tests normalizer's ability to handle HTML cells
+!! test
+4d. Table cells without escapable prefixes after edits
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "td", "html", "-" ]
+ ]
+}
+!! wikitext
+<table>
+<tr><td>a</td></tr>
+</table>
+!! wikitext/edited
+<table>
+<tr><td>-</td></tr>
+</table>
+!! end
+
+## T111151 Remove font elements without attributes
+!! test
+5a. font tags without attributes should be dropped in scrubWikitext mode
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": true
+}
+!! html
+<font>foo</font>
+<font><font>bar</font></font>
+<font class="x">boo</font>
+!! wikitext
+foo
+bar
+<font class="x">boo</font>
+!! end
+
+!! test
+5b. font tags should not be dropped without scrubWikitext being enabled
+!! options
+parsoid={
+ "modes": ["html2wt"],
+ "scrubWikitext": false
+}
+!! html
+<font>foo</font>
+!! wikitext
+<font>foo</font>
+!! end
+
+!! test
+Escape nowiki DOM elements
+!! options
+parsoid=html2wt
+!! html/parsoid
+<nowiki><i>foo</i></nowiki>
+!! wikitext
+&lt;nowiki&gt;''foo''&lt;/nowiki&gt;
+!! end
+
+# This is meant to be an interim fix while we go about figuring out
+# how to not introduce these trailing <nowiki/>s in the first place.
+!! test
+T115717: Strip trailing <nowiki/>s (without affecting valid uses)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"&lt;nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"&lt;nowiki/>"}'/>
+y</p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;nowiki/>"}},"i":0}}]}'></span></p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;nowiki/>"}},"i":0}}]}'></span></p>
+!! wikitext
+x
+y
+
+{{echo|
+1 = <nowiki/>}}
+
+{{echo|
+1 = <nowiki/>
+}}
+!! end
+
+!! test
+New list is serialized on newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>The quick brown fox jumps over the lazy dog.</p><ul>
+<li>Yesterday</li>
+<li>Today</li>
+<li>Tomorrow</li>
+</ul><p>The quick onyx goblin jumps over the lazy dwarf.</p>
+!! wikitext
+The quick brown fox jumps over the lazy dog.
+
+* Yesterday
+* Today
+* Tomorrow
+
+The quick onyx goblin jumps over the lazy dwarf.
+!! end
+
+!! test
+New lists in formatting elements serialized w/o newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+<small>
+
+<ul>
+<li>123</li>
+</ul>
+
+</small>
+
+<small><ul><li>hi</li></ul></small>
+!! wikitext
+<small>
+* 123
+</small>
+
+<small>
+* hi
+</small>
+!! end
+
+!! test
+New list in table doesn't need newlines
+!! options
+parsoid=html2wt
+!! html/parsoid
+<table><tr><td><ul><li>test</li><li>123</li></td></tr></table>
+!! wikitext
+{|
+|
+* test
+* 123
+|}
+!! end
+
+# ---------------------------------------------------
+# End of tests spec'ing wikitext serialization norms |
+# ---------------------------------------------------
+
+# T104032
+!! test
+Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
+!! options
+parsoid=html2wt
+!! html/parsoid
+a<p>b</p>
+<b>c</b><p>d</p>
+<table><tr>
+<td>a<p>b</p></td>
+<td><b>c</b><p>d</p></td>
+</tr></table>
+!! wikitext
+a
+
+b
+
+'''c'''
+
+d
+{|
+|a
+b
+|'''c'''
+d
+|}
+!! end
+
+!! test
+Anchor without href scenarios
+!! options
+parsoid={ "modes": ["html2wt"], "suppressErrors": true }
+!! html/parsoid
+<a class="bc"></a>
+<a class="no">dice</a>
+<a name="foo"></a>
+!! wikitext
+
+dice
+<span name="foo"></span>
+!! end
+
+!! test
+New transclusion added after a list should be serialized after the list
+!! options
+parsoid=html2wt
+!! html/parsoid
+<ul><li>a</li></ul><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>
+!! wikitext
+* a
+{{echo|foo}}
+!! end
+
+# -----------------------------------------------------------------
+# End of section for Parsoid-only html2wt tests for serialization
+# of new content
+# -----------------------------------------------------------------
+
+# -----------------------------------------------------------------
+# The following section of tests are primarily to spec behavior of
+# the selective serializer. All these tests have manual selser
+# changes. The automated selser changes for all tests handle the
+# wide variation of changes, but these tests here capture specs
+# deterministically.
+# ----------------------------------------------------------------
+
+## T90517
+!! test
+Selser: New comments should not be lost
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "#a", "after", "<!--c1-->" ],
+ [ "#b", "before", "<!--c2-->" ]
+ ]
+}
+!! wikitext
+<span id="a">a</span>
+
+<span id="b">b</span>
+!! wikitext/edited
+<span id="a">a</span><!--c1-->
+
+<!--c2--><span id="b">b</span>
+!! end
+
+## T89383
+!! test
+Selser: Check for validity of DSR before using it
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
+ ]
+}
+!! wikitext
+<span id="a">a</span>
+!! wikitext/edited
+{{DISPLAYTITLE:foo}}
+<span id="a">a</span>
+!! end
+
+!! test
+1. DOMDiff: Changes to <ref> content should be looked up using id
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ ["#X", "after", "bar"],
+ ["#Y", "after", "baz"]
+ ]
+}
+!! wikitext
+X <ref><span id="X">foo</span></ref>
+Y <ref name="a" />
+<references>
+<ref name="a"><span id="Y">foo</span></ref>
+</references>
+!! wikitext/edited
+X <ref><span id="X">foo</span>bar</ref>
+Y <ref name="a" />
+<references>
+<ref name="a"><span id="Y">foo</span>baz</ref>
+</references>
+!! end
+
+!! test
+2. DOMDiff: Changes to <ref> content should be looked up using id
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ ["#Z", "after", "bar"]
+ ]
+}
+!! wikitext
+A <ref>foo bar for a</ref>
+B <ref group="X" name="b" />
+
+<references />
+
+<references group="X">
+<ref name="b"><span id="Z">foo</span></ref>
+</references>
+!! wikitext/edited
+A <ref>foo bar for a</ref>
+B <ref group="X" name="b" />
+
+<references />
+
+<references group="X">
+<ref name="b"><span id="Z">foo</span>bar</ref>
+</references>
+!! end
+
+!! test
+DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "div:first-child", "text", "bar" ]
+ ]
+}
+!! wikitext
+<div style="{{1x|color:red;}}%">foo</div>
+!! wikitext/edited
+<div style="{{1x|color:red;}}%">bar</div>
+!! end
+
+!! test
+Empty LI (T49673)
+!! wikitext
+*a
+*
+*
+*b
+!! html+tidy
+<ul><li>a</li>
+<li class="mw-empty-elt"></li>
+<li class="mw-empty-elt"></li>
+<li>b</li></ul>
+!! end
+
+!! test
+Thumbnail output
+!! wikitext
+[[File:Thumb.png|thumb]]
+!! html/php+tidy
+<div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Thumb.png" class="image"><img alt="Thumb.png" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
+!! html/parsoid
+<figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Thumb.png"><img resource="./File:Thumb.png" src="//example.com/images/e/ea/Thumb.png" data-file-width="135" data-file-height="135" data-file-type="bitmap" height="135" width="135"/></a></figure>
+!! end
+
+!! test
+unclosed internal link XSS (T137264)
+!! wikitext
+[[#%3Cscript%3Ealert(1)%3C/script%3E|
+!! html/php
+<p>[[#&lt;script&gt;alert(1)&lt;/script&gt;|
+</p>
+!! html/parsoid
+<p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
+!! end
+
+!! test
+Validating that <style> isn't eaten by tidy (T167349)
+!! options
+styletag=1
+!! wikitext
+<div class="foo">
+<style>.foo::before { content: "<foo>"; }</style>
+<style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
+</div>
+!! html/php+tidy
+<div class="foo">
+<style>.foo::before { content: "<foo>"; }</style>
+<style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
+</div>
+!! end
+
+!! test
+Validating that <style> isn't wrapped in a paragraph (T186965)
+!! options
+styletag=1
+!! wikitext
+A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+
+<style>.foo::before { content: "<foo>"; }</style>
+
+<style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
+
+But if it's on a line with other content, let it be wrapped.
+
+<style>.foo::before { content: "<foo>"; }</style> bar
+
+foo <style>.foo::before { content: "<foo>"; }</style>
+
+foo <style>.foo::before { content: "<foo>"; }</style> bar
+
+And the same if we have non-paragraph-breaking whitespace
+
+foo
+<style>.foo::before { content: "<foo>"; }</style>
+bar
+!! html/php
+<p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+</p>
+<style>.foo::before { content: "<foo>"; }</style>
+<style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
+<p>But if it's on a line with other content, let it be wrapped.
+</p><p><style>.foo::before { content: "<foo>"; }</style> bar
+</p><p>foo <style>.foo::before { content: "<foo>"; }</style>
+</p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
+</p><p>And the same if we have non-paragraph-breaking whitespace
+</p><p>foo
+<style>.foo::before { content: "<foo>"; }</style>
+bar
+</p>
+!! end
+
+!! test
+Validating that <link> isn't wrapped in a paragraph (T186965)
+!! options
+styletag=1
+!! wikitext
+A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+
+<link rel="foo" href="bar"/>
+
+<link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
+
+But if it's on a line with other content, let it be wrapped.
+
+<link rel="foo" href="bar"/> bar
+
+foo <link rel="foo" href="bar"/>
+
+foo <link rel="foo" href="bar"/> bar
+
+And the same if we have non-paragraph-breaking whitespace
+
+foo
+<link rel="foo" href="bar"/>
+bar
+!! html/php
+<p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+</p>
+<link rel="foo" href="bar"/>
+<link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
+<p>But if it's on a line with other content, let it be wrapped.
+</p><p><link rel="foo" href="bar"/> bar
+</p><p>foo <link rel="foo" href="bar"/>
+</p><p>foo <link rel="foo" href="bar"/> bar
+</p><p>And the same if we have non-paragraph-breaking whitespace
+</p><p>foo
+<link rel="foo" href="bar"/>
+bar
+</p>
+!! end
+
+!! test
+Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+==A&B&amp;C&amp;amp;D&amp;amp;amp;E==
+[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]
+!! html/php
+<h2><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE"></span><span class="mw-headline" id="A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E">A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E">#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</a>
+</p>
+!! html/parsoid
+<h2 id="A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E"><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE" typeof="mw:FallbackId" data-parsoid="{}"></span>A&amp;B<span typeof="mw:Entity" data-parsoid='{"src":"&amp;amp;","srcContent":"&amp;"}'>&amp;</span>C<span typeof="mw:Entity" data-parsoid='{"src":"&amp;amp;","srcContent":"&amp;"}'>&amp;</span>amp;D<span typeof="mw:Entity" data-parsoid='{"src":"&amp;amp;","srcContent":"&amp;"}'>&amp;</span>amp;amp;E</h2>
+<p><a rel="mw:WikiLink" href="./Main_Page#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E"},"sa":{"href":"#A&amp;B&amp;amp;C&amp;amp;amp;D&amp;amp;amp;amp;E"}}'>#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</a></p>
+!! end
+
+!! test
+Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
+!! config
+wgFragmentMode=[ 'legacy' ]
+!! wikitext
+==A&B&amp;C&amp;amp;D&amp;amp;amp;E==
+[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]
+!! html/php
+<h2><span class="mw-headline" id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&amp;B&amp;C&amp;amp;D&amp;amp;amp;E</a>
+</p>
+!! end
+
+!! test
+Decoding of HTML entities in embedded HTML tags
+!! wikitext
+<table class="1&2&amp;3&amp;amp;4&amp;amp;amp;5"><tr><td>x</td></tr></table>
+!! html/php
+<table class="1&amp;2&amp;3&amp;amp;4&amp;amp;amp;5"><tr><td>x</td></tr></table>
+
+!! html/parsoid
+<table class="1&amp;2&amp;3&amp;amp;4&amp;amp;amp;5" data-parsoid='{"stx":"html","a":{"class":"1&amp;2&amp;3&amp;amp;4&amp;amp;amp;5"},"sa":{"class":"1&amp;2&amp;amp;3&amp;amp;amp;4&amp;amp;amp;amp;5"}}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>x</td></tr></tbody></table>
+!! end
+
+!! test
+Decoding of HTML entities in indicator names for IDs (T104196)
+!! options
+parsoid=wt2html,html2html
+showindicators
+!! wikitext
+<indicator name="1&2&amp;3&amp;amp;4&amp;amp;amp;5">Indicator</indicator>
+!! html/php
+1&2&3&amp;4&amp;amp;5=Indicator
+
+!! html/parsoid
+<p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&amp;2&amp;3&amp;amp;4&amp;amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
+!! end
+
+# this version of the test strips out the ambiguity so Parsoid rts cleanly
+!! test
+Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
+!! options
+showindicators
+!! wikitext
+<indicator name="1&2&3&amp;amp;4&amp;amp;amp;5">Indicator</indicator>
+!! html/php
+1&2&3&amp;4&amp;amp;5=Indicator
+
+!! html/parsoid
+<p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&amp;2&amp;3&amp;amp;4&amp;amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
+!! end
+
+# This fragment mode is what Parsoid supports.
+!! test
+HTML5 ids: fallback to legacy
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+==Foo bar==
+
+==foo Bar==
+
+==Тест==
+
+==Тест==
+
+==тест==
+
+==Hey < # " > % : '==
+[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
+
+{{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
+
+<!-- These two links should produce identical HTML -->
+[[#啤酒]] [[#%E5%95%A4%E9%85%92]]
+
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
+<li class="toclevel-1 tocsection-6"><a href="#Hey_&lt;_#_&quot;_&gt;_%_:_&#39;"><span class="tocnumber">6</span> <span class="toctext">Hey &lt; # " &gt;&#160;%&#160;: '</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id=".D0.A2.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id=".D0.A2.D0.B5.D1.81.D1.82_2"></span><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id=".D1.82.D0.B5.D1.81.D1.82"></span><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id="Hey_.3C_.23_.22_.3E_.25_:_.27"></span><span class="mw-headline" id="Hey_&lt;_#_&quot;_&gt;_%_:_'">Hey &lt; # " &gt;&#160;%&#160;: '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Hey &lt; # &quot; &gt; % : &#039;">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_&lt;_#_&quot;_&gt;_%_:_&#39;">#Hey &lt; # " &gt;&#160;%&#160;: '</a>
+</p><p>💩 <span id="💩"></span>
+</p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
+</p>
+!! html/parsoid
+<h2 id="Foo_bar">Foo bar</h2>
+
+<h2 id="foo_Bar_2">foo Bar</h2>
+
+<h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
+
+<h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
+
+<h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
+
+<h2 id="Hey_&lt;_#_&quot;_>_%_:_'"><span id="Hey_.3C_.23_.22_.3E_.25_:_.27" typeof="mw:FallbackId"></span>Hey &lt; # " > %<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: '</h2>
+<p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_&lt;_#_&quot;_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_&lt;_#_\"_>_%_:_&#39;"},"sa":{"href":"#Hey &lt; # \" > % : &#39;"}}'>#Hey &lt; # " > % : '</a></p>
+
+<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:💩","function":"anchorencode"},"params":{},"i":0}}]}'>💩</span> <span id="💩" about="#mwt3" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"id"},{"html":"&lt;span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[178,197,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}&#39;>💩&lt;/span>"}]]}'></span></p>
+
+<!-- These two links should produce identical HTML -->
+<p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
+!! end
+
+# Parsoid doesn't support this mode
+!! test
+HTML5 ids: legacy with a fallback to modern
+!! config
+wgFragmentMode=[ 'legacy', 'html5' ]
+!! wikitext
+==Foo bar==
+
+==foo Bar==
+
+==Тест==
+
+==Тест==
+
+==тест==
+
+==Hey < # " > % : '==
+[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
+
+{{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
+
+<!-- These two links should produce identical HTML -->
+[[#啤酒]] [[#%E5%95%A4%E9%85%92]]
+
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#.D0.A2.D0.B5.D1.81.D1.82"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#.D0.A2.D0.B5.D1.81.D1.82_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#.D1.82.D0.B5.D1.81.D1.82"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
+<li class="toclevel-1 tocsection-6"><a href="#Hey_.3C_.23_.22_.3E_.25_:_.27"><span class="tocnumber">6</span> <span class="toctext">Hey &lt; # " &gt;&#160;%&#160;: '</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id="Тест"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id="Тест_2"></span><span class="mw-headline" id=".D0.A2.D0.B5.D1.81.D1.82_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id="тест"></span><span class="mw-headline" id=".D1.82.D0.B5.D1.81.D1.82">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span id="Hey_&lt;_#_&quot;_&gt;_%_:_'"></span><span class="mw-headline" id="Hey_.3C_.23_.22_.3E_.25_:_.27">Hey &lt; # " &gt;&#160;%&#160;: '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Hey &lt; # &quot; &gt; % : &#039;">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#.D0.A2.D0.B5.D1.81.D1.82">#Тест</a> <a href="#.D1.82.D0.B5.D1.81.D1.82">#тест</a> <a href="#Hey_.3C_.23_.22_.3E_.25_:_.27">#Hey &lt; # " &gt;&#160;%&#160;: '</a>
+</p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
+</p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
+</p>
+!! end
+
+# Parsoid doesn't support this mode.
+!! test
+HTML5 ids: no legacy
+!! config
+wgFragmentMode=[ 'html5' ]
+!! wikitext
+==Foo bar==
+
+==foo Bar==
+
+==Тест==
+
+==Тест==
+
+==тест==
+
+==Hey < # " > % : '==
+[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
+
+{{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
+
+<!-- These two links should produce identical HTML -->
+[[#啤酒]] [[#%E5%95%A4%E9%85%92]]
+
+!! html/php
+<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
+<ul>
+<li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
+<li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
+<li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
+<li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
+<li class="toclevel-1 tocsection-6"><a href="#Hey_&lt;_#_&quot;_&gt;_%_:_&#39;"><span class="tocnumber">6</span> <span class="toctext">Hey &lt; # " &gt;&#160;%&#160;: '</span></a></li>
+</ul>
+</div>
+
+<h2><span class="mw-headline" id="Foo_bar">Foo bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="foo_Bar_2">foo Bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: foo Bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Тест">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Тест_2">Тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=4" title="Edit section: Тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="тест">тест</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=5" title="Edit section: тест">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Hey_&lt;_#_&quot;_&gt;_%_:_'">Hey &lt; # " &gt;&#160;%&#160;: '</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=6" title="Edit section: Hey &lt; # &quot; &gt; % : &#039;">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_&lt;_#_&quot;_&gt;_%_:_&#39;">#Hey &lt; # " &gt;&#160;%&#160;: '</a>
+</p><p>💩 <span id="💩"></span>
+</p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
+</p>
+!! end
+
+!! test
+T90902: Normalize weird characters in section IDs
+!! config
+wgFragmentMode=[ 'html5', 'legacy' ]
+!! wikitext
+==Foo&nbsp;bar==
+[[#Foo&nbsp;bar]]
+
+!! html/php
+<h2><span class="mw-headline" id="Foo_bar">Foo&#160;bar</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Foo bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<p><a href="#Foo_bar">#Foo&#160;bar</a>
+</p>
+!! html/parsoid
+<h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span>bar </h2>
+<p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&amp;nbsp;bar"}}'>#Foo bar</a></p>
+!! end
+
+!! test
+T51672: Test for brackets in attributes of elements in external link texts
+!! wikitext
+[http://example.com/ link <span title="title with [brackets]">span</span>]
+[http://example.com/ link <span title="title with &#91;brackets&#93;">span</span>]
+
+!! html/php
+<p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with &#91;brackets&#93;">span</span></a>
+<a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with &#91;brackets&#93;">span</span></a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
+<a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &amp;#91;brackets&amp;#93;"}}'>span</span></a></p>
+!! end
+
+!! test
+T72875: Test for brackets in attributes of elements in internal link texts
+!! wikitext
+[[Foo|link <span title="title with [[double brackets]]">span</span>]]
+[[Foo|link <span title="title with &#91;&#91;double brackets&#93;&#93;">span</span>]]
+
+!! html/php
+<p><a href="/wiki/Foo" title="Foo">link <span title="title with &#91;&#91;double brackets&#93;&#93;">span</span></a>
+<a href="/wiki/Foo" title="Foo">link <span title="title with &#91;&#91;double brackets&#93;&#93;">span</span></a>
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
+<a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]" data-parsoid='{"stx":"html","a":{"title":"title with [[double brackets]]"},"sa":{"title":"title with &amp;#91;&amp;#91;double brackets&amp;#93;&amp;#93;"}}'>span</span></a></p>
+!! end
+
+!! test
+T179544: {{anchorencode:}} output should be always usable in links
+!! config
+wgFragmentMode=[ 'html5' ]
+!! wikitext
+<span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
+!! html/php
+<p><span id="&#91;foo&#93;"></span><a href="#[foo]">#&#91;foo&#93;</a>
+</p>
+!! html/parsoid
+<p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"&lt;span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid=&apos;{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}&apos; data-mw=&apos;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}&apos;>[&lt;/span>&lt;span about=\"#mwt1\" data-parsoid=\"{}\">foo&lt;/span>&lt;span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid=&apos;{\"src\":\"&amp;amp;#x5D;\",\"srcContent\":\"]\"}&apos;>]&lt;/span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#&lt;span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid=&apos;{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}&apos; data-mw=&apos;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}&apos;>[&lt;/span>&lt;span about=\"#mwt2\" data-parsoid=\"{}\">foo&lt;/span>&lt;span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid=&apos;{\"src\":\"&amp;amp;#x5D;\",\"srcContent\":\"]\"}&apos;>]&lt;/span>"}]]}'>#[foo]</a></p>
+!! end
+
+## ------------------------------
+## Parsoid section-wrapping tests
+## ------------------------------
+!! test
+Section wrapping for well-nested sections (no leading content)
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+=1=
+a
+
+=2=
+b
+
+==2.1==
+c
+
+==2.2==
+d
+
+===2.2.1===
+e
+
+=3=
+f
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+</section><section data-mw-section-id="2"><h1 id="2">2</h1>
+<p>b</p>
+
+<section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
+<p>c</p>
+
+</section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
+<p>d</p>
+
+<section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
+<p>e</p>
+
+</section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
+<p>f</p>
+
+</section>
+!! end
+
+!! test
+Section wrapping for well-nested sections (with leading content)
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+Para 1.
+
+Para 2 with a <div>nested in it</div>
+
+Para 3.
+
+=1=
+a
+
+=2=
+b
+
+==2.1==
+c
+!! html/parsoid
+<section data-mw-section-id="0"><p>Para 1.</p>
+
+<p>Para 2 with a </p><div>nested in it</div>
+
+<p>Para 3.</p>
+
+</section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+</section><section data-mw-section-id="2"><h1 id="2">2</h1>
+<p>b</p>
+
+<section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
+<p>c</p>
+
+</section></section>
+!! end
+
+!! test
+Section wrapping with template-generated sections (good nesting 1)
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+=1=
+a
+
+{{echo|1=
+==1.1==
+b
+}}
+
+==1.2==
+c
+
+=2=
+d
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+<section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,33,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.1==\nb"}},"i":0}}]}'>1.1</h2><span about="#mwt1">
+</span><p about="#mwt1">b</p>
+</section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
+<p>c</p>
+
+</section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
+<p>d</p></section>
+!! end
+
+# In this example, the template scope is mildly expanded to incorporate the
+# trailing newline after the transclusion since that is part of section 1.1.1
+!! test
+Section wrapping with template-generated sections (good nesting 2)
+!! options
+parsoid={
+ "wrapSections": true,
+ "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+=1=
+a
+
+{{echo|1=
+==1.1==
+b
+===1.1.1===
+d
+}}
+=2=
+e
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+<section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,50,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.1==\nb\n===1.1.1===\nd"}},"i":0}},"\n"]}'>1.1</h2><span about="#mwt1">
+</span><p about="#mwt1">b</p><span about="#mwt1">
+</span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
+</span><p about="#mwt1">d</p><span about="#mwt1">
+</span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
+<p>e</p></section>
+!! end
+
+# In this example, the template scope is mildly expanded to incorporate the
+# trailing newline after the transclusion since that is part of section 1.2.1
+!! test
+Section wrapping with template-generated sections (good nesting 3)
+!! options
+parsoid={
+ "wrapSections": true,
+ "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+=1=
+a
+
+{{echo|1=
+x
+==1.1==
+b
+==1.2==
+c
+===1.2.1===
+d
+}}
+=2=
+e
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
+<p>a</p>
+
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[9,60,0,0],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"x\n==1.1==\nb\n==1.2==\nc\n===1.2.1===\nd"}},"i":0}},"\n"]}'>x</p><span about="#mwt1">
+</span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
+</span><p about="#mwt1">b</p><span about="#mwt1">
+</span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
+</span><p about="#mwt1">c</p><span about="#mwt1">
+</span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
+</span><p about="#mwt1">d</p><span about="#mwt1">
+</span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
+<p>e</p></section>
+!! end
+
+# Because of section-wrapping and template-wrapping interactions,
+# the scope of the template is expanded so that the template markup
+# is valid in the presence of <section> tags.
+# This exercises the s1 is null scenario in the wrapSections code
+!! test
+Section wrapping with template-generated sections (bad nesting 1)
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+<div>
+a
+
+{{echo|
+=1=
+b
+}}
+
+c
+</div>
+!! html/parsoid
+<section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
+<p>a</p>
+
+<span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n=1=\nb\n"}},"i":0}},"\n\nc\n"]}'>
+</span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
+</span><p about="#mwt1">b
+</p><span about="#mwt1">
+
+</span><p about="#mwt1">c</p><span about="#mwt1">
+</span></section></div></section>
+!! end
+
+# Because of section-wrapping and template-wrapping interactions,
+# the scope of the template is expanded so that the template markup
+# is valid in the presence of <section> tags.
+# This exercises the s1 is ancestor of s2 scenario in the wrapSections code
+!! test
+Section wrapping with template-generated sections (bad nesting 2)
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+=1=
+a
+
+{{echo|1=
+=2=
+b
+==2.1==
+c
+}}
+
+d
+
+=3=
+e
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+</section><section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="2" data-parsoid='{"dsr":[9,45,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"=2=\nb\n==2.1==\nc"}},"i":0}},"\n\nd\n\n"]}'>2</h1><span about="#mwt1">
+</span><p about="#mwt1">b</p><span about="#mwt1">
+</span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
+</span><p about="#mwt1">c</p><span about="#mwt1">
+
+</span><p about="#mwt1">d</p><span about="#mwt1">
+
+</span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
+<p>e</p></section>
+!! end
+
+# Because of section-wrapping and template-wrapping interactions,
+# additional template wrappers are added to <section> tags
+# so that template wrapping semantics are valid whether section
+# tags are retained or stripped. But, the template scope can expand
+# greatly when accounting for section tags.
+# This exercises the s1 and s2 are in different subtrees scenario
+!! test
+Section wrapping with template-generated sections (bad nesting 3)
+!! options
+parsoid={
+ "wrapSections": true,
+ "modes": ["wt2html", "wt2wt"]
+}
+!! wikitext
+=1=
+a
+
+{{echo|1=
+==1.2==
+b
+=2=
+c
+}}
+
+d
+
+=3=
+e
+!! html/parsoid
+<section data-mw-section-id="0"></section><section data-mw-section-id="1" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["=1=\na\n\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.2==\nb\n=2=\nc"}},"i":0}},"\n\nd\n\n"]}'><h1 id="1">1</h1>
+<p>a</p>
+
+<section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"==1.2==\nb\n=2=\nc"}},"i":0}}]}'>1.2</h2><span about="#mwt1">
+</span><p about="#mwt1">b</p><span about="#mwt1">
+</span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
+</span><p about="#mwt1">c</p>
+
+<p>d</p>
+</section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
+<p>e</p></section>
+!! end
+
+!! test
+Section wrapping with uneditable lead section + div wrapping multiple sections
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+foo
+
+<div style="border:1px solid red;">
+=1=
+a
+
+==1.1==
+b
+
+=2=
+c
+</div>
+
+=3=
+d
+
+==3.1==
+e
+!! html/parsoid
+<section data-mw-section-id="-1"><p>foo</p>
+
+</section><section data-mw-section-id="-2"><div style="border:1px solid red;">
+<section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+<section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
+<p>b</p>
+
+</section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
+<p>c</p>
+</section></div>
+
+</section><section data-mw-section-id="4"><h1 id="3">3</h1>
+<p>d</p>
+
+<section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
+<p>e</p>
+</section></section>
+!! end
+
+!! test
+Section wrapping with editable lead section + div overlapping multiple sections
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+foo
+
+=1=
+a
+<div style="border:1px solid red;">
+b
+
+==1.1==
+c
+
+=2=
+d
+</div>
+e
+
+=3=
+f
+
+==3.1==
+g
+!! html/parsoid
+<section data-mw-section-id="0"><p>foo</p>
+
+</section><section data-mw-section-id="-1"><h1 id="1">1</h1>
+<p>a</p>
+</section><section data-mw-section-id="-2"><div style="border:1px solid red;">
+<p>b</p>
+
+<section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
+<p>c</p>
+
+</section><section data-mw-section-id="-1"><h1 id="2">2</h1>
+<p>d</p>
+</section></div>
+<p>e</p>
+
+</section><section data-mw-section-id="4"><h1 id="3">3</h1>
+<p>f</p>
+
+<section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
+<p>g</p>
+</section></section>
+!! end
+
+!! test
+HTML header tags should not be wrapped in section tags
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+foo
+
+<h1>a</h1>
+
+=b=
+
+<h1>c</h1>
+
+=d=
+!! html/parsoid
+<section data-mw-section-id="0"><p>foo</p>
+
+<h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
+
+</section><section data-mw-section-id="1"><h1 id="b">b</h1>
+
+<h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
+
+</section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
+!! end
+
+!! test
+Lead section containing only whitespace and comments.
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+
+<!-- this is a comment, presumably significant to editors -->
+=1=
+a
+
+=2=
+b
+!! html/parsoid
+<section data-mw-section-id="0" data-parsoid="{}">
+<!-- this is a comment, presumably significant to editors -->
+</section><section data-mw-section-id="1"><h1 id="1">1</h1>
+<p>a</p>
+
+</section><section data-mw-section-id="2"><h1 id="2">2</h1>
+<p>b</p></section>
+!! end
+
+!! test
+Pseudo-sections emitted by templates should have id -2
+!! options
+parsoid={
+ "wrapSections": true
+}
+!! wikitext
+foo
+{{echo|<div>
+==a==
+==b==
+</div>
+}}
+!! html/parsoid
+<section data-mw-section-id="-1"><p>foo</p>
+</section><section data-mw-section-id="-2"><div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;div>\n==a==\n==b==\n&lt;/div>\n"}},"i":0}}]}'>
+<section data-mw-section-id="-1"><h2 id="a">a</h2>
+</section><section data-mw-section-id="-1"><h2 id="b">b</h2>
+</section></div><span about="#mwt1">
+</span></section>
+!! end
+
+##########################################################################
+Tests demonstrating white-space insensitivity in input wikitext
+for wikitext headings, wikitext list items, and wikitext table captions,
+headings, and cells. HTML versions of the same should preserve whitespace.
+##########################################################################
+!! test
+Trim whitespace in wikitext headings, list items, table captions, headings, and cells
+!! wikitext
+__NOTOC__
+== <!--c1--> <!--c2--> Spaces <!--c3--> <!--c4--> ==
+== <!--c2--> <!--c2--> Tabs <!--c3--><!--c4--> ==
+* <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
+; <!--term to define--> term : <!--term's definition--> definition
+{|
+|+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
+|-
+! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
+|-
+| <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
+|-
+| class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
+|-
+| <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
+|}
+: {|
+ | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
+ |} foo <!--c1-->
+!! html/php+tidy
+<h2><span class="mw-headline" id="Spaces">Spaces</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Spaces">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Tabs">Tabs</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Tabs">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
+<ul><li>List item</li></ul>
+<dl><dt>term&#160;</dt>
+<dd>definition</dd></dl>
+<table>
+<caption>Table Caption
+</caption>
+<tbody><tr>
+<th>Table Heading 1</th>
+<th>Table Heading 2
+</th></tr>
+<tr>
+<td>Table Cell 1</td>
+<td>Table Cell 2
+</td></tr>
+<tr>
+<td>class="foo"</td>
+<td>Table Cell 3
+</td></tr>
+<tr>
+<td>testing <a href="/index.php?title=One&amp;action=edit&amp;redlink=1" class="new" title="One (page does not exist)">two</a> | some content
+</td></tr></tbody></table>
+<dl><dd><table>
+<tbody><tr>
+<td>Table Cell 1</td>
+<td>Table Cell 2
+</td></tr></tbody></table> foo</dd></dl>
+!! end
+
+# Looks like <caption> is not accepted in HTML
+!! test
+Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
+!! wikitext
+__NOTOC__
+<h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> </h2>
+<ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
+<table>
+<tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
+<tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
+</table>
+!! html/php+tidy
+<h2><span class="mw-headline" id="Heading"> Heading </span></h2>
+<ul><li> List item </li></ul>
+<table>
+<tbody><tr><th> Table Heading </th><th></th></tr>
+<tr><td> Table Cell </td><th></th></tr>
+</tbody></table>
+!! end
+
+!! test
+Do not trim whitespace in links and quotes
+!! wikitext
+foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
+[[Foo| some text ]]
+!! html/php+tidy
+<p>foo <i> italic </i> and <b> bold </b>
+<a href="/wiki/Foo" title="Foo"> some text </a>
+</p>
+!! end
+
+!! test
+Remove p tags surrounding a single element in a figcaption
+!! options
+parsoid=html2wt
+!! wikitext
+[[File:Foobar.jpg|right|200x200px|Caption]]
+!! html/parsoid
+<figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="23" width="200"/></a><figcaption><p>Caption</p></figcaption></figure>
+!! end
+
+!! test
+Selser preserves lack of newline before list and allows newline after the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "scrubWikitext": true,
+ "changes": [
+ [ "ul", "after", "<p>footer</p>" ]
+ ]
+}
+!! wikitext
+header
+*foo
+*bar
+!! wikitext/edited
+header
+*foo
+*bar
+
+footer
+!! end
+
+
+!! test
+Selser does not introduce newlines between unedited paragraph preceding the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "table tbody tr td p:last-child", "empty" ]
+ ]
+}
+!! wikitext
+{|
+|
+header
+*foo
+*bar
+footer
+|}
+!! wikitext/edited
+{|
+|
+header
+*foo
+*bar
+
+|}
+!! end
+
+!! test
+Selser does not introduce newlines between unedited paragraph following the list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "table tbody tr td p:first-child", "empty" ]
+ ]
+}
+!! wikitext
+{|
+|
+header
+*foo
+*bar
+footer
+|}
+!! wikitext/edited
+{|
+|
+
+*foo
+*bar
+footer
+|}
+!! end
+
+!! test
+Remove a list item but do not insert newline above list
+!! options
+parsoid={
+ "modes": ["selser"],
+ "changes": [
+ [ "ul li:last-child", "remove" ]
+ ]
+}
+!! wikitext
+header
+*foo
+*bar
+footer
+!! wikitext/edited
+header
+*foo
+footer
+!! end
diff --git a/www/wiki/tests/parser/preprocess/All_system_messages.expected b/www/wiki/tests/parser/preprocess/All_system_messages.expected
new file mode 100644
index 00000000..286a1a4f
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/All_system_messages.expected
@@ -0,0 +1,5604 @@
+<root><template><title>int:57dbe26a</title></template>
+
+&lt;table border=1 width=100%&gt;&lt;tr&gt;&lt;td&gt;
+'''Name'''
+&lt;/td&gt;&lt;td&gt;
+'''Default text'''
+&lt;/td&gt;&lt;td&gt;
+'''Current text'''
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f9cca05b&amp;action=edit f9cca05b]&lt;br&gt;
+[[MediaWiki_talk:f9cca05b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 moved to $2
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f9cca05b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ed065216&amp;action=edit ed065216]&lt;br&gt;
+[[MediaWiki_talk:ed065216|Talk]]
+&lt;/td&gt;&lt;td&gt;
+/* edit this file to customize the monobook skin for the entire site */
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ed065216</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b21fb79&amp;action=edit 5780daf6]&lt;br&gt;
+[[MediaWiki_talk:6b21fb79|Talk]]
+&lt;/td&gt;&lt;td&gt;
+About
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6b21fb79</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54f19e13&amp;action=edit 4bd9b804]&lt;br&gt;
+[[MediaWiki_talk:54f19e13|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:About
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:54f19e13</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e17cc1b&amp;action=edit 7be96c69]&lt;br&gt;
+[[MediaWiki_talk:8e17cc1b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+About Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8e17cc1b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4b7f0428&amp;action=edit 69f5ae1e]&lt;br&gt;
+[[MediaWiki_talk:4b7f0428|Talk]]
+&lt;/td&gt;&lt;td&gt;
++
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4b7f0428</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b18a7fba&amp;action=edit ba8c9426]&lt;br&gt;
+[[MediaWiki_talk:b18a7fba|Talk]]
+&lt;/td&gt;&lt;td&gt;
+n
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b18a7fba</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3cfd08b4&amp;action=edit 098256f5]&lt;br&gt;
+[[MediaWiki_talk:3cfd08b4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3cfd08b4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d00706c5&amp;action=edit 7638fc38]&lt;br&gt;
+[[MediaWiki_talk:d00706c5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+a
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d00706c5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7bbcdfc9&amp;action=edit 840afed8]&lt;br&gt;
+[[MediaWiki_talk:7bbcdfc9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+v
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7bbcdfc9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0750ed4b&amp;action=edit 9703e6d9]&lt;br&gt;
+[[MediaWiki_talk:0750ed4b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-contributions&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0750ed4b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:602dda6f&amp;action=edit 7e13f963]&lt;br&gt;
+[[MediaWiki_talk:602dda6f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-currentevents&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:602dda6f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a395260e&amp;action=edit be42f966]&lt;br&gt;
+[[MediaWiki_talk:a395260e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+d
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a395260e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f89faca3&amp;action=edit 89888a71]&lt;br&gt;
+[[MediaWiki_talk:f89faca3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+e
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f89faca3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc7a3e78&amp;action=edit 7b2ee991]&lt;br&gt;
+[[MediaWiki_talk:bc7a3e78|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-emailuser&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bc7a3e78</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e9d3613&amp;action=edit fe788279]&lt;br&gt;
+[[MediaWiki_talk:9e9d3613|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-help&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9e9d3613</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7ea0e322&amp;action=edit 4bb7a2e4]&lt;br&gt;
+[[MediaWiki_talk:7ea0e322|Talk]]
+&lt;/td&gt;&lt;td&gt;
+h
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7ea0e322</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4204d3db&amp;action=edit 725cb6bf]&lt;br&gt;
+[[MediaWiki_talk:4204d3db|Talk]]
+&lt;/td&gt;&lt;td&gt;
+o
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4204d3db</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a92e37a&amp;action=edit a1de2049]&lt;br&gt;
+[[MediaWiki_talk:2a92e37a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+o
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a92e37a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:68d388ec&amp;action=edit 0542623d]&lt;br&gt;
+[[MediaWiki_talk:68d388ec|Talk]]
+&lt;/td&gt;&lt;td&gt;
+z
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:68d388ec</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18fe1121&amp;action=edit e3f25b72]&lt;br&gt;
+[[MediaWiki_talk:18fe1121|Talk]]
+&lt;/td&gt;&lt;td&gt;
+i
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:18fe1121</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6d15983f&amp;action=edit c9d212d3]&lt;br&gt;
+[[MediaWiki_talk:6d15983f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+m
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6d15983f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ecaba7f4&amp;action=edit ac57178f]&lt;br&gt;
+[[MediaWiki_talk:ecaba7f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+y
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ecaba7f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:711aec5d&amp;action=edit 6d3ae9a7]&lt;br&gt;
+[[MediaWiki_talk:711aec5d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+n
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:711aec5d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9905f56f&amp;action=edit 0a376cab]&lt;br&gt;
+[[MediaWiki_talk:9905f56f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-portal&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9905f56f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9305eef3&amp;action=edit e72912be]&lt;br&gt;
+[[MediaWiki_talk:9305eef3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-preferences&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9305eef3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:186ee8a4&amp;action=edit cef51de6]&lt;br&gt;
+[[MediaWiki_talk:186ee8a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+p
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:186ee8a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:676f28e9&amp;action=edit 0f10afb5]&lt;br&gt;
+[[MediaWiki_talk:676f28e9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+=
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:676f28e9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1a09f43e&amp;action=edit 46a4e82c]&lt;br&gt;
+[[MediaWiki_talk:1a09f43e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+x
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1a09f43e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1306607d&amp;action=edit 025b667f]&lt;br&gt;
+[[MediaWiki_talk:1306607d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+r
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1306607d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e14390c4&amp;action=edit 600e8a44]&lt;br&gt;
+[[MediaWiki_talk:e14390c4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+c
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e14390c4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:59b75a10&amp;action=edit 0fde75cd]&lt;br&gt;
+[[MediaWiki_talk:59b75a10|Talk]]
+&lt;/td&gt;&lt;td&gt;
+s
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:59b75a10</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0b6fd89e&amp;action=edit 5163ba5b]&lt;br&gt;
+[[MediaWiki_talk:0b6fd89e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+f
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0b6fd89e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba9e0fc4&amp;action=edit f70dbcff]&lt;br&gt;
+[[MediaWiki_talk:ba9e0fc4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-sitesupport&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ba9e0fc4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b932fee9&amp;action=edit 8949be8d]&lt;br&gt;
+[[MediaWiki_talk:b932fee9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;amp;lt;accesskey-specialpage&amp;amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b932fee9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1ac10275&amp;action=edit 59a5e487]&lt;br&gt;
+[[MediaWiki_talk:1ac10275|Talk]]
+&lt;/td&gt;&lt;td&gt;
+q
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1ac10275</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:116fd1b0&amp;action=edit a83f2193]&lt;br&gt;
+[[MediaWiki_talk:116fd1b0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+t
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:116fd1b0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec06f1a7&amp;action=edit 5894e42e]&lt;br&gt;
+[[MediaWiki_talk:ec06f1a7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+d
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ec06f1a7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f99a8c2&amp;action=edit 2a2a9d13]&lt;br&gt;
+[[MediaWiki_talk:7f99a8c2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+w
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7f99a8c2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:903549e8&amp;action=edit 3a1dcde8]&lt;br&gt;
+[[MediaWiki_talk:903549e8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+u
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:903549e8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f696cc0&amp;action=edit be76a8c2]&lt;br&gt;
+[[MediaWiki_talk:8f696cc0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8f696cc0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:613ebbad&amp;action=edit e467bdec]&lt;br&gt;
+[[MediaWiki_talk:613ebbad|Talk]]
+&lt;/td&gt;&lt;td&gt;
+e
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:613ebbad</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f598b5d6&amp;action=edit 8bbdd8ad]&lt;br&gt;
+[[MediaWiki_talk:f598b5d6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+w
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f598b5d6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:59863979&amp;action=edit f8563593]&lt;br&gt;
+[[MediaWiki_talk:59863979|Talk]]
+&lt;/td&gt;&lt;td&gt;
+l
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:59863979</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:00143391&amp;action=edit 016415ff]&lt;br&gt;
+[[MediaWiki_talk:00143391|Talk]]
+&lt;/td&gt;&lt;td&gt;
+b
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:00143391</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d4dce921&amp;action=edit c90b0565]&lt;br&gt;
+[[MediaWiki_talk:d4dce921|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The Password for &amp;#39;$1&amp;#39; has been sent to $2.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d4dce921</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e6cd678&amp;action=edit 05cb31f3]&lt;br&gt;
+[[MediaWiki_talk:9e6cd678|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Password sent.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9e6cd678</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:37186ec6&amp;action=edit 6703566b]&lt;br&gt;
+[[MediaWiki_talk:37186ec6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Action complete
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:37186ec6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2bacba53&amp;action=edit 9a954e94]&lt;br&gt;
+[[MediaWiki_talk:2bacba53|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Added to watchlist
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2bacba53</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b28893b8&amp;action=edit cb101aa3]&lt;br&gt;
+[[MediaWiki_talk:b28893b8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The page &amp;quot;$1&amp;quot; has been added to your &amp;#91;&amp;#91;Special:Watchlist&amp;#124;watchlist]].
+Future changes to this page and its associated Talk page will be listed there,
+and the page will appear &amp;#39;&amp;#39;&amp;#39;bolded&amp;#39;&amp;#39;&amp;#39; in the &amp;#91;&amp;#91;Special:Recentchanges&amp;#124;list of recent changes]] to
+make it easier to pick out.
+
+&amp;lt;p&amp;gt;If you want to remove the page from your watchlist later, click &amp;quot;Stop watching&amp;quot; in the sidebar.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b28893b8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:291bfe3c&amp;action=edit 788205f7]&lt;br&gt;
+[[MediaWiki_talk:291bfe3c|Talk]]
+&lt;/td&gt;&lt;td&gt;
++
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:291bfe3c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d4d418a&amp;action=edit 69189a95]&lt;br&gt;
+[[MediaWiki_talk:0d4d418a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:Administrators
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0d4d418a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1b4ceeda&amp;action=edit f61e4837]&lt;br&gt;
+[[MediaWiki_talk:1b4ceeda|Talk]]
+&lt;/td&gt;&lt;td&gt;
+I affirm that the copyright holder of this file
+agrees to license it under the terms of the $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1b4ceeda</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6a720856&amp;action=edit d87c4480]&lt;br&gt;
+[[MediaWiki_talk:6a720856|Talk]]
+&lt;/td&gt;&lt;td&gt;
+all
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6a720856</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2fab435&amp;action=edit a6623c77]&lt;br&gt;
+[[MediaWiki_talk:f2fab435|Talk]]
+&lt;/td&gt;&lt;td&gt;
+All system messages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f2fab435</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e57c77b8&amp;action=edit 57dbe26a]&lt;br&gt;
+[[MediaWiki_talk:e57c77b8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This is a list of all system messages available in the MediaWiki: namespace.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e57c77b8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ff8db74d&amp;action=edit bf1dccf6]&lt;br&gt;
+[[MediaWiki_talk:ff8db74d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+All pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ff8db74d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:89c23e53&amp;action=edit 1ee05de8]&lt;br&gt;
+[[MediaWiki_talk:89c23e53|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 to $2
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:89c23e53</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8550125b&amp;action=edit 0dc174ae]&lt;br&gt;
+[[MediaWiki_talk:8550125b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;font color=red&amp;gt;&amp;lt;b&amp;gt;User $1, you are already logged in!&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br /&amp;gt;
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8550125b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3f7be8a8&amp;action=edit 3f1bd6a1]&lt;br&gt;
+[[MediaWiki_talk:3f7be8a8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Cannot rollback last edit of &amp;#91;&amp;#91;$1]]
+by &amp;#91;&amp;#91;User:$2&amp;#124;$2]] (&amp;#91;&amp;#91;User talk:$2&amp;#124;Talk]]); someone else has edited or rolled back the page already.
+
+Last edit was by &amp;#91;&amp;#91;User:$3&amp;#124;$3]] (&amp;#91;&amp;#91;User talk:$3&amp;#124;Talk]]).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3f7be8a8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49a4df39&amp;action=edit 4f70712f]&lt;br&gt;
+[[MediaWiki_talk:49a4df39|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Oldest pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:49a4df39</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a01e33f4&amp;action=edit cffa50a3]&lt;br&gt;
+[[MediaWiki_talk:a01e33f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+and
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a01e33f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:20cb482e&amp;action=edit 801db13e]&lt;br&gt;
+[[MediaWiki_talk:20cb482e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Talk for this IP
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:20cb482e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5bbc19f4&amp;action=edit 07575f81]&lt;br&gt;
+[[MediaWiki_talk:5bbc19f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+----&amp;#39;&amp;#39;This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical &amp;#91;&amp;#91;IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please &amp;#91;&amp;#91;Special:Userlogin&amp;#124;create an account or log in]] to avoid future confusion with other anonymous users.&amp;#39;&amp;#39;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5bbc19f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9bed5104&amp;action=edit 0a92fab3]&lt;br&gt;
+[[MediaWiki_talk:9bed5104|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Anonymous user(s) of Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9bed5104</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4360c2dc&amp;action=edit 565cecd7]&lt;br&gt;
+[[MediaWiki_talk:4360c2dc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Content page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4360c2dc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d3ee4a57&amp;action=edit ac8af25b]&lt;br&gt;
+[[MediaWiki_talk:d3ee4a57|Talk]]
+&lt;/td&gt;&lt;td&gt;
+A page of that name already exists, or the
+name you have chosen is not valid.
+Please choose another name.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d3ee4a57</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:494f1af2&amp;action=edit 01d643b6]&lt;br&gt;
+[[MediaWiki_talk:494f1af2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View content page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:494f1af2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc93382e&amp;action=edit 4e529571]&lt;br&gt;
+[[MediaWiki_talk:dc93382e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+SQL query
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dc93382e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d12f6023&amp;action=edit 47551563]&lt;br&gt;
+[[MediaWiki_talk:d12f6023|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Use the form below to make a direct query of the
+database.
+Use single quotes (&amp;#39;like this&amp;#39;) to delimit string literals.
+This can often add considerable load to the server, so please use
+this function sparingly.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d12f6023</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f36efd21&amp;action=edit d8f0b5e0]&lt;br&gt;
+[[MediaWiki_talk:f36efd21|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Autoblocked because you share an IP address with &amp;quot;$1&amp;quot;. Reason &amp;quot;$2&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f36efd21</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9503e2b1&amp;action=edit 100ce8a2]&lt;br&gt;
+[[MediaWiki_talk:9503e2b1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This action cannot be performed on this page.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9503e2b1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f146770f&amp;action=edit 5c50b102]&lt;br&gt;
+[[MediaWiki_talk:f146770f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image name has been changed to &amp;quot;$1&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f146770f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a87ee981&amp;action=edit fe89c3de]&lt;br&gt;
+[[MediaWiki_talk:a87ee981|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;quot;.$1&amp;quot; is not a recommended image file format.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a87ee981</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0222775a&amp;action=edit c7623eeb]&lt;br&gt;
+[[MediaWiki_talk:0222775a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Invalid IP address
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0222775a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feabd786&amp;action=edit 798bc46a]&lt;br&gt;
+[[MediaWiki_talk:feabd786|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Badly formed search query
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:feabd786</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e82f04b&amp;action=edit e5493056]&lt;br&gt;
+[[MediaWiki_talk:7e82f04b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+We could not process your query.
+This is probably because you have attempted to search for a
+word fewer than three letters long, which is not yet supported.
+It could also be that you have mistyped the expression, for
+example &amp;quot;fish and and scales&amp;quot;.
+Please try another query.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7e82f04b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:36ad01d4&amp;action=edit c36e32c1]&lt;br&gt;
+[[MediaWiki_talk:36ad01d4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The passwords you entered do not match.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:36ad01d4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ab570b90&amp;action=edit 5c0f9f2b]&lt;br&gt;
+[[MediaWiki_talk:ab570b90|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bad title
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ab570b90</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:73766845&amp;action=edit e9ac7510]&lt;br&gt;
+[[MediaWiki_talk:73766845|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The requested page title was invalid, empty, or
+an incorrectly linked inter-language or inter-wiki title.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:73766845</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ef0a17b1&amp;action=edit ec00742f]&lt;br&gt;
+[[MediaWiki_talk:ef0a17b1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Main)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ef0a17b1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2fe89b37&amp;action=edit 0756a2f3]&lt;br&gt;
+[[MediaWiki_talk:2fe89b37|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your user name or IP address has been blocked by $1.
+The reason given is this:&amp;lt;br /&amp;gt;&amp;#39;&amp;#39;$2&amp;#39;&amp;#39;&amp;lt;p&amp;gt;You may contact $1 or one of the other
+&amp;#91;&amp;#91;Wiktionary:Administrators&amp;#124;administrators]] to discuss the block.
+
+Note that you may not use the &amp;quot;email this user&amp;quot; feature unless you have a valid email address registered in your &amp;#91;&amp;#91;Special:Preferences&amp;#124;user preferences]].
+
+Your IP address is $3. Please include this address in any queries you make.
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2fe89b37</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4153985a&amp;action=edit ee09eebe]&lt;br&gt;
+[[MediaWiki_talk:4153985a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User is blocked
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4153985a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8225753&amp;action=edit 387c304e]&lt;br&gt;
+[[MediaWiki_talk:f8225753|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Block user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f8225753</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:178b4021&amp;action=edit d19404ef]&lt;br&gt;
+[[MediaWiki_talk:178b4021|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Block succeeded
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:178b4021</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c9aa5295&amp;action=edit 8c464806]&lt;br&gt;
+[[MediaWiki_talk:c9aa5295|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;quot;$1&amp;quot; has been blocked.
+&amp;lt;br /&amp;gt;See &amp;#91;&amp;#91;Special:Ipblocklist&amp;#124;IP block list]] to review blocks.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c9aa5295</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d79d9fe6&amp;action=edit ec372bf2]&lt;br&gt;
+[[MediaWiki_talk:d79d9fe6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Use the form below to block write access
+from a specific IP address or username.
+This should be done only only to prevent vandalism, and in
+accordance with &amp;#91;&amp;#91;Wiktionary:Policy&amp;#124;policy]].
+Fill in a specific reason below (for example, citing particular
+pages that were vandalized).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d79d9fe6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9a96cfdc&amp;action=edit 1c6c7aa2]&lt;br&gt;
+[[MediaWiki_talk:9a96cfdc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+block
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9a96cfdc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b81f5cad&amp;action=edit b821b758]&lt;br&gt;
+[[MediaWiki_talk:b81f5cad|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1, $2 blocked $3 (expires $4)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b81f5cad</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0871a19a&amp;action=edit 9be87d66]&lt;br&gt;
+[[MediaWiki_talk:0871a19a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+blocked &amp;quot;$1&amp;quot; with an expiry time of $2
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0871a19a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31534d45&amp;action=edit 4bcce96c]&lt;br&gt;
+[[MediaWiki_talk:31534d45|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Block_log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:31534d45</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f4872c71&amp;action=edit b9902a3c]&lt;br&gt;
+[[MediaWiki_talk:f4872c71|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This is a log of user blocking and unblocking actions. Automatically
+blocked IP addresses are not be listed. See the &amp;#91;&amp;#91;Special:Ipblocklist&amp;#124;IP block list]] for
+the list of currently operational bans and blocks.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f4872c71</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d8ae34f5&amp;action=edit e9a0daa2]&lt;br&gt;
+[[MediaWiki_talk:d8ae34f5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bold text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d8ae34f5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58086558&amp;action=edit 02320399]&lt;br&gt;
+[[MediaWiki_talk:58086558|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bold text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:58086558</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d546a7c&amp;action=edit 9bd576b3]&lt;br&gt;
+[[MediaWiki_talk:1d546a7c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Book sources
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1d546a7c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:809e6557&amp;action=edit 72f7a5ba]&lt;br&gt;
+[[MediaWiki_talk:809e6557|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below is a list of links to other sites that
+sell new and used books, and may also have further information
+about books you are looking for.Wiktionary is not affiliated with any of these businesses, and
+this list should not be construed as an endorsement.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:809e6557</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40925079&amp;action=edit fe673f57]&lt;br&gt;
+[[MediaWiki_talk:40925079|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Broken Redirects
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:40925079</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3953d564&amp;action=edit 283e89cc]&lt;br&gt;
+[[MediaWiki_talk:3953d564|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following redirects link to a non-existing pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3953d564</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f12ee4ee&amp;action=edit 741bd9a7]&lt;br&gt;
+[[MediaWiki_talk:f12ee4ee|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bug reports
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f12ee4ee</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1e9054cf&amp;action=edit 7cc56699]&lt;br&gt;
+[[MediaWiki_talk:1e9054cf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:Bug_reports
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1e9054cf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cfea7660&amp;action=edit eaac0dcf]&lt;br&gt;
+[[MediaWiki_talk:cfea7660|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bureaucrat_log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cfea7660</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:04cf1ba3&amp;action=edit cc1544ab]&lt;br&gt;
+[[MediaWiki_talk:04cf1ba3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rights for user &amp;quot;$1&amp;quot; set &amp;quot;$2&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:04cf1ba3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a0750047&amp;action=edit 5eb1e911]&lt;br&gt;
+[[MediaWiki_talk:a0750047|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The action you have requested can only be
+performed by sysops with &amp;quot;bureaucrat&amp;quot; status.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a0750047</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4837977b&amp;action=edit f523b504]&lt;br&gt;
+[[MediaWiki_talk:4837977b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Bureaucrat access required
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4837977b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:590988e2&amp;action=edit f06de085]&lt;br&gt;
+[[MediaWiki_talk:590988e2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+by date
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:590988e2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c08c3f0d&amp;action=edit e51a8413]&lt;br&gt;
+[[MediaWiki_talk:c08c3f0d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+by name
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c08c3f0d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ede279e9&amp;action=edit 43ba766a]&lt;br&gt;
+[[MediaWiki_talk:ede279e9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+by size
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ede279e9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1ad9b35&amp;action=edit 075fc8df]&lt;br&gt;
+[[MediaWiki_talk:e1ad9b35|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following is a cached copy of the requested page, and may not be up to date.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e1ad9b35</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77dfd213&amp;action=edit 4fd0653c]&lt;br&gt;
+[[MediaWiki_talk:77dfd213|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Cancel
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:77dfd213</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:03442eec&amp;action=edit ee57c22e]&lt;br&gt;
+[[MediaWiki_talk:03442eec|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not delete the page or image specified. (It may have already been deleted by someone else.)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:03442eec</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:27b55ed3&amp;action=edit 4b739ac2]&lt;br&gt;
+[[MediaWiki_talk:27b55ed3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Cannot revert edit; last contributor is only author of this page.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:27b55ed3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6ccb6007&amp;action=edit 50b9e781]&lt;br&gt;
+[[MediaWiki_talk:6ccb6007|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Categories
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6ccb6007</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3c686e7&amp;action=edit 5ccbf9c9]&lt;br&gt;
+[[MediaWiki_talk:a3c686e7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+category
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a3c686e7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2ff5f46&amp;action=edit 7245f61e]&lt;br&gt;
+[[MediaWiki_talk:f2ff5f46|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Articles in category &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f2ff5f46</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cc60b2e2&amp;action=edit 3dfd4581]&lt;br&gt;
+[[MediaWiki_talk:cc60b2e2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Change password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cc60b2e2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8aa57de6&amp;action=edit 49a04ba4]&lt;br&gt;
+[[MediaWiki_talk:8aa57de6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8aa57de6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf723c59&amp;action=edit 4f1b1dbe]&lt;br&gt;
+[[MediaWiki_talk:cf723c59|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Columns
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cf723c59</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a4f8ff8&amp;action=edit 99be507a]&lt;br&gt;
+[[MediaWiki_talk:2a4f8ff8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+ (comment)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a4f8ff8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9833df65&amp;action=edit 978cce5f]&lt;br&gt;
+[[MediaWiki_talk:9833df65|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Compare selected versions
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9833df65</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:04a21221&amp;action=edit d0c4047c]&lt;br&gt;
+[[MediaWiki_talk:04a21221|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Confirm
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:04a21221</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8e469fe&amp;action=edit bb4bf8de]&lt;br&gt;
+[[MediaWiki_talk:b8e469fe|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Yes, I really want to delete this.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b8e469fe</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7773ad82&amp;action=edit 16805d57]&lt;br&gt;
+[[MediaWiki_talk:7773ad82|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Confirm delete
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7773ad82</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:87358bf0&amp;action=edit 872e01c0]&lt;br&gt;
+[[MediaWiki_talk:87358bf0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are about to permanently delete a page
+or image along with all of its history from the database.
+Please confirm that you intend to do this, that you understand the
+consequences, and that you are doing this in accordance with
+&amp;#91;&amp;#91;Wiktionary:Policy]].
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:87358bf0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b46f1463&amp;action=edit 96a48c11]&lt;br&gt;
+[[MediaWiki_talk:b46f1463|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Confirm protection
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b46f1463</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e382b883&amp;action=edit e76ab37d]&lt;br&gt;
+[[MediaWiki_talk:e382b883|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Do you really want to protect this page?
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e382b883</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:33be1711&amp;action=edit 306661e6]&lt;br&gt;
+[[MediaWiki_talk:33be1711|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Confirm unprotection
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:33be1711</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2d82e05f&amp;action=edit 4df1abe3]&lt;br&gt;
+[[MediaWiki_talk:2d82e05f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Do you really want to unprotect this page?
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2d82e05f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f051e88&amp;action=edit 0858695c]&lt;br&gt;
+[[MediaWiki_talk:7f051e88|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Characters of context per line
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7f051e88</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7127b581&amp;action=edit e9d81e50]&lt;br&gt;
+[[MediaWiki_talk:7127b581|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Lines to show per hit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7127b581</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9850ceab&amp;action=edit df5b918c]&lt;br&gt;
+[[MediaWiki_talk:9850ceab|Talk]]
+&lt;/td&gt;&lt;td&gt;
+contribs
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9850ceab</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b688a4d7&amp;action=edit ab48ec14]&lt;br&gt;
+[[MediaWiki_talk:b688a4d7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+For $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b688a4d7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:aa11023f&amp;action=edit 9d5b6e5e]&lt;br&gt;
+[[MediaWiki_talk:aa11023f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User contributions
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:aa11023f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a420abf6&amp;action=edit 521307dd]&lt;br&gt;
+[[MediaWiki_talk:a420abf6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Content is available under $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a420abf6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fc8c1b42&amp;action=edit 5327fdcf]&lt;br&gt;
+[[MediaWiki_talk:fc8c1b42|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:Copyrights
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fc8c1b42</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52a98e51&amp;action=edit f6652583]&lt;br&gt;
+[[MediaWiki_talk:52a98e51|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary copyright
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:52a98e51</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:25a1afd7&amp;action=edit 731cc8a6]&lt;br&gt;
+[[MediaWiki_talk:25a1afd7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Please note that all contributions to Wiktionary are
+considered to be released under the GNU Free Documentation License
+(see $1 for details).
+If you don&amp;#39;t want your writing to be edited mercilessly and redistributed
+at will, then don&amp;#39;t submit it here.&amp;lt;br /&amp;gt;
+You are also promising us that you wrote this yourself, or copied it from a
+public domain or similar free resource.
+&amp;lt;strong&amp;gt;DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!&amp;lt;/strong&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:25a1afd7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:465ca4b8&amp;action=edit e04b3a96]&lt;br&gt;
+[[MediaWiki_talk:465ca4b8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Couldn&amp;#39;t remove item &amp;#39;$1&amp;#39;...
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:465ca4b8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3724dfa6&amp;action=edit 19fd5658]&lt;br&gt;
+[[MediaWiki_talk:3724dfa6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Create new account
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3724dfa6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a4a1f0cb&amp;action=edit b10d6306]&lt;br&gt;
+[[MediaWiki_talk:a4a1f0cb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+by email
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a4a1f0cb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:07f81f3c&amp;action=edit dce81611]&lt;br&gt;
+[[MediaWiki_talk:07f81f3c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+cur
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:07f81f3c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:42b921f8&amp;action=edit 81c8f458]&lt;br&gt;
+[[MediaWiki_talk:42b921f8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Current events
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:42b921f8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78892831&amp;action=edit 23418566]&lt;br&gt;
+[[MediaWiki_talk:78892831|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Current revision
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:78892831</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e4838ed0&amp;action=edit 66409316]&lt;br&gt;
+[[MediaWiki_talk:e4838ed0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Database error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e4838ed0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:507be676&amp;action=edit 3b538bdf]&lt;br&gt;
+[[MediaWiki_talk:507be676|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Date format
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:507be676</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0bfa85bb&amp;action=edit 34c01d3c]&lt;br&gt;
+[[MediaWiki_talk:0bfa85bb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+A database query syntax error has occurred.
+This could be because of an illegal search query (see $5),
+or it may indicate a bug in the software.
+The last attempted database query was:
+&amp;lt;blockquote&amp;gt;&amp;lt;tt&amp;gt;$1&amp;lt;/tt&amp;gt;&amp;lt;/blockquote&amp;gt;
+from within function &amp;quot;&amp;lt;tt&amp;gt;$2&amp;lt;/tt&amp;gt;&amp;quot;.
+MySQL returned error &amp;quot;&amp;lt;tt&amp;gt;$3: $4&amp;lt;/tt&amp;gt;&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0bfa85bb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:39d82941&amp;action=edit f6e1bcbd]&lt;br&gt;
+[[MediaWiki_talk:39d82941|Talk]]
+&lt;/td&gt;&lt;td&gt;
+A database query syntax error has occurred.
+The last attempted database query was:
+&amp;quot;$1&amp;quot;
+from within function &amp;quot;$2&amp;quot;.
+MySQL returned error &amp;quot;$3: $4&amp;quot;.
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:39d82941</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ae14da43&amp;action=edit d4234aad]&lt;br&gt;
+[[MediaWiki_talk:ae14da43|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Dead-end pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ae14da43</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd604d99&amp;action=edit 32faaeca]&lt;br&gt;
+[[MediaWiki_talk:bd604d99|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Debug
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bd604d99</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f349a89&amp;action=edit f674a4a1]&lt;br&gt;
+[[MediaWiki_talk:6f349a89|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search in these namespaces by default:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6f349a89</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:801b725b&amp;action=edit 93c2c32b]&lt;br&gt;
+[[MediaWiki_talk:801b725b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary e-mail
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:801b725b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6fdbe48&amp;action=edit 9485989f]&lt;br&gt;
+[[MediaWiki_talk:f6fdbe48|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Delete
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f6fdbe48</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:728e102f&amp;action=edit 070ad01c]&lt;br&gt;
+[[MediaWiki_talk:728e102f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reason for deletion
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:728e102f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:784f094b&amp;action=edit abb03e0b]&lt;br&gt;
+[[MediaWiki_talk:784f094b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+deleted &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:784f094b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b40dc398&amp;action=edit 81545b85]&lt;br&gt;
+[[MediaWiki_talk:b40dc398|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;quot;$1&amp;quot; has been deleted.
+See $2 for a record of recent deletions.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b40dc398</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:64a8bf46&amp;action=edit 6f4d03ee]&lt;br&gt;
+[[MediaWiki_talk:64a8bf46|Talk]]
+&lt;/td&gt;&lt;td&gt;
+del
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:64a8bf46</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3316ac85&amp;action=edit c423c282]&lt;br&gt;
+[[MediaWiki_talk:3316ac85|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Delete page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3316ac85</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a2496a13&amp;action=edit a3173eab]&lt;br&gt;
+[[MediaWiki_talk:a2496a13|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Deleting &amp;quot;$1&amp;quot;)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a2496a13</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9d817726&amp;action=edit b93901eb]&lt;br&gt;
+[[MediaWiki_talk:9d817726|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Delete this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9d817726</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49653e1b&amp;action=edit 58f0b919]&lt;br&gt;
+[[MediaWiki_talk:49653e1b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+deletion log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:49653e1b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d73442e4&amp;action=edit c5ee36a7]&lt;br&gt;
+[[MediaWiki_talk:d73442e4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Deletion_log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d73442e4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2349bb58&amp;action=edit 6526e633]&lt;br&gt;
+[[MediaWiki_talk:2349bb58|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below is a list of the most recent deletions.
+All times shown are server time (UTC).
+&amp;lt;ul&amp;gt;
+&amp;lt;/ul&amp;gt;
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2349bb58</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:381bedfc&amp;action=edit 015693e1]&lt;br&gt;
+[[MediaWiki_talk:381bedfc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+For developer use only
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:381bedfc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52713d3d&amp;action=edit 9c6f4cd5]&lt;br&gt;
+[[MediaWiki_talk:52713d3d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The action you have requested can only be
+performed by users with &amp;quot;developer&amp;quot; status.
+See $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:52713d3d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6cca6111&amp;action=edit 59afe6b0]&lt;br&gt;
+[[MediaWiki_talk:6cca6111|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Developer access required
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6cca6111</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d23a1c9f&amp;action=edit 75a0ee1b]&lt;br&gt;
+[[MediaWiki_talk:d23a1c9f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+diff
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d23a1c9f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b16f1f66&amp;action=edit 48d53c6e]&lt;br&gt;
+[[MediaWiki_talk:b16f1f66|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Difference between revisions)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b16f1f66</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3c1c1596&amp;action=edit 657b3530]&lt;br&gt;
+[[MediaWiki_talk:3c1c1596|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:General_disclaimer
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3c1c1596</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2cbbc29e&amp;action=edit 774706d2]&lt;br&gt;
+[[MediaWiki_talk:2cbbc29e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Disclaimers
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2cbbc29e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac57c500&amp;action=edit c06b805b]&lt;br&gt;
+[[MediaWiki_talk:ac57c500|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Double Redirects
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ac57c500</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba6ba737&amp;action=edit 49eadc1d]&lt;br&gt;
+[[MediaWiki_talk:ba6ba737|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;Attention:&amp;lt;/b&amp;gt; This list may contain false positives. That usually means there is additional text with links below the first #REDIRECT.&amp;lt;br /&amp;gt;
+Each row contains links to the first and second redirect, as well as the first line of the second redirect text, usually giving the &amp;quot;real&amp;quot; target page, which the first redirect should point to.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ba6ba737</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5301648d&amp;action=edit 9ead47a8]&lt;br&gt;
+[[MediaWiki_talk:5301648d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Edit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5301648d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:299ca80d&amp;action=edit 74940f72]&lt;br&gt;
+[[MediaWiki_talk:299ca80d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The edit comment was: &amp;quot;&amp;lt;i&amp;gt;$1&amp;lt;/i&amp;gt;&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:299ca80d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1af657fb&amp;action=edit 3b56e95b]&lt;br&gt;
+[[MediaWiki_talk:1af657fb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Edit conflict: $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1af657fb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8b46c7e0&amp;action=edit 10d395b9]&lt;br&gt;
+[[MediaWiki_talk:8b46c7e0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Edit the current version of this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8b46c7e0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47f4389a&amp;action=edit a1524e37]&lt;br&gt;
+[[MediaWiki_talk:47f4389a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Editing help
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:47f4389a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56815513&amp;action=edit 7072deb5]&lt;br&gt;
+[[MediaWiki_talk:56815513|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Help:Editing
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:56815513</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b9ba1a2&amp;action=edit f34946be]&lt;br&gt;
+[[MediaWiki_talk:3b9ba1a2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Editing $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3b9ba1a2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e6bd9f3&amp;action=edit bd55ff2e]&lt;br&gt;
+[[MediaWiki_talk:5e6bd9f3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;strong&amp;gt;WARNING: You are editing an out-of-date
+revision of this page.
+If you save it, any changes made since this revision will be lost.&amp;lt;/strong&amp;gt;
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5e6bd9f3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51905619&amp;action=edit 965b4116]&lt;br&gt;
+[[MediaWiki_talk:51905619|Talk]]
+&lt;/td&gt;&lt;td&gt;
+edit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:51905619</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2138f524&amp;action=edit 8bc15909]&lt;br&gt;
+[[MediaWiki_talk:2138f524|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Edit this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2138f524</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:96c0b2c5&amp;action=edit 4a27c333]&lt;br&gt;
+[[MediaWiki_talk:96c0b2c5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Disable e-mail from other users
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:96c0b2c5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8a275a27&amp;action=edit e4573eb4]&lt;br&gt;
+[[MediaWiki_talk:8a275a27|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Fields marked with a star (*) are optional. Storing an email address enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Your real name, if you choose to provide it, will be used for giving you attribution for your work.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8a275a27</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:34a573ac&amp;action=edit b29c18eb]&lt;br&gt;
+[[MediaWiki_talk:34a573ac|Talk]]
+&lt;/td&gt;&lt;td&gt;
+From
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:34a573ac</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1653aeb3&amp;action=edit 8d8c0edf]&lt;br&gt;
+[[MediaWiki_talk:1653aeb3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Message
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1653aeb3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac5cfb8e&amp;action=edit a9b033ab]&lt;br&gt;
+[[MediaWiki_talk:ac5cfb8e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+E-mail user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ac5cfb8e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e3fc4fe2&amp;action=edit eb6bf1bb]&lt;br&gt;
+[[MediaWiki_talk:e3fc4fe2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+If this user has entered a valid e-mail address in
+his or her user preferences, the form below will send a single message.
+The e-mail address you entered in your user preferences will appear
+as the &amp;quot;From&amp;quot; address of the mail, so the recipient will be able
+to reply.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e3fc4fe2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:145da553&amp;action=edit 05072b51]&lt;br&gt;
+[[MediaWiki_talk:145da553|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Send
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:145da553</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:833a22dc&amp;action=edit b1d3f3e4]&lt;br&gt;
+[[MediaWiki_talk:833a22dc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+E-mail sent
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:833a22dc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e3935836&amp;action=edit 2effa7aa]&lt;br&gt;
+[[MediaWiki_talk:e3935836|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your e-mail message has been sent.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e3935836</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8dba338&amp;action=edit 275a0d68]&lt;br&gt;
+[[MediaWiki_talk:c8dba338|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Subject
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c8dba338</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c35740f4&amp;action=edit 88b0fd50]&lt;br&gt;
+[[MediaWiki_talk:c35740f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+To
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c35740f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac5cfb8e&amp;action=edit a9b033ab]&lt;br&gt;
+[[MediaWiki_talk:ac5cfb8e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+E-mail this user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ac5cfb8e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b0a234b&amp;action=edit 698a308a]&lt;br&gt;
+[[MediaWiki_talk:6b0a234b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Enter a reason for the lock, including an estimate
+of when the lock will be released
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6b0a234b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f2f6a15&amp;action=edit 11f9578d]&lt;br&gt;
+[[MediaWiki_talk:7f2f6a15|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7f2f6a15</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53ee1378&amp;action=edit aa2d1eba]&lt;br&gt;
+[[MediaWiki_talk:53ee1378|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:53ee1378</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8aedeece&amp;action=edit a1c634a7]&lt;br&gt;
+[[MediaWiki_talk:8aedeece|Talk]]
+&lt;/td&gt;&lt;td&gt;
+content before blanking was:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8aedeece</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:42abde88&amp;action=edit eba6d64f]&lt;br&gt;
+[[MediaWiki_talk:42abde88|Talk]]
+&lt;/td&gt;&lt;td&gt;
+page was empty
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:42abde88</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dd028a5c&amp;action=edit fe80d230]&lt;br&gt;
+[[MediaWiki_talk:dd028a5c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+content was:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dd028a5c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b7845dfb&amp;action=edit 1a7999fa]&lt;br&gt;
+[[MediaWiki_talk:b7845dfb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Someone else has changed this page since you
+started editing it.
+The upper text area contains the page text as it currently exists.
+Your changes are shown in the lower text area.
+You will have to merge your changes into the existing text.
+&amp;lt;b&amp;gt;Only&amp;lt;/b&amp;gt; the text in the upper text area will be saved when you
+press &amp;quot;Save page&amp;quot;.
+&amp;lt;p&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b7845dfb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f3e4fadb&amp;action=edit 51713409]&lt;br&gt;
+[[MediaWiki_talk:f3e4fadb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Export pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f3e4fadb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b68aeee1&amp;action=edit bf364325]&lt;br&gt;
+[[MediaWiki_talk:b68aeee1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Include only the current revision, not the full history
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b68aeee1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e884d79&amp;action=edit eddfb839]&lt;br&gt;
+[[MediaWiki_talk:7e884d79|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You can export the text and editing history of a particular
+page or set of pages wrapped in some XML; this can then be imported into another
+wiki running MediaWiki software, transformed, or just kept for your private
+amusement.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7e884d79</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a34d80e8&amp;action=edit 8f95a409]&lt;br&gt;
+[[MediaWiki_talk:a34d80e8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+http&amp;#58;//www.example.com link title
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a34d80e8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:117651f0&amp;action=edit 481904c0]&lt;br&gt;
+[[MediaWiki_talk:117651f0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+External link (remember http&amp;#58;// prefix)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:117651f0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f11042a4&amp;action=edit e75bc045]&lt;br&gt;
+[[MediaWiki_talk:f11042a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+FAQ
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f11042a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e891e10&amp;action=edit 5b772c96]&lt;br&gt;
+[[MediaWiki_talk:2e891e10|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:FAQ
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2e891e10</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86edbc13&amp;action=edit 62f8af98]&lt;br&gt;
+[[MediaWiki_talk:86edbc13|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Feed:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:86edbc13</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2727dd90&amp;action=edit 6c916412]&lt;br&gt;
+[[MediaWiki_talk:2727dd90|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not copy file &amp;quot;$1&amp;quot; to &amp;quot;$2&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2727dd90</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e60a2c42&amp;action=edit d393dbbc]&lt;br&gt;
+[[MediaWiki_talk:e60a2c42|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not delete file &amp;quot;$1&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e60a2c42</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d7b25eeb&amp;action=edit 6dace2d5]&lt;br&gt;
+[[MediaWiki_talk:d7b25eeb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Summary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d7b25eeb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3cbb98d&amp;action=edit 08deae8d]&lt;br&gt;
+[[MediaWiki_talk:a3cbb98d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Filename
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a3cbb98d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8f6c94d&amp;action=edit 35c4ded6]&lt;br&gt;
+[[MediaWiki_talk:c8f6c94d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not find file &amp;quot;$1&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c8f6c94d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9b56972&amp;action=edit 6d195b75]&lt;br&gt;
+[[MediaWiki_talk:b9b56972|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not rename file &amp;quot;$1&amp;quot; to &amp;quot;$2&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b9b56972</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a6a1eb6&amp;action=edit 1ffce53a]&lt;br&gt;
+[[MediaWiki_talk:0a6a1eb6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Source
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0a6a1eb6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0f0e70a0&amp;action=edit 040e2ba8]&lt;br&gt;
+[[MediaWiki_talk:0f0e70a0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Copyright status
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0f0e70a0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:45eaa53f&amp;action=edit 79423d38]&lt;br&gt;
+[[MediaWiki_talk:45eaa53f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+File &amp;quot;$1&amp;quot; uploaded successfully.
+Please follow this link: $2 to the description page and fill
+in information about the file, such as where it came from, when it was
+created and by whom, and anything else you may know about it.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:45eaa53f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a303ff06&amp;action=edit 416cf9e4]&lt;br&gt;
+[[MediaWiki_talk:a303ff06|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Error: could not submit form
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a303ff06</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc08787f&amp;action=edit ada66d8e]&lt;br&gt;
+[[MediaWiki_talk:dc08787f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+From Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dc08787f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c4c83db8&amp;action=edit f8d783cd]&lt;br&gt;
+[[MediaWiki_talk:c4c83db8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+fetching image list
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c4c83db8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e0b45f2&amp;action=edit 1ec558a6]&lt;br&gt;
+[[MediaWiki_talk:2e0b45f2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Go
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2e0b45f2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:749351b4&amp;action=edit 49a50bdf]&lt;br&gt;
+[[MediaWiki_talk:749351b4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+
+&amp;lt;!-- SiteSearch Google --&amp;gt;
+&amp;lt;FORM method=GET action=&amp;quot;http&amp;#58;//www.google.com/search&amp;quot;&amp;gt;
+&amp;lt;TABLE bgcolor=&amp;quot;#FFFFFF&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;
+&amp;lt;A HREF=&amp;quot;http&amp;#58;//www.google.com/&amp;quot;&amp;gt;
+&amp;lt;IMG SRC=&amp;quot;http&amp;#58;//www.google.com/logos/Logo_40wht.gif&amp;quot;
+border=&amp;quot;0&amp;quot; ALT=&amp;quot;Google&amp;quot;&amp;gt;&amp;lt;/A&amp;gt;
+&amp;lt;/td&amp;gt;
+&amp;lt;td&amp;gt;
+&amp;lt;INPUT TYPE=text name=q size=31 maxlength=255 value=&amp;quot;$1&amp;quot;&amp;gt;
+&amp;lt;INPUT type=submit name=btnG VALUE=&amp;quot;Google Search&amp;quot;&amp;gt;
+&amp;lt;font size=-1&amp;gt;
+&amp;lt;input type=hidden name=domains value=&amp;quot;http&amp;#58;//tl.wiktionary.org&amp;quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;input type=radio name=sitesearch value=&amp;quot;&amp;quot;&amp;gt; WWW &amp;lt;input type=radio name=sitesearch value=&amp;quot;http&amp;#58;//tl.wiktionary.org&amp;quot; checked&amp;gt; http&amp;#58;//tl.wiktionary.org &amp;lt;br /&amp;gt;
+&amp;lt;input type=&amp;#39;hidden&amp;#39; name=&amp;#39;ie&amp;#39; value=&amp;#39;$2&amp;#39;&amp;gt;
+&amp;lt;input type=&amp;#39;hidden&amp;#39; name=&amp;#39;oe&amp;#39; value=&amp;#39;$2&amp;#39;&amp;gt;
+&amp;lt;/font&amp;gt;
+&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/TABLE&amp;gt;
+&amp;lt;/FORM&amp;gt;
+&amp;lt;!-- SiteSearch Google --&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:749351b4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:489b474b&amp;action=edit 8da95a41]&lt;br&gt;
+[[MediaWiki_talk:489b474b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Fill in from browser
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:489b474b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:237cf168&amp;action=edit 7f401fbb]&lt;br&gt;
+[[MediaWiki_talk:237cf168|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Headline text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:237cf168</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:91b3bc72&amp;action=edit c4eef2f5]&lt;br&gt;
+[[MediaWiki_talk:91b3bc72|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Level 2 headline
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:91b3bc72</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c47ae153&amp;action=edit 92005ecf]&lt;br&gt;
+[[MediaWiki_talk:c47ae153|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Help
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c47ae153</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56203224&amp;action=edit 9ca36083]&lt;br&gt;
+[[MediaWiki_talk:56203224|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Help:Contents
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:56203224</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:34d8b60f&amp;action=edit 93c8c96b]&lt;br&gt;
+[[MediaWiki_talk:34d8b60f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+hide
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:34d8b60f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9aa39fe3&amp;action=edit 1cc77a14]&lt;br&gt;
+[[MediaWiki_talk:9aa39fe3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+hide
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9aa39fe3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4d9810c0&amp;action=edit 56714843]&lt;br&gt;
+[[MediaWiki_talk:4d9810c0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+hist
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4d9810c0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f37ab91a&amp;action=edit 4e7121e9]&lt;br&gt;
+[[MediaWiki_talk:f37ab91a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Diff selection: mark the radio boxes of the versions to compare and hit enter or the button at the bottom.&amp;lt;br/&amp;gt;
+Legend: (cur) = difference with current version,
+(last) = difference with preceding version, M = minor edit.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f37ab91a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:90ccd649&amp;action=edit 66f79d8a]&lt;br&gt;
+[[MediaWiki_talk:90ccd649|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Page history
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:90ccd649</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:15a13ace&amp;action=edit a937e036]&lt;br&gt;
+[[MediaWiki_talk:15a13ace|Talk]]
+&lt;/td&gt;&lt;td&gt;
+History
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:15a13ace</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e02c3587&amp;action=edit 6079f80a]&lt;br&gt;
+[[MediaWiki_talk:e02c3587|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Warning: The page you are about to delete has a history:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e02c3587</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5741ad8f&amp;action=edit 48849a80]&lt;br&gt;
+[[MediaWiki_talk:5741ad8f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Horizontal line (use sparingly)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5741ad8f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e18602a&amp;action=edit d874ec59]&lt;br&gt;
+[[MediaWiki_talk:7e18602a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Ignore warning and save file anyway.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7e18602a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5bf1efaa&amp;action=edit a98182df]&lt;br&gt;
+[[MediaWiki_talk:5bf1efaa|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show all images with names matching
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5bf1efaa</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e7a51d5&amp;action=edit f8288ad8]&lt;br&gt;
+[[MediaWiki_talk:8e7a51d5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8e7a51d5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:133971b3&amp;action=edit be19a728]&lt;br&gt;
+[[MediaWiki_talk:133971b3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Example.jpg
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:133971b3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a73e0c3&amp;action=edit d103e97d]&lt;br&gt;
+[[MediaWiki_talk:2a73e0c3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Embedded image
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a73e0c3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:353c260c&amp;action=edit 3414ac48]&lt;br&gt;
+[[MediaWiki_talk:353c260c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image links
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:353c260c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:affc6aca&amp;action=edit 4c06ba77]&lt;br&gt;
+[[MediaWiki_talk:affc6aca|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image list
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:affc6aca</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ade85019&amp;action=edit 2e8294bd]&lt;br&gt;
+[[MediaWiki_talk:ade85019|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below is a list of $1 images sorted $2.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ade85019</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7277ee94&amp;action=edit a152014b]&lt;br&gt;
+[[MediaWiki_talk:7277ee94|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View image page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7277ee94</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c783375c&amp;action=edit b1d4cc4c]&lt;br&gt;
+[[MediaWiki_talk:c783375c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Revert to earlier version was successful.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c783375c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c6f52751&amp;action=edit 6656e4f4]&lt;br&gt;
+[[MediaWiki_talk:c6f52751|Talk]]
+&lt;/td&gt;&lt;td&gt;
+del
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c6f52751</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3c281ed6&amp;action=edit a1adca28]&lt;br&gt;
+[[MediaWiki_talk:3c281ed6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+desc
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3c281ed6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:186e5ca1&amp;action=edit de786597]&lt;br&gt;
+[[MediaWiki_talk:186e5ca1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Legend: (cur) = this is the current image, (del) = delete
+this old version, (rev) = revert to this old version.
+&amp;lt;br /&amp;gt;&amp;lt;i&amp;gt;Click on date to see image uploaded on that date&amp;lt;/i&amp;gt;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:186e5ca1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d78c0d7&amp;action=edit d9305ede]&lt;br&gt;
+[[MediaWiki_talk:8d78c0d7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image history
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8d78c0d7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86260b9f&amp;action=edit a46e05c1]&lt;br&gt;
+[[MediaWiki_talk:86260b9f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Legend: (desc) = show/edit image description.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:86260b9f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d6fbc9d2&amp;action=edit 62fdfbd5]&lt;br&gt;
+[[MediaWiki_talk:d6fbc9d2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Import pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d6fbc9d2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bac6ed75&amp;action=edit 85d2877a]&lt;br&gt;
+[[MediaWiki_talk:bac6ed75|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Import failed: $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bac6ed75</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f4dee51e&amp;action=edit f74f664b]&lt;br&gt;
+[[MediaWiki_talk:f4dee51e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Conflicting history revision exists (may have imported this page before)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f4dee51e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d461354&amp;action=edit ff881471]&lt;br&gt;
+[[MediaWiki_talk:1d461354|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Empty or no text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1d461354</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5b910f21&amp;action=edit e2781bd1]&lt;br&gt;
+[[MediaWiki_talk:5b910f21|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Import succeeded!
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5b910f21</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d58d609&amp;action=edit 965243c5]&lt;br&gt;
+[[MediaWiki_talk:3d58d609|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Please export the file from the source wiki using the Special:Export utility, save it to your disk and upload it here.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3d58d609</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31be67da&amp;action=edit 176bd169]&lt;br&gt;
+[[MediaWiki_talk:31be67da|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Click a button to get an example text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:31be67da</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2854823a&amp;action=edit 6de0a6d1]&lt;br&gt;
+[[MediaWiki_talk:2854823a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Please enter the text you want to be formatted.\n It will be shown in the infobox for copy and pasting.\nExample:\n$1\nwill become:\n$2
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2854823a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:103c360a&amp;action=edit e90e9e1c]&lt;br&gt;
+[[MediaWiki_talk:103c360a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Internal error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:103c360a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:148008a6&amp;action=edit 919b03e5]&lt;br&gt;
+[[MediaWiki_talk:148008a6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Interlanguage links
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:148008a6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:07586557&amp;action=edit 5c2ff182]&lt;br&gt;
+[[MediaWiki_talk:07586557|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Invalid IP range.
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:07586557</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22f9ff50&amp;action=edit 1f99aaad]&lt;br&gt;
+[[MediaWiki_talk:22f9ff50|Talk]]
+&lt;/td&gt;&lt;td&gt;
+IP Address/username
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:22f9ff50</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8994552&amp;action=edit 91b35c2d]&lt;br&gt;
+[[MediaWiki_talk:f8994552|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Expiry time invalid.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f8994552</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2147c662&amp;action=edit 524cfd7e]&lt;br&gt;
+[[MediaWiki_talk:2147c662|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Expiry
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2147c662</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9cb7e6ee&amp;action=edit 503153e9]&lt;br&gt;
+[[MediaWiki_talk:9cb7e6ee|Talk]]
+&lt;/td&gt;&lt;td&gt;
+List of blocked IP addresses and usernames
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9cb7e6ee</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6774dfa8&amp;action=edit 1ecdad25]&lt;br&gt;
+[[MediaWiki_talk:6774dfa8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reason
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6774dfa8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:62218118&amp;action=edit e29a20a2]&lt;br&gt;
+[[MediaWiki_talk:62218118|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Block this user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:62218118</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7863d305&amp;action=edit 73ecf10c]&lt;br&gt;
+[[MediaWiki_talk:7863d305|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unblock this address
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7863d305</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba95215c&amp;action=edit 5fc7f411]&lt;br&gt;
+[[MediaWiki_talk:ba95215c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;quot;$1&amp;quot; unblocked
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ba95215c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e89a827&amp;action=edit 9aa403ad]&lt;br&gt;
+[[MediaWiki_talk:8e89a827|Talk]]
+&lt;/td&gt;&lt;td&gt;
+ISBN
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8e89a827</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5b017ff1&amp;action=edit abdf987b]&lt;br&gt;
+[[MediaWiki_talk:5b017ff1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+redirect page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5b017ff1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:208e76ed&amp;action=edit 95f02073]&lt;br&gt;
+[[MediaWiki_talk:208e76ed|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Italic text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:208e76ed</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e5211e9&amp;action=edit 3f1c7185]&lt;br&gt;
+[[MediaWiki_talk:7e5211e9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Italic text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7e5211e9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bcce0a8a&amp;action=edit 0e29818a]&lt;br&gt;
+[[MediaWiki_talk:bcce0a8a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Problem with item &amp;#39;$1&amp;#39;, invalid name...
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bcce0a8a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:996c231b&amp;action=edit 5dd7fd8c]&lt;br&gt;
+[[MediaWiki_talk:996c231b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+It is recommended that images not exceed 100k in size.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:996c231b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d1c69a85&amp;action=edit 213ed3ea]&lt;br&gt;
+[[MediaWiki_talk:d1c69a85|Talk]]
+&lt;/td&gt;&lt;td&gt;
+last
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d1c69a85</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:26d03483&amp;action=edit 1d0be5cf]&lt;br&gt;
+[[MediaWiki_talk:26d03483|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page was last modified $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:26d03483</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d8b6a1ce&amp;action=edit b4c7424e]&lt;br&gt;
+[[MediaWiki_talk:d8b6a1ce|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page was last modified $1 by $2.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d8b6a1ce</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b5fb75c3&amp;action=edit 7aab91e5]&lt;br&gt;
+[[MediaWiki_talk:b5fb75c3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Line $1:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b5fb75c3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a1a27fd2&amp;action=edit 4c4ec68a]&lt;br&gt;
+[[MediaWiki_talk:a1a27fd2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Link title
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a1a27fd2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28f8c928&amp;action=edit e0ee37d8]&lt;br&gt;
+[[MediaWiki_talk:28f8c928|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Internal link
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:28f8c928</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:003058f7&amp;action=edit c692b683]&lt;br&gt;
+[[MediaWiki_talk:003058f7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(List of links)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:003058f7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6508e12f&amp;action=edit ce30384f]&lt;br&gt;
+[[MediaWiki_talk:6508e12f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following pages link to here:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6508e12f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6dbd59d&amp;action=edit 50b839a3]&lt;br&gt;
+[[MediaWiki_talk:f6dbd59d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following pages link to this image:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f6dbd59d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eb68781a&amp;action=edit 743236e7]&lt;br&gt;
+[[MediaWiki_talk:eb68781a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+/^(&amp;#91;a-z]+)(.*)$/sD
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:eb68781a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8ca6811&amp;action=edit 069b38c0]&lt;br&gt;
+[[MediaWiki_talk:a8ca6811|Talk]]
+&lt;/td&gt;&lt;td&gt;
+list
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a8ca6811</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9bf82beb&amp;action=edit aabbb062]&lt;br&gt;
+[[MediaWiki_talk:9bf82beb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User list
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9bf82beb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:61a6ed55&amp;action=edit 1b4ae4f9]&lt;br&gt;
+[[MediaWiki_talk:61a6ed55|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Loading page history
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:61a6ed55</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bf19b1de&amp;action=edit b6bb9fa5]&lt;br&gt;
+[[MediaWiki_talk:bf19b1de|Talk]]
+&lt;/td&gt;&lt;td&gt;
+loading revision for diff
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bf19b1de</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:43678846&amp;action=edit f25bccd7]&lt;br&gt;
+[[MediaWiki_talk:43678846|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Local time display
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:43678846</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31dcaa22&amp;action=edit 62c50181]&lt;br&gt;
+[[MediaWiki_talk:31dcaa22|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Lock database
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:31dcaa22</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9dc82fa2&amp;action=edit 5199ac8e]&lt;br&gt;
+[[MediaWiki_talk:9dc82fa2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Yes, I really want to lock the database.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9dc82fa2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fef93b9b&amp;action=edit 4f29ae0a]&lt;br&gt;
+[[MediaWiki_talk:fef93b9b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Lock database
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fef93b9b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b4abc4bb&amp;action=edit e73c06d7]&lt;br&gt;
+[[MediaWiki_talk:b4abc4bb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Database lock succeeded
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b4abc4bb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b6fcfec5&amp;action=edit 88c6fb22]&lt;br&gt;
+[[MediaWiki_talk:b6fcfec5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The database has been locked.
+&amp;lt;br /&amp;gt;Remember to remove the lock after your maintenance is complete.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b6fcfec5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:459bf648&amp;action=edit 070ff9ae]&lt;br&gt;
+[[MediaWiki_talk:459bf648|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Locking the database will suspend the ability of all
+users to edit pages, change their preferences, edit their watchlists, and
+other things requiring changes in the database.
+Please confirm that this is what you intend to do, and that you will
+unlock the database when your maintenance is done.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:459bf648</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2727a733&amp;action=edit 8a890d0a]&lt;br&gt;
+[[MediaWiki_talk:2727a733|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You did not check the confirmation box.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2727a733</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4e5a2893&amp;action=edit 2736fab2]&lt;br&gt;
+[[MediaWiki_talk:4e5a2893|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Log in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4e5a2893</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fcfc7549&amp;action=edit e6f9a4e2]&lt;br&gt;
+[[MediaWiki_talk:fcfc7549|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Login error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fcfc7549</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4113f724&amp;action=edit 36f843a7]&lt;br&gt;
+[[MediaWiki_talk:4113f724|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User login
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4113f724</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7a6963a6&amp;action=edit d23ee6a8]&lt;br&gt;
+[[MediaWiki_talk:7a6963a6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;There has been a problem with your login.&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;Try again!
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7a6963a6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bbf56890&amp;action=edit 221d44a4]&lt;br&gt;
+[[MediaWiki_talk:bbf56890|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must have cookies enabled to log in to Wiktionary.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bbf56890</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75749962&amp;action=edit ee8446ea]&lt;br&gt;
+[[MediaWiki_talk:75749962|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must &amp;#91;&amp;#91;special:Userlogin&amp;#124;login]] to view other pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:75749962</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c779400b&amp;action=edit a90049e8]&lt;br&gt;
+[[MediaWiki_talk:c779400b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Login Required
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c779400b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:753694e0&amp;action=edit a5607b10]&lt;br&gt;
+[[MediaWiki_talk:753694e0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are now logged in to Wiktionary as &amp;quot;$1&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:753694e0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:73eb6767&amp;action=edit 5c2a05be]&lt;br&gt;
+[[MediaWiki_talk:73eb6767|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Login successful
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:73eb6767</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e43d612e&amp;action=edit 55525e1b]&lt;br&gt;
+[[MediaWiki_talk:e43d612e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Log out
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e43d612e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8455b1c&amp;action=edit 50310460]&lt;br&gt;
+[[MediaWiki_talk:a8455b1c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are now logged out.
+You can continue to use Wiktionary anonymously, or you can log in
+again as the same or as a different user. Note that some pages may
+continue to be displayed as if you were still logged in, until you clear
+your browser cache
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a8455b1c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd48f4e7&amp;action=edit 8f9db4e5]&lt;br&gt;
+[[MediaWiki_talk:cd48f4e7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User logout
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cd48f4e7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:916f5569&amp;action=edit 92ab2259]&lt;br&gt;
+[[MediaWiki_talk:916f5569|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Orphaned pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:916f5569</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9cdfa115&amp;action=edit 38996948]&lt;br&gt;
+[[MediaWiki_talk:9cdfa115|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Long pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9cdfa115</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b91ee293&amp;action=edit 09b5b0a2]&lt;br&gt;
+[[MediaWiki_talk:b91ee293|Talk]]
+&lt;/td&gt;&lt;td&gt;
+WARNING: This page is $1 kilobytes long; some
+browsers may have problems editing pages approaching or longer than 32kb.
+Please consider breaking the page into smaller sections.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b91ee293</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1ca3c8a2&amp;action=edit 2b82fce3]&lt;br&gt;
+[[MediaWiki_talk:1ca3c8a2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Error sending mail: $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1ca3c8a2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:97681e3e&amp;action=edit 669d145f]&lt;br&gt;
+[[MediaWiki_talk:97681e3e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Mail me a new password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:97681e3e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8646515d&amp;action=edit 874a6660]&lt;br&gt;
+[[MediaWiki_talk:8646515d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No send address
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8646515d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8116e36&amp;action=edit ce0442ed]&lt;br&gt;
+[[MediaWiki_talk:f8116e36|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must be &amp;lt;a href=&amp;quot;{{localurl:Special:Userlogin&amp;quot;&amp;gt;logged in&amp;lt;/a&amp;gt;
+and have a valid e-mail address in your &amp;lt;a href=&amp;quot;/wiki/Special:Preferences&amp;quot;&amp;gt;preferences&amp;lt;/a&amp;gt;
+to send e-mail to other users.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f8116e36</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:95989ab3&amp;action=edit 6ad3db9a]&lt;br&gt;
+[[MediaWiki_talk:95989ab3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Main Page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:95989ab3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:216e0fe3&amp;action=edit 19d499cf]&lt;br&gt;
+[[MediaWiki_talk:216e0fe3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Please see &amp;#91;http&amp;#58;//meta.wikipedia.org/wiki/MediaWiki_i18n documentation on customizing the interface]
+and the &amp;#91;http&amp;#58;//meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User&amp;#39;s Guide] for usage and configuration help.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:216e0fe3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:29c07aac&amp;action=edit 30186460]&lt;br&gt;
+[[MediaWiki_talk:29c07aac|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiki software successfully installed.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:29c07aac</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:94de303b&amp;action=edit 5b30e2c5]&lt;br&gt;
+[[MediaWiki_talk:94de303b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Maintenance page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:94de303b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b98df751&amp;action=edit aa734abd]&lt;br&gt;
+[[MediaWiki_talk:b98df751|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Back to Maintenance Page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b98df751</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e830e7c&amp;action=edit ff589b21]&lt;br&gt;
+[[MediaWiki_talk:5e830e7c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page includes several handy tools for everyday maintenance. Some of these functions tend to stress the database, so please do not hit reload after every item you fixed ;-)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5e830e7c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:147d840b&amp;action=edit 192a7baa]&lt;br&gt;
+[[MediaWiki_talk:147d840b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Make a user into a sysop
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:147d840b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3e1272dd&amp;action=edit c857a847]&lt;br&gt;
+[[MediaWiki_talk:3e1272dd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;User &amp;quot;$1&amp;quot; could not be made into a sysop. (Did you enter the name correctly?)&amp;lt;/b&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3e1272dd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f942827d&amp;action=edit 4ae2de91]&lt;br&gt;
+[[MediaWiki_talk:f942827d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Name of the user:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f942827d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8933e97e&amp;action=edit 1138d88d]&lt;br&gt;
+[[MediaWiki_talk:8933e97e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;User &amp;quot;$1&amp;quot; is now a sysop&amp;lt;/b&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8933e97e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ffde53f7&amp;action=edit 51a3d81a]&lt;br&gt;
+[[MediaWiki_talk:ffde53f7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Make this user into a sysop
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ffde53f7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6135d20c&amp;action=edit 9014f0fd]&lt;br&gt;
+[[MediaWiki_talk:6135d20c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This form is used by bureaucrats to turn ordinary users into administrators.
+Type the name of the user in the box and press the button to make the user an administrator
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6135d20c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40537c23&amp;action=edit 9d7a92cc]&lt;br&gt;
+[[MediaWiki_talk:40537c23|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Make a user into a sysop
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:40537c23</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b00f5f1f&amp;action=edit f2f4e13e]&lt;br&gt;
+[[MediaWiki_talk:b00f5f1f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The query &amp;quot;$1&amp;quot; matched $2 page titles
+and the text of $3 pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b00f5f1f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3edf0df4&amp;action=edit 7a488390]&lt;br&gt;
+[[MediaWiki_talk:3edf0df4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rendering math
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3edf0df4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78c6cb06&amp;action=edit d9b8688c]&lt;br&gt;
+[[MediaWiki_talk:78c6cb06|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Can&amp;#39;t write to or create math output directory
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:78c6cb06</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f83fe947&amp;action=edit be21263f]&lt;br&gt;
+[[MediaWiki_talk:f83fe947|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Can&amp;#39;t write to or create math temp directory
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f83fe947</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8cf40ba&amp;action=edit 53e1c013]&lt;br&gt;
+[[MediaWiki_talk:f8cf40ba|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Failed to parse
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f8cf40ba</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7b3e958f&amp;action=edit 7082c48f]&lt;br&gt;
+[[MediaWiki_talk:7b3e958f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+PNG conversion failed; check for correct installation of latex, dvips, gs, and convert
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7b3e958f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d6a158de&amp;action=edit 41e6fe2b]&lt;br&gt;
+[[MediaWiki_talk:d6a158de|Talk]]
+&lt;/td&gt;&lt;td&gt;
+lexing error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d6a158de</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8109168a&amp;action=edit 20ec4685]&lt;br&gt;
+[[MediaWiki_talk:8109168a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Missing texvc executable; please see math/README to configure.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8109168a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:41b65279&amp;action=edit 3e8b5972]&lt;br&gt;
+[[MediaWiki_talk:41b65279|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Insert formula here
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:41b65279</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5cbab860&amp;action=edit d5667f6b]&lt;br&gt;
+[[MediaWiki_talk:5cbab860|Talk]]
+&lt;/td&gt;&lt;td&gt;
+syntax error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5cbab860</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e756feb&amp;action=edit 0baadf18]&lt;br&gt;
+[[MediaWiki_talk:7e756feb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Mathematical formula (LaTeX)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7e756feb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb4d261d&amp;action=edit 5e0c970a]&lt;br&gt;
+[[MediaWiki_talk:fb4d261d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+unknown error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fb4d261d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:26558f91&amp;action=edit a0577d1d]&lt;br&gt;
+[[MediaWiki_talk:26558f91|Talk]]
+&lt;/td&gt;&lt;td&gt;
+unknown function
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:26558f91</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:63e94059&amp;action=edit 704093ed]&lt;br&gt;
+[[MediaWiki_talk:63e94059|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Example.mp3
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:63e94059</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e4baaa8&amp;action=edit 77fbb90b]&lt;br&gt;
+[[MediaWiki_talk:8e4baaa8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Media file link
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8e4baaa8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cca18055&amp;action=edit 61350cd2]&lt;br&gt;
+[[MediaWiki_talk:cca18055|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image names must be at least three letters.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cca18055</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f8c4ff3&amp;action=edit 3dd77123]&lt;br&gt;
+[[MediaWiki_talk:7f8c4ff3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This is a minor edit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7f8c4ff3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce5828a8&amp;action=edit 3c37ba2f]&lt;br&gt;
+[[MediaWiki_talk:ce5828a8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+M
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ce5828a8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1e3a3f5e&amp;action=edit abf0b01a]&lt;br&gt;
+[[MediaWiki_talk:1e3a3f5e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Pages with misspellings
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1e3a3f5e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18c50601&amp;action=edit 4841b1be]&lt;br&gt;
+[[MediaWiki_talk:18c50601|Talk]]
+&lt;/td&gt;&lt;td&gt;
+List of common misspellings
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:18c50601</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ff661e66&amp;action=edit 20eeb250]&lt;br&gt;
+[[MediaWiki_talk:ff661e66|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following pages contain a common misspelling, which are listed on $1. The correct spelling might be given (like this).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ff661e66</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77dd649d&amp;action=edit 28d8d2f3]&lt;br&gt;
+[[MediaWiki_talk:77dd649d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The database did not find the text of a page
+that it should have found, named &amp;quot;$1&amp;quot;.
+
+&amp;lt;p&amp;gt;This is usually caused by following an outdated diff or history link to a
+page that has been deleted.
+
+&amp;lt;p&amp;gt;If this is not the case, you may have found a bug in the software.
+Please report this to an administrator, making note of the URL.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:77dd649d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:43bf0acd&amp;action=edit d6472ac8]&lt;br&gt;
+[[MediaWiki_talk:43bf0acd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;Missing image&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;i&amp;gt;$1&amp;lt;/i&amp;gt;
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:43bf0acd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75c0518a&amp;action=edit f433e9c8]&lt;br&gt;
+[[MediaWiki_talk:75c0518a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Missing Language Links
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:75c0518a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5ef61b91&amp;action=edit a4a9fdcd]&lt;br&gt;
+[[MediaWiki_talk:5ef61b91|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Find missing language links for
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5ef61b91</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f5affad8&amp;action=edit e46ff038]&lt;br&gt;
+[[MediaWiki_talk:f5affad8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+These pages do &amp;lt;i&amp;gt;not&amp;lt;/i&amp;gt; link to their counterpart in $1. Redirects and subpages are &amp;lt;i&amp;gt;not&amp;lt;/i&amp;gt; shown.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f5affad8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22e2c957&amp;action=edit b43c02b9]&lt;br&gt;
+[[MediaWiki_talk:22e2c957|Talk]]
+&lt;/td&gt;&lt;td&gt;
+More...
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:22e2c957</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:76cdb950&amp;action=edit 379d6ce9]&lt;br&gt;
+[[MediaWiki_talk:76cdb950|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:76cdb950</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31d22872&amp;action=edit d55a3c2a]&lt;br&gt;
+[[MediaWiki_talk:31d22872|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:31d22872</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb280ed2&amp;action=edit 0bd0c880]&lt;br&gt;
+[[MediaWiki_talk:fb280ed2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+moved to
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fb280ed2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8ddc20a0&amp;action=edit 7c041d6e]&lt;br&gt;
+[[MediaWiki_talk:8ddc20a0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not logged in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8ddc20a0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75985d0e&amp;action=edit e479574b]&lt;br&gt;
+[[MediaWiki_talk:75985d0e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must be a registered user and &amp;lt;a href=&amp;quot;/wiki/Special:Userlogin&amp;quot;&amp;gt;logged in&amp;lt;/a&amp;gt;
+to move a page.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:75985d0e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:addffb42&amp;action=edit 0f05ab2b]&lt;br&gt;
+[[MediaWiki_talk:addffb42|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:addffb42</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f9e8dfc&amp;action=edit 0311d79b]&lt;br&gt;
+[[MediaWiki_talk:6f9e8dfc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6f9e8dfc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:993d5ce8&amp;action=edit 53ab3d1c]&lt;br&gt;
+[[MediaWiki_talk:993d5ce8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The associated talk page, if any, will be automatically moved along with it &amp;#39;&amp;#39;&amp;#39;unless:&amp;#39;&amp;#39;&amp;#39;
+*You are moving the page across namespaces,
+*A non-empty talk page already exists under the new name, or
+*You uncheck the box below.
+
+In those cases, you will have to move or merge the page manually if desired.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:993d5ce8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce6bc0ee&amp;action=edit a363312c]&lt;br&gt;
+[[MediaWiki_talk:ce6bc0ee|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Using the form below will rename a page, moving all
+of its history to the new name.
+The old title will become a redirect page to the new title.
+Links to the old page title will not be changed; be sure to
+&amp;#91;&amp;#91;Special:Maintenance&amp;#124;check]] for double or broken redirects.
+You are responsible for making sure that links continue to
+point where they are supposed to go.
+
+Note that the page will &amp;#39;&amp;#39;&amp;#39;not&amp;#39;&amp;#39;&amp;#39; be moved if there is already
+a page at the new title, unless it is empty or a redirect and has no
+past edit history. This means that you can rename a page back to where
+it was just renamed from if you make a mistake, and you cannot overwrite
+an existing page.
+
+&amp;lt;b&amp;gt;WARNING!&amp;lt;/b&amp;gt;
+This can be a drastic and unexpected change for a popular page;
+please be sure you understand the consequences of this before
+proceeding.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ce6bc0ee</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e0a05db0&amp;action=edit 7bd87d2d]&lt;br&gt;
+[[MediaWiki_talk:e0a05db0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move &amp;quot;talk&amp;quot; page as well, if applicable.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e0a05db0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:689ff1e7&amp;action=edit 2119d3ee]&lt;br&gt;
+[[MediaWiki_talk:689ff1e7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:689ff1e7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0dc37cdb&amp;action=edit 12b6caf0]&lt;br&gt;
+[[MediaWiki_talk:0dc37cdb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My contributions
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0dc37cdb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51a7215d&amp;action=edit 5d558678]&lt;br&gt;
+[[MediaWiki_talk:51a7215d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:51a7215d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fbe8f485&amp;action=edit 49886539]&lt;br&gt;
+[[MediaWiki_talk:fbe8f485|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My talk
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fbe8f485</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf03cf2e&amp;action=edit ad831792]&lt;br&gt;
+[[MediaWiki_talk:cf03cf2e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Navigation
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cf03cf2e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b5b13ae8&amp;action=edit e75caf8a]&lt;br&gt;
+[[MediaWiki_talk:b5b13ae8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 bytes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b5b13ae8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bee99a5f&amp;action=edit 3d7d513a]&lt;br&gt;
+[[MediaWiki_talk:bee99a5f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bee99a5f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:654df301&amp;action=edit 06b1c460]&lt;br&gt;
+[[MediaWiki_talk:654df301|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(New)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:654df301</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1622d18&amp;action=edit b90d5eb0]&lt;br&gt;
+[[MediaWiki_talk:f1622d18|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You&amp;#39;ve followed a link to a page that doesn&amp;#39;t exist yet.
+To create the page, start typing in the box below
+(see the &amp;#91;&amp;#91;Wiktionary:Help&amp;#124;help page]] for more info).
+If you are here by mistake, just click your browser&amp;#39;s &amp;#39;&amp;#39;&amp;#39;back&amp;#39;&amp;#39;&amp;#39; button.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f1622d18</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:780ce01b&amp;action=edit 0b08523d]&lt;br&gt;
+[[MediaWiki_talk:780ce01b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:780ce01b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e09d8ffe&amp;action=edit 1f028736]&lt;br&gt;
+[[MediaWiki_talk:e09d8ffe|Talk]]
+&lt;/td&gt;&lt;td&gt;
+new messages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e09d8ffe</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce656abe&amp;action=edit d68c7e3c]&lt;br&gt;
+[[MediaWiki_talk:ce656abe|Talk]]
+&lt;/td&gt;&lt;td&gt;
+New page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ce656abe</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b886426f&amp;action=edit d081a481]&lt;br&gt;
+[[MediaWiki_talk:b886426f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+N
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b886426f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2adf1ae7&amp;action=edit eeadf049]&lt;br&gt;
+[[MediaWiki_talk:2adf1ae7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+New pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2adf1ae7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:393f8bca&amp;action=edit f2c57870]&lt;br&gt;
+[[MediaWiki_talk:393f8bca|Talk]]
+&lt;/td&gt;&lt;td&gt;
+New password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:393f8bca</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fa56bbd9&amp;action=edit a104cc01]&lt;br&gt;
+[[MediaWiki_talk:fa56bbd9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+To new title
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fa56bbd9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a57c83c&amp;action=edit 41af2ba5]&lt;br&gt;
+[[MediaWiki_talk:2a57c83c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+ (new users only)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a57c83c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc981983&amp;action=edit edee9402]&lt;br&gt;
+[[MediaWiki_talk:bc981983|Talk]]
+&lt;/td&gt;&lt;td&gt;
+next
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bc981983</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e067f51&amp;action=edit e0bd4ddb]&lt;br&gt;
+[[MediaWiki_talk:5e067f51|Talk]]
+&lt;/td&gt;&lt;td&gt;
+next $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5e067f51</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:61c11c45&amp;action=edit 2b45e9af]&lt;br&gt;
+[[MediaWiki_talk:61c11c45|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 links
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:61c11c45</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e307257f&amp;action=edit f6f5e28d]&lt;br&gt;
+[[MediaWiki_talk:e307257f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must affirm that your upload does not violate
+any copyrights.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e307257f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:335462de&amp;action=edit 2658d031]&lt;br&gt;
+[[MediaWiki_talk:335462de|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(There is currently no text in this page)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:335462de</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:46716843&amp;action=edit 68326cbc]&lt;br&gt;
+[[MediaWiki_talk:46716843|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must supply a reason for the block.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:46716843</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8fa787f6&amp;action=edit 5d122d51]&lt;br&gt;
+[[MediaWiki_talk:8fa787f6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8fa787f6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f60d1a6d&amp;action=edit b88f305b]&lt;br&gt;
+[[MediaWiki_talk:f60d1a6d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No changes were found matching these criteria.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f60d1a6d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9d931b8c&amp;action=edit de736886]&lt;br&gt;
+[[MediaWiki_talk:9d931b8c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary uses cookies to log in users. You have cookies disabled. Please enable them and try again.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9d931b8c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e4a19fc8&amp;action=edit 71c8d192]&lt;br&gt;
+[[MediaWiki_talk:e4a19fc8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The user account was created, but you are not logged in. Wiktionary uses cookies to log in users. You have cookies disabled. Please enable them, then log in with your new username and password.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e4a19fc8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6fbb6d3a&amp;action=edit cc61a719]&lt;br&gt;
+[[MediaWiki_talk:6fbb6d3a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Creative Commons RDF metadata disabled for this server.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6fbb6d3a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e0dd32fc&amp;action=edit 5ed4cf16]&lt;br&gt;
+[[MediaWiki_talk:e0dd32fc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Could not select database $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e0dd32fc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:067ee3e9&amp;action=edit 3a58322b]&lt;br&gt;
+[[MediaWiki_talk:067ee3e9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Dublin Core RDF metadata disabled for this server.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:067ee3e9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:325a917f&amp;action=edit 4c8d93d2]&lt;br&gt;
+[[MediaWiki_talk:325a917f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There is no e-mail address recorded for user &amp;quot;$1&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:325a917f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:deb172c1&amp;action=edit f8bace82]&lt;br&gt;
+[[MediaWiki_talk:deb172c1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This user has not specified a valid e-mail address,
+or has chosen not to receive e-mail from other users.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:deb172c1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6bd33d89&amp;action=edit a158d61f]&lt;br&gt;
+[[MediaWiki_talk:6bd33d89|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No e-mail address
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6bd33d89</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e68327b0&amp;action=edit 36552107]&lt;br&gt;
+[[MediaWiki_talk:e68327b0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No page with this exact title exists, trying full text search.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e68327b0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:90c1625a&amp;action=edit 8d231ce4]&lt;br&gt;
+[[MediaWiki_talk:90c1625a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There is no edit history for this page.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:90c1625a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13e13fa2&amp;action=edit e63b6d19]&lt;br&gt;
+[[MediaWiki_talk:13e13fa2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No pages link to here.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:13e13fa2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5c3c99a8&amp;action=edit 1e827a30]&lt;br&gt;
+[[MediaWiki_talk:5c3c99a8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There are no pages that link to this image.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5c3c99a8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d9ff75a4&amp;action=edit e21bfc14]&lt;br&gt;
+[[MediaWiki_talk:d9ff75a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have not specified a valid user name.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d9ff75a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f7d27b0c&amp;action=edit 5db654d1]&lt;br&gt;
+[[MediaWiki_talk:f7d27b0c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;strong&amp;gt;Note&amp;lt;/strong&amp;gt;: unsuccessful searches are
+often caused by searching for common words like &amp;quot;have&amp;quot; and &amp;quot;from&amp;quot;,
+which are not indexed, or by specifying more than one search term (only pages
+containing all of the search terms will appear in the result).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f7d27b0c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d5f565dd&amp;action=edit aaaac807]&lt;br&gt;
+[[MediaWiki_talk:d5f565dd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have requested a special page that is not
+recognized by the wiki.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d5f565dd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:247c2db2&amp;action=edit 273b8154]&lt;br&gt;
+[[MediaWiki_talk:247c2db2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No such action
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:247c2db2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0e2f696c&amp;action=edit e8773306]&lt;br&gt;
+[[MediaWiki_talk:0e2f696c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The action specified by the URL is not
+recognized by the wiki
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0e2f696c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd0d7ac6&amp;action=edit b98c7c10]&lt;br&gt;
+[[MediaWiki_talk:bd0d7ac6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No such special page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bd0d7ac6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22012b0a&amp;action=edit f542883d]&lt;br&gt;
+[[MediaWiki_talk:22012b0a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There is no user by the name &amp;quot;$1&amp;quot;.
+Check your spelling, or use the form below to create a new user account.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:22012b0a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:982342c7&amp;action=edit f4909824]&lt;br&gt;
+[[MediaWiki_talk:982342c7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The wiki server can&amp;#39;t provide data in a format your client can read.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:982342c7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:272cfb97&amp;action=edit cdb5d3a9]&lt;br&gt;
+[[MediaWiki_talk:272cfb97|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not a content page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:272cfb97</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8ccaecd6&amp;action=edit 42534913]&lt;br&gt;
+[[MediaWiki_talk:8ccaecd6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have not specified a target page or user
+to perform this function on.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8ccaecd6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4532ec15&amp;action=edit dff62a20]&lt;br&gt;
+[[MediaWiki_talk:4532ec15|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No target
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4532ec15</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2c924e30&amp;action=edit c51048b7]&lt;br&gt;
+[[MediaWiki_talk:2c924e30|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2c924e30</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51c2043b&amp;action=edit 879701e9]&lt;br&gt;
+[[MediaWiki_talk:51c2043b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No page text matches
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:51c2043b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f3befe0&amp;action=edit 5a56ca1b]&lt;br&gt;
+[[MediaWiki_talk:6f3befe0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+No page title matches
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6f3befe0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:219a05e4&amp;action=edit 02bcadd3]&lt;br&gt;
+[[MediaWiki_talk:219a05e4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not logged in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:219a05e4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28b54fd2&amp;action=edit ba736b7f]&lt;br&gt;
+[[MediaWiki_talk:28b54fd2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have no items on your watchlist.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:28b54fd2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a78319d8&amp;action=edit 2398990d]&lt;br&gt;
+[[MediaWiki_talk:a78319d8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Insert non-formatted text here
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a78319d8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:20d39be1&amp;action=edit cf8602ad]&lt;br&gt;
+[[MediaWiki_talk:20d39be1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Ignore wiki formatting
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:20d39be1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dee84866&amp;action=edit 7a6336e0]&lt;br&gt;
+[[MediaWiki_talk:dee84866|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Category
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dee84866</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3e0d95e&amp;action=edit 16b32116]&lt;br&gt;
+[[MediaWiki_talk:a3e0d95e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Help
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a3e0d95e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:911dff1f&amp;action=edit 081e450a]&lt;br&gt;
+[[MediaWiki_talk:911dff1f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Image
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:911dff1f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:931f9736&amp;action=edit 5b9c503a]&lt;br&gt;
+[[MediaWiki_talk:931f9736|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Article
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:931f9736</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6da2f6ae&amp;action=edit 86e5f16d]&lt;br&gt;
+[[MediaWiki_talk:6da2f6ae|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Media
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6da2f6ae</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53504d48&amp;action=edit 368d5d22]&lt;br&gt;
+[[MediaWiki_talk:53504d48|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Message
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:53504d48</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:14d4daef&amp;action=edit 34a2cba3]&lt;br&gt;
+[[MediaWiki_talk:14d4daef|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Special
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:14d4daef</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ed2e8b27&amp;action=edit a1024e18]&lt;br&gt;
+[[MediaWiki_talk:ed2e8b27|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Template
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ed2e8b27</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31ebc74b&amp;action=edit 313f5ee2]&lt;br&gt;
+[[MediaWiki_talk:31ebc74b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:31ebc74b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8d28daa&amp;action=edit 0611a13e]&lt;br&gt;
+[[MediaWiki_talk:a8d28daa|Talk]]
+&lt;/td&gt;&lt;td&gt;
+About
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a8d28daa</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b0a98216&amp;action=edit 7a85f476]&lt;br&gt;
+[[MediaWiki_talk:b0a98216|Talk]]
+&lt;/td&gt;&lt;td&gt;
+OK
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b0a98216</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e081cf87&amp;action=edit 23ace733]&lt;br&gt;
+[[MediaWiki_talk:e081cf87|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Old password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e081cf87</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:db6998a7&amp;action=edit dc894908]&lt;br&gt;
+[[MediaWiki_talk:db6998a7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+orig
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:db6998a7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb5dc4a4&amp;action=edit 89f56e51]&lt;br&gt;
+[[MediaWiki_talk:cb5dc4a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Orphaned pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cb5dc4a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51caf0b1&amp;action=edit e6287b24]&lt;br&gt;
+[[MediaWiki_talk:51caf0b1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Based on work by $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:51caf0b1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:838fda53&amp;action=edit f953cc13]&lt;br&gt;
+[[MediaWiki_talk:838fda53|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Other languages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:838fda53</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8b80dc12&amp;action=edit 06b2b863]&lt;br&gt;
+[[MediaWiki_talk:8b80dc12|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move succeeded
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8b80dc12</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:67c1c9b9&amp;action=edit 6df06888]&lt;br&gt;
+[[MediaWiki_talk:67c1c9b9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Page &amp;quot;&amp;#91;&amp;#91;$1]]&amp;quot; moved to &amp;quot;&amp;#91;&amp;#91;$2]]&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:67c1c9b9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0488d9f9&amp;action=edit ca0a1736]&lt;br&gt;
+[[MediaWiki_talk:0488d9f9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 - Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0488d9f9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:724220c3&amp;action=edit 00c46482]&lt;br&gt;
+[[MediaWiki_talk:724220c3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Someone (probably you, from IP address $1)
+requested that we send you a new Wiktionary login password.
+The password for user &amp;quot;$2&amp;quot; is now &amp;quot;$3&amp;quot;.
+You should log in and change your password now.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:724220c3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:67675177&amp;action=edit 9943fd1d]&lt;br&gt;
+[[MediaWiki_talk:67675177|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Password reminder from Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:67675177</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feea022e&amp;action=edit 52c6d21a]&lt;br&gt;
+[[MediaWiki_talk:feea022e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+A new password has been sent to the e-mail address
+registered for &amp;quot;$1&amp;quot;.
+Please log in again after you receive it.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:feea022e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d89b33a4&amp;action=edit 6148b748]&lt;br&gt;
+[[MediaWiki_talk:d89b33a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following data is cached and may not be completely up to date:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d89b33a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7c3d6ba1&amp;action=edit edb94b6f]&lt;br&gt;
+[[MediaWiki_talk:7c3d6ba1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Sorry! This feature has been temporarily disabled
+because it slows the database down to the point that no one can use
+the wiki.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7c3d6ba1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba8fb63e&amp;action=edit 7971fbbc]&lt;br&gt;
+[[MediaWiki_talk:ba8fb63e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Here&amp;#39;s a saved copy from $1:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ba8fb63e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1f9d5196&amp;action=edit faae8244]&lt;br&gt;
+[[MediaWiki_talk:1f9d5196|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Personal tools
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1f9d5196</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b55223c7&amp;action=edit 23f3fd77]&lt;br&gt;
+[[MediaWiki_talk:b55223c7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Community portal
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b55223c7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b6100630&amp;action=edit d69501d7]&lt;br&gt;
+[[MediaWiki_talk:b6100630|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:Community Portal
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b6100630</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:83c6e160&amp;action=edit 7ce546d1]&lt;br&gt;
+[[MediaWiki_talk:83c6e160|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Post a comment
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:83c6e160</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f715eef0&amp;action=edit 03d7f055]&lt;br&gt;
+[[MediaWiki_talk:f715eef0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary is powered by &amp;#91;http&amp;#58;//www.mediawiki.org/ MediaWiki], an open source wiki engine.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f715eef0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5f86f380&amp;action=edit fe586261]&lt;br&gt;
+[[MediaWiki_talk:5f86f380|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5f86f380</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:02360031&amp;action=edit 7c50040c]&lt;br&gt;
+[[MediaWiki_talk:02360031|Talk]]
+&lt;/td&gt;&lt;td&gt;
+
+Search in namespaces :&amp;lt;br /&amp;gt;
+$1&amp;lt;br /&amp;gt;
+$2 List redirects &amp;amp;nbsp; Search for $3 $9
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:02360031</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9dfd349e&amp;action=edit dcedb31d]&lt;br&gt;
+[[MediaWiki_talk:9dfd349e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Preferences
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9dfd349e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b97fde2&amp;action=edit 4d381b11]&lt;br&gt;
+[[MediaWiki_talk:6b97fde2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+* &amp;lt;strong&amp;gt;Real name&amp;lt;/strong&amp;gt; (optional): if you choose to provide it this will be used for giving you attribution for your work.&amp;lt;br/&amp;gt;
+* &amp;lt;strong&amp;gt;Email&amp;lt;/strong&amp;gt; (optional): Enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6b97fde2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:30cafb20&amp;action=edit 4413aea7]&lt;br&gt;
+[[MediaWiki_talk:30cafb20|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Misc settings
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:30cafb20</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58796ee5&amp;action=edit 79de347d]&lt;br&gt;
+[[MediaWiki_talk:58796ee5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User data
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:58796ee5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e055ac90&amp;action=edit b8a6f738]&lt;br&gt;
+[[MediaWiki_talk:e055ac90|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Recent changes and stub display
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e055ac90</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0603b5a9&amp;action=edit 3b8a7d0e]&lt;br&gt;
+[[MediaWiki_talk:0603b5a9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are logged in as &amp;quot;$1&amp;quot;.
+Your internal ID number is $2.
+
+See &amp;#91;&amp;#91;Wiktionary:User preferences help]] for help deciphering the options.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0603b5a9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2366fb91&amp;action=edit f2475be5]&lt;br&gt;
+[[MediaWiki_talk:2366fb91|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not logged in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2366fb91</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0389a76a&amp;action=edit 69cb02c9]&lt;br&gt;
+[[MediaWiki_talk:0389a76a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must be &amp;lt;a href=&amp;quot;/wiki/Special:Userlogin&amp;quot;&amp;gt;logged in&amp;lt;/a&amp;gt;
+to set user preferences.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0389a76a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e6216751&amp;action=edit 2b688ff4]&lt;br&gt;
+[[MediaWiki_talk:e6216751|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Preferences have been reset from storage.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e6216751</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1fbb2b4&amp;action=edit 1aa787fe]&lt;br&gt;
+[[MediaWiki_talk:f1fbb2b4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Preview
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f1fbb2b4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7357cd58&amp;action=edit 353820b9]&lt;br&gt;
+[[MediaWiki_talk:7357cd58|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This preview reflects the text in the upper
+text editing area as it will appear if you choose to save.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7357cd58</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f0bd6ebe&amp;action=edit 2281018c]&lt;br&gt;
+[[MediaWiki_talk:f0bd6ebe|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Remember that this is only a preview, and has not yet been saved!
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f0bd6ebe</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c7db0778&amp;action=edit 8b3bb669]&lt;br&gt;
+[[MediaWiki_talk:c7db0778|Talk]]
+&lt;/td&gt;&lt;td&gt;
+previous $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c7db0778</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a67b813&amp;action=edit e1a919ba]&lt;br&gt;
+[[MediaWiki_talk:0a67b813|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Printable version
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0a67b813</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc3b6f21&amp;action=edit d4d3cccd]&lt;br&gt;
+[[MediaWiki_talk:dc3b6f21|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(From http&amp;#58;//tl.wiktionary.org)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dc3b6f21</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:016ac2dc&amp;action=edit 145969f1]&lt;br&gt;
+[[MediaWiki_talk:016ac2dc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protect
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:016ac2dc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:073135b4&amp;action=edit bf7f9e49]&lt;br&gt;
+[[MediaWiki_talk:073135b4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reason for protecting
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:073135b4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3ee691ce&amp;action=edit 1f880b64]&lt;br&gt;
+[[MediaWiki_talk:3ee691ce|Talk]]
+&lt;/td&gt;&lt;td&gt;
+protected &amp;#91;&amp;#91;$1]]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3ee691ce</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a44b308c&amp;action=edit 7afa7fea]&lt;br&gt;
+[[MediaWiki_talk:a44b308c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protected page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a44b308c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0017a4f5&amp;action=edit 962032da]&lt;br&gt;
+[[MediaWiki_talk:0017a4f5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+WARNING: This page has been locked so that only
+users with sysop privileges can edit it. Be sure you are following the
+&amp;lt;a href=&amp;#39;/w/wiki.phtml/Wiktionary:Protected_page_guidelines&amp;#39;&amp;gt;protected page
+guidelines&amp;lt;/a&amp;gt;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0017a4f5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf2a914e&amp;action=edit 561f00bf]&lt;br&gt;
+[[MediaWiki_talk:cf2a914e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page has been locked to prevent editing; there are
+a number of reasons why this may be so, please see
+&amp;#91;&amp;#91;Wiktionary:Protected page]].
+
+You can view and copy the source of this page:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cf2a914e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bb915483&amp;action=edit 85888484]&lt;br&gt;
+[[MediaWiki_talk:bb915483|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protection_log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bb915483</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:061ec7fa&amp;action=edit 197cfa0d]&lt;br&gt;
+[[MediaWiki_talk:061ec7fa|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below is a list of page locks/unlocks.
+See &amp;#91;&amp;#91;Wiktionary:Protected page]] for more information.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:061ec7fa</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d2ae1354&amp;action=edit 33c2c02c]&lt;br&gt;
+[[MediaWiki_talk:d2ae1354|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protect page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d2ae1354</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c0e9bbaf&amp;action=edit 5cbc043a]&lt;br&gt;
+[[MediaWiki_talk:c0e9bbaf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(give a reason)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c0e9bbaf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:23176a41&amp;action=edit 24a81acc]&lt;br&gt;
+[[MediaWiki_talk:23176a41|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Protecting &amp;quot;$1&amp;quot;)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:23176a41</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:884b47b3&amp;action=edit 77ca39fa]&lt;br&gt;
+[[MediaWiki_talk:884b47b3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protect this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:884b47b3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0ebe1928&amp;action=edit 11599708]&lt;br&gt;
+[[MediaWiki_talk:0ebe1928|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Proxy blocker
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0ebe1928</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0ccb1a72&amp;action=edit f4482395]&lt;br&gt;
+[[MediaWiki_talk:0ccb1a72|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your IP address has been blocked because it is an open proxy. Please contact your Internet service provider or tech support and inform them of this serious security problem.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0ccb1a72</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:88af6e64&amp;action=edit 01b6671f]&lt;br&gt;
+[[MediaWiki_talk:88af6e64|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Done.
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:88af6e64</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1594c4a&amp;action=edit 596b17aa]&lt;br&gt;
+[[MediaWiki_talk:b1594c4a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Browse
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b1594c4a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:25b61f80&amp;action=edit 9e11e13b]&lt;br&gt;
+[[MediaWiki_talk:25b61f80|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Edit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:25b61f80</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1a9ed9d&amp;action=edit cc717307]&lt;br&gt;
+[[MediaWiki_talk:e1a9ed9d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Find
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e1a9ed9d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:24074cfc&amp;action=edit a40d0b3f]&lt;br&gt;
+[[MediaWiki_talk:24074cfc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:24074cfc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:af83fbba&amp;action=edit 8f794a0f]&lt;br&gt;
+[[MediaWiki_talk:af83fbba|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Context
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:af83fbba</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8fff0e7&amp;action=edit 20fec244]&lt;br&gt;
+[[MediaWiki_talk:c8fff0e7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c8fff0e7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5a6ec2af&amp;action=edit 2dfd6121]&lt;br&gt;
+[[MediaWiki_talk:5a6ec2af|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Quickbar settings
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5a6ec2af</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8eda832f&amp;action=edit e97e9088]&lt;br&gt;
+[[MediaWiki_talk:8eda832f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Special pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8eda832f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce1c6b9a&amp;action=edit dc17545e]&lt;br&gt;
+[[MediaWiki_talk:ce1c6b9a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Submit query
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ce1c6b9a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:342970ff&amp;action=edit 7f2e7314]&lt;br&gt;
+[[MediaWiki_talk:342970ff|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Query successful
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:342970ff</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2300ac1&amp;action=edit 08f4cb5c]&lt;br&gt;
+[[MediaWiki_talk:c2300ac1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Random page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c2300ac1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9f84f8de&amp;action=edit 0da9559a]&lt;br&gt;
+[[MediaWiki_talk:9f84f8de|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The sysop ability to create range blocks is disabled.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9f84f8de</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f65142b8&amp;action=edit 65c24302]&lt;br&gt;
+[[MediaWiki_talk:f65142b8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f65142b8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78b9278a&amp;action=edit 96bcbd6a]&lt;br&gt;
+[[MediaWiki_talk:78b9278a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show last $1 changes in last $2 days&amp;lt;br /&amp;gt;$3
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:78b9278a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ead9cd8b&amp;action=edit 69cdd5ad]&lt;br&gt;
+[[MediaWiki_talk:ead9cd8b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show new changes starting from $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ead9cd8b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bad8b81d&amp;action=edit f13491ba]&lt;br&gt;
+[[MediaWiki_talk:bad8b81d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+; $1 edits from logged in users
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bad8b81d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58a7c0de&amp;action=edit ced7752e]&lt;br&gt;
+[[MediaWiki_talk:58a7c0de|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Loading recent changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:58a7c0de</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c3fd1aca&amp;action=edit d259fbf6]&lt;br&gt;
+[[MediaWiki_talk:c3fd1aca|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(to pages linked from &amp;quot;$1&amp;quot;)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c3fd1aca</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2c0a654c&amp;action=edit 15ea8401]&lt;br&gt;
+[[MediaWiki_talk:2c0a654c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below are the last &amp;lt;strong&amp;gt;$1&amp;lt;/strong&amp;gt; changes in last &amp;lt;strong&amp;gt;$2&amp;lt;/strong&amp;gt; days.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2c0a654c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a00aaba&amp;action=edit c516366b]&lt;br&gt;
+[[MediaWiki_talk:0a00aaba|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below are the changes since &amp;lt;b&amp;gt;$2&amp;lt;/b&amp;gt; (up to &amp;lt;b&amp;gt;$1&amp;lt;/b&amp;gt; shown).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0a00aaba</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d920fff&amp;action=edit 9a277182]&lt;br&gt;
+[[MediaWiki_talk:1d920fff|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Database locked
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1d920fff</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:64743780&amp;action=edit e5990e81]&lt;br&gt;
+[[MediaWiki_talk:64743780|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The database is currently locked to new
+entries and other modifications, probably for routine database maintenance,
+after which it will be back to normal.
+The administrator who locked it offered this explanation:
+&amp;lt;p&amp;gt;$1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:64743780</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c9d6af6&amp;action=edit 74bcbeed]&lt;br&gt;
+[[MediaWiki_talk:8c9d6af6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+WARNING: The database has been locked for maintenance,
+so you will not be able to save your edits right now. You may wish to cut-n-paste
+the text into a text file and save it for later.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8c9d6af6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4d75dd33&amp;action=edit 51734654]&lt;br&gt;
+[[MediaWiki_talk:4d75dd33|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Recent changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4d75dd33</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40f1d259&amp;action=edit 44d93957]&lt;br&gt;
+[[MediaWiki_talk:40f1d259|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Number of titles in recent changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:40f1d259</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:312aafe1&amp;action=edit b5822b16]&lt;br&gt;
+[[MediaWiki_talk:312aafe1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Related changes
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:312aafe1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f453993&amp;action=edit 049f8c5f]&lt;br&gt;
+[[MediaWiki_talk:2f453993|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Track the most recent changes to the wiki on this page.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2f453993</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7124fa4a&amp;action=edit 43d741c1]&lt;br&gt;
+[[MediaWiki_talk:7124fa4a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Redirected from $1)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7124fa4a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54d89323&amp;action=edit 4eef1c9f]&lt;br&gt;
+[[MediaWiki_talk:54d89323|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Remember my password across sessions.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:54d89323</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:537f5507&amp;action=edit bfa5dc98]&lt;br&gt;
+[[MediaWiki_talk:537f5507|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Remove checked items from watchlist
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:537f5507</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78e82769&amp;action=edit eeadf87c]&lt;br&gt;
+[[MediaWiki_talk:78e82769|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Removed from watchlist
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:78e82769</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ad711aa8&amp;action=edit d9807612]&lt;br&gt;
+[[MediaWiki_talk:ad711aa8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The page &amp;quot;$1&amp;quot; has been removed from your watchlist.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ad711aa8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:48b0bcb6&amp;action=edit 7d083ee5]&lt;br&gt;
+[[MediaWiki_talk:48b0bcb6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Removing requested items from watchlist...
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:48b0bcb6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f022894&amp;action=edit 4b81718e]&lt;br&gt;
+[[MediaWiki_talk:2f022894|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reset preferences
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2f022894</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc47acaf&amp;action=edit 8f8f7d13]&lt;br&gt;
+[[MediaWiki_talk:bc47acaf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 deleted edits
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bc47acaf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6add8c15&amp;action=edit 8f0c68f0]&lt;br&gt;
+[[MediaWiki_talk:6add8c15|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Hits to show per page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6add8c15</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f54af5b&amp;action=edit a5e2f101]&lt;br&gt;
+[[MediaWiki_talk:6f54af5b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Retrieved from &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6f54af5b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3dcff1b0&amp;action=edit 58f19667]&lt;br&gt;
+[[MediaWiki_talk:3dcff1b0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Return to $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3dcff1b0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9ac79c6&amp;action=edit 2b9171b6]&lt;br&gt;
+[[MediaWiki_talk:b9ac79c6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Retype new password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b9ac79c6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b7ae8f64&amp;action=edit a3eee606]&lt;br&gt;
+[[MediaWiki_talk:b7ae8f64|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Re-upload
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b7ae8f64</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd783da0&amp;action=edit d7ba5bcb]&lt;br&gt;
+[[MediaWiki_talk:cd783da0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Return to the upload form.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cd783da0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c73c43f3&amp;action=edit f322de9a]&lt;br&gt;
+[[MediaWiki_talk:c73c43f3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reverted to earlier revision
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c73c43f3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18591a4b&amp;action=edit 0d86ed82]&lt;br&gt;
+[[MediaWiki_talk:18591a4b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+rev
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:18591a4b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b24ef4f1&amp;action=edit 8ce494ea]&lt;br&gt;
+[[MediaWiki_talk:b24ef4f1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reverted edit of $2, changed back to last version by $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b24ef4f1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:96e64350&amp;action=edit 949a77c7]&lt;br&gt;
+[[MediaWiki_talk:96e64350|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Revision history
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:96e64350</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0c299dc7&amp;action=edit 3338672b]&lt;br&gt;
+[[MediaWiki_talk:0c299dc7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Revision as of $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0c299dc7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:159f321a&amp;action=edit d567812b]&lt;br&gt;
+[[MediaWiki_talk:159f321a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Revision not found
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:159f321a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:955fec48&amp;action=edit 4060f114]&lt;br&gt;
+[[MediaWiki_talk:955fec48|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The old revision of the page you asked for could not be found.
+Please check the URL you used to access this page.
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:955fec48</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b2f04988&amp;action=edit e8b606c2]&lt;br&gt;
+[[MediaWiki_talk:b2f04988|Talk]]
+&lt;/td&gt;&lt;td&gt;
+http&amp;#58;//www.faqs.org/rfcs/rfc$1.html
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b2f04988</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:db94ff6b&amp;action=edit 1407cb23]&lt;br&gt;
+[[MediaWiki_talk:db94ff6b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rights:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:db94ff6b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f28daee2&amp;action=edit ff3a6f3b]&lt;br&gt;
+[[MediaWiki_talk:f28daee2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Roll back edits
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f28daee2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2aaec24c&amp;action=edit 5f0fa7e7]&lt;br&gt;
+[[MediaWiki_talk:2aaec24c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rollback
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2aaec24c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54d37a4c&amp;action=edit 73c685e6]&lt;br&gt;
+[[MediaWiki_talk:54d37a4c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rollback failed
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:54d37a4c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b82a8f42&amp;action=edit 1a9fae49]&lt;br&gt;
+[[MediaWiki_talk:b82a8f42|Talk]]
+&lt;/td&gt;&lt;td&gt;
+rollback
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b82a8f42</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52d0b352&amp;action=edit 6c30d261]&lt;br&gt;
+[[MediaWiki_talk:52d0b352|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Rows
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:52d0b352</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5a43014e&amp;action=edit 1308cde0]&lt;br&gt;
+[[MediaWiki_talk:5a43014e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Save page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5a43014e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0e53fdc8&amp;action=edit 5f6543d0]&lt;br&gt;
+[[MediaWiki_talk:0e53fdc8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your preferences have been saved.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0e53fdc8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1415b15&amp;action=edit d6d40a58]&lt;br&gt;
+[[MediaWiki_talk:e1415b15|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Save file
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e1415b15</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ad98e68e&amp;action=edit 34ac956e]&lt;br&gt;
+[[MediaWiki_talk:ad98e68e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Save preferences
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ad98e68e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bce06414&amp;action=edit 3559d7ac]&lt;br&gt;
+[[MediaWiki_talk:bce06414|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bce06414</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f6495a7&amp;action=edit cfa0722d]&lt;br&gt;
+[[MediaWiki_talk:8f6495a7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;p&amp;gt;Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.&amp;lt;/p&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8f6495a7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:72344e87&amp;action=edit 3eea6ce4]&lt;br&gt;
+[[MediaWiki_talk:72344e87|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary:Searching
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:72344e87</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb9c1653&amp;action=edit da48347f]&lt;br&gt;
+[[MediaWiki_talk:cb9c1653|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Searching Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cb9c1653</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d79ca88&amp;action=edit 64bdca9a]&lt;br&gt;
+[[MediaWiki_talk:3d79ca88|Talk]]
+&lt;/td&gt;&lt;td&gt;
+For query &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3d79ca88</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b2f7c0e1&amp;action=edit 8ef6d4d3]&lt;br&gt;
+[[MediaWiki_talk:b2f7c0e1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search results
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b2f7c0e1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e5ed9018&amp;action=edit 83d578cd]&lt;br&gt;
+[[MediaWiki_talk:e5ed9018|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search result settings
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e5ed9018</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8cab5350&amp;action=edit 781b9fee]&lt;br&gt;
+[[MediaWiki_talk:8cab5350|Talk]]
+&lt;/td&gt;&lt;td&gt;
+For more information about searching Wiktionary, see $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8cab5350</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:37b6df63&amp;action=edit a26b768d]&lt;br&gt;
+[[MediaWiki_talk:37b6df63|Talk]]
+&lt;/td&gt;&lt;td&gt;
+ (section)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:37b6df63</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:be4aaa62&amp;action=edit 2ddce298]&lt;br&gt;
+[[MediaWiki_talk:be4aaa62|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Select a newer version for comparison
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:be4aaa62</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5124db4d&amp;action=edit 80ffa0cb]&lt;br&gt;
+[[MediaWiki_talk:5124db4d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Select an older version for comparison
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5124db4d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3c0a747&amp;action=edit 5ec1b504]&lt;br&gt;
+[[MediaWiki_talk:a3c0a747|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Only read-only queries are allowed.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a3c0a747</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e93eec9e&amp;action=edit 06cf46b3]&lt;br&gt;
+[[MediaWiki_talk:e93eec9e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Pages with Self Links
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e93eec9e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f993dd01&amp;action=edit e7caf074]&lt;br&gt;
+[[MediaWiki_talk:f993dd01|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following pages contain a link to themselves, which they should not.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f993dd01</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fa56e16c&amp;action=edit 249c203d]&lt;br&gt;
+[[MediaWiki_talk:fa56e16c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There were serious xhtml markup errors detected by tidy.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fa56e16c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5123f28d&amp;action=edit 8fcf47da]&lt;br&gt;
+[[MediaWiki_talk:5123f28d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Server time is now
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5123f28d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4075f71a&amp;action=edit 79d35179]&lt;br&gt;
+[[MediaWiki_talk:4075f71a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;User rights for &amp;quot;$1&amp;quot; could not be set. (Did you enter the name correctly?)&amp;lt;/b&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4075f71a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13187ffc&amp;action=edit f2cd2a2a]&lt;br&gt;
+[[MediaWiki_talk:13187ffc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Set user rights
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:13187ffc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56640761&amp;action=edit c5bfd68a]&lt;br&gt;
+[[MediaWiki_talk:56640761|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Set bureaucrat flag
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:56640761</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d3f883b&amp;action=edit fff9c94a]&lt;br&gt;
+[[MediaWiki_talk:0d3f883b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Short pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0d3f883b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d97d1ee3&amp;action=edit 9fb29051]&lt;br&gt;
+[[MediaWiki_talk:d97d1ee3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+show
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d97d1ee3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1a75ecf&amp;action=edit 4fe654c7]&lt;br&gt;
+[[MediaWiki_talk:f1a75ecf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 minor edits &amp;#124; $2 bots &amp;#124; $3 logged in users
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f1a75ecf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:72fad336&amp;action=edit 9569cf23]&lt;br&gt;
+[[MediaWiki_talk:72fad336|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Showing below &amp;lt;b&amp;gt;$1&amp;lt;/b&amp;gt; results starting with #&amp;lt;b&amp;gt;$2&amp;lt;/b&amp;gt;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:72fad336</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6db37657&amp;action=edit f7535b52]&lt;br&gt;
+[[MediaWiki_talk:6db37657|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Showing below &amp;lt;b&amp;gt;$3&amp;lt;/b&amp;gt; results starting with #&amp;lt;b&amp;gt;$2&amp;lt;/b&amp;gt;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6db37657</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:acbdf814&amp;action=edit 43158759]&lt;br&gt;
+[[MediaWiki_talk:acbdf814|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show last $1 images sorted $2.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:acbdf814</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:915318a0&amp;action=edit ac2b4c32]&lt;br&gt;
+[[MediaWiki_talk:915318a0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show preview
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:915318a0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cfff5a5a&amp;action=edit 6eeee3cb]&lt;br&gt;
+[[MediaWiki_talk:cfff5a5a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+show
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cfff5a5a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac617b53&amp;action=edit 1144c9d9]&lt;br&gt;
+[[MediaWiki_talk:ac617b53|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your signature with timestamp
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ac617b53</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6baa6ad&amp;action=edit 7f5726ac]&lt;br&gt;
+[[MediaWiki_talk:f6baa6ad|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Site statistics
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f6baa6ad</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e150b0f4&amp;action=edit 8e86f95d]&lt;br&gt;
+[[MediaWiki_talk:e150b0f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There are &amp;#39;&amp;#39;&amp;#39;$1&amp;#39;&amp;#39;&amp;#39; total pages in the database.
+This includes &amp;quot;talk&amp;quot; pages, pages about Wiktionary, minimal &amp;quot;stub&amp;quot;
+pages, redirects, and others that probably don&amp;#39;t qualify as content pages.
+Excluding those, there are &amp;#39;&amp;#39;&amp;#39;$2&amp;#39;&amp;#39;&amp;#39; pages that are probably legitimate
+content pages.
+
+There have been a total of &amp;#39;&amp;#39;&amp;#39;$3&amp;#39;&amp;#39;&amp;#39; page views, and &amp;#39;&amp;#39;&amp;#39;$4&amp;#39;&amp;#39;&amp;#39; page edits
+since the wiki was setup.
+That comes to &amp;#39;&amp;#39;&amp;#39;$5&amp;#39;&amp;#39;&amp;#39; average edits per page, and &amp;#39;&amp;#39;&amp;#39;$6&amp;#39;&amp;#39;&amp;#39; views per edit.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e150b0f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:daaf7240&amp;action=edit 8dca090f]&lt;br&gt;
+[[MediaWiki_talk:daaf7240|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The Free Encyclopedia
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:daaf7240</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b434c6d&amp;action=edit 32b42c53]&lt;br&gt;
+[[MediaWiki_talk:3b434c6d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Donations
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3b434c6d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d75649ef&amp;action=edit d88e8164]&lt;br&gt;
+[[MediaWiki_talk:d75649ef|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d75649ef</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb06d8a3&amp;action=edit b64ec710]&lt;br&gt;
+[[MediaWiki_talk:cb06d8a3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary user $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cb06d8a3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d25d37c8&amp;action=edit 4f548531]&lt;br&gt;
+[[MediaWiki_talk:d25d37c8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary user(s) $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d25d37c8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f57bd61&amp;action=edit d0cb2acd]&lt;br&gt;
+[[MediaWiki_talk:8f57bd61|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Skin
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8f57bd61</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d3a6dd4e&amp;action=edit bcd196f9]&lt;br&gt;
+[[MediaWiki_talk:d3a6dd4e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The page you wanted to save was blocked by the spam filter. This is probably caused by a link to an external site.
+
+You might want to check the following regular expression for patterns that are currently blocked:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d3a6dd4e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:add33980&amp;action=edit 60a90929]&lt;br&gt;
+[[MediaWiki_talk:add33980|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Spam protection filter
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:add33980</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:984c6817&amp;action=edit 25255195]&lt;br&gt;
+[[MediaWiki_talk:984c6817|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Special Page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:984c6817</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b67d51d8&amp;action=edit 62bc32dc]&lt;br&gt;
+[[MediaWiki_talk:b67d51d8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Special pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b67d51d8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c9709132&amp;action=edit 73ac2b41]&lt;br&gt;
+[[MediaWiki_talk:c9709132|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Special pages for all users
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c9709132</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:87ac14f6&amp;action=edit ed31e1e1]&lt;br&gt;
+[[MediaWiki_talk:87ac14f6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Please note that all queries are logged.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:87ac14f6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:00c261e1&amp;action=edit 26cb51a1]&lt;br&gt;
+[[MediaWiki_talk:00c261e1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Enter query
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:00c261e1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2086b21f&amp;action=edit 3d18b2ea]&lt;br&gt;
+[[MediaWiki_talk:2086b21f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Statistics
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2086b21f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8cd0c85e&amp;action=edit 1b9e838c]&lt;br&gt;
+[[MediaWiki_talk:8cd0c85e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Stored version
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8cd0c85e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2eb6d4bd&amp;action=edit a5125d69]&lt;br&gt;
+[[MediaWiki_talk:2eb6d4bd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Threshold for stub display
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2eb6d4bd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f3da206c&amp;action=edit ef062b0e]&lt;br&gt;
+[[MediaWiki_talk:f3da206c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Subcategories
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f3da206c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d183dbd&amp;action=edit 335ce16b]&lt;br&gt;
+[[MediaWiki_talk:8d183dbd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Subject/headline
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8d183dbd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ca29f2df&amp;action=edit d7084ef8]&lt;br&gt;
+[[MediaWiki_talk:ca29f2df|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View subject
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ca29f2df</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:17bc3900&amp;action=edit 3dfd0f51]&lt;br&gt;
+[[MediaWiki_talk:17bc3900|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Successful upload
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:17bc3900</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:12b71c3e&amp;action=edit 05535ecf]&lt;br&gt;
+[[MediaWiki_talk:12b71c3e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Summary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:12b71c3e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ee858d9a&amp;action=edit fde4e0f4]&lt;br&gt;
+[[MediaWiki_talk:ee858d9a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+For sysop use only
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ee858d9a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f758a39&amp;action=edit 85232d4f]&lt;br&gt;
+[[MediaWiki_talk:2f758a39|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The action you have requested can only be
+performed by users with &amp;quot;sysop&amp;quot; status.
+See $1.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2f758a39</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:91b8467b&amp;action=edit 3265b18d]&lt;br&gt;
+[[MediaWiki_talk:91b8467b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Sysop access required
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:91b8467b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77b9c5ad&amp;action=edit 109e51e1]&lt;br&gt;
+[[MediaWiki_talk:77b9c5ad|Talk]]
+&lt;/td&gt;&lt;td&gt;
+table
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:77b9c5ad</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4e6a710d&amp;action=edit e55e91b2]&lt;br&gt;
+[[MediaWiki_talk:4e6a710d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Discussion
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4e6a710d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c11ac522&amp;action=edit 1ed6d2b4]&lt;br&gt;
+[[MediaWiki_talk:c11ac522|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The page itself was moved successfully, but the
+talk page could not be moved because one already exists at the new
+title. Please merge them manually.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c11ac522</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6a38ff98&amp;action=edit 3c940bbf]&lt;br&gt;
+[[MediaWiki_talk:6a38ff98|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Discuss this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6a38ff98</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2b630ea0&amp;action=edit f053e191]&lt;br&gt;
+[[MediaWiki_talk:2b630ea0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The corresponding talk page was also moved.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2b630ea0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2282b1ca&amp;action=edit f3b6a64f]&lt;br&gt;
+[[MediaWiki_talk:2282b1ca|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The corresponding talk page was &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; moved.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2282b1ca</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:45e3f76d&amp;action=edit 6534acb5]&lt;br&gt;
+[[MediaWiki_talk:45e3f76d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;!-- MediaWiki:talkpagetext --&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:45e3f76d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:607359f2&amp;action=edit 5788df25]&lt;br&gt;
+[[MediaWiki_talk:607359f2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Textbox dimensions
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:607359f2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:66571fbc&amp;action=edit 7d66aa0e]&lt;br&gt;
+[[MediaWiki_talk:66571fbc|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Page text matches
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:66571fbc</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1f36741&amp;action=edit 83f663ed]&lt;br&gt;
+[[MediaWiki_talk:e1f36741|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View or restore $1?
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e1f36741</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a29f027b&amp;action=edit a299730b]&lt;br&gt;
+[[MediaWiki_talk:a29f027b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Enlarge
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a29f027b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9ced4850&amp;action=edit 36ee6f56]&lt;br&gt;
+[[MediaWiki_talk:9ced4850|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Time zone
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9ced4850</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ca45a968&amp;action=edit 9dba4eb8]&lt;br&gt;
+[[MediaWiki_talk:ca45a968|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Offset
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ca45a968</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:60bc3c41&amp;action=edit 3f58a2a9]&lt;br&gt;
+[[MediaWiki_talk:60bc3c41|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Enter number of hours your local time differs
+from server time (UTC).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:60bc3c41</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2618febd&amp;action=edit e3f5384c]&lt;br&gt;
+[[MediaWiki_talk:2618febd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Article title matches
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2618febd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8684fcf&amp;action=edit 2a609230]&lt;br&gt;
+[[MediaWiki_talk:b8684fcf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Table of contents
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b8684fcf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:692107c0&amp;action=edit d75ba923]&lt;br&gt;
+[[MediaWiki_talk:692107c0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Toolbox
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:692107c0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9116941&amp;action=edit 04ced041]&lt;br&gt;
+[[MediaWiki_talk:b9116941|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Add a comment to this page. &amp;#91;alt-+]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b9116941</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b583d36c&amp;action=edit b987f993]&lt;br&gt;
+[[MediaWiki_talk:b583d36c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Discussion about edits from this ip address &amp;#91;alt-n]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b583d36c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9efcbe2f&amp;action=edit e3522c89]&lt;br&gt;
+[[MediaWiki_talk:9efcbe2f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The user page for the ip you&amp;#39;re editing as &amp;#91;alt-.]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9efcbe2f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a4b9eea&amp;action=edit f3025f7a]&lt;br&gt;
+[[MediaWiki_talk:2a4b9eea|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View the content page &amp;#91;alt-a]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a4b9eea</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dcd3ca0c&amp;action=edit e420bf33]&lt;br&gt;
+[[MediaWiki_talk:dcd3ca0c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Atom feed for this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dcd3ca0c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d318992a&amp;action=edit d2ae036e]&lt;br&gt;
+[[MediaWiki_talk:d318992a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+See the differences between the two selected versions of this page. &amp;#91;alt-v]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d318992a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:17165e38&amp;action=edit 2039dc44]&lt;br&gt;
+[[MediaWiki_talk:17165e38|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View the list of contributions of this user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:17165e38</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:32bcbdd6&amp;action=edit d57ba9d6]&lt;br&gt;
+[[MediaWiki_talk:32bcbdd6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Find background information on current events
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:32bcbdd6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1488dbf&amp;action=edit 742e0c2a]&lt;br&gt;
+[[MediaWiki_talk:b1488dbf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Delete this page &amp;#91;alt-d]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b1488dbf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c519c79&amp;action=edit 6b354128]&lt;br&gt;
+[[MediaWiki_talk:8c519c79|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You can edit this page. Please use the preview button before saving. &amp;#91;alt-e]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8c519c79</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d61f42ac&amp;action=edit 6a333373]&lt;br&gt;
+[[MediaWiki_talk:d61f42ac|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Send a mail to this user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d61f42ac</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:691c7c4c&amp;action=edit 1f2e0a5e]&lt;br&gt;
+[[MediaWiki_talk:691c7c4c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The place to find out.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:691c7c4c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:da5d5f0e&amp;action=edit 357e85a5]&lt;br&gt;
+[[MediaWiki_talk:da5d5f0e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Past versions of this page, &amp;#91;alt-h]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:da5d5f0e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e20e86bb&amp;action=edit ff6db008]&lt;br&gt;
+[[MediaWiki_talk:e20e86bb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are encouraged to log in, it is not mandatory however. &amp;#91;alt-o]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e20e86bb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ab189540&amp;action=edit bd25c34c]&lt;br&gt;
+[[MediaWiki_talk:ab189540|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Log out &amp;#91;alt-o]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ab189540</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d2a8168&amp;action=edit 9dd4b86c]&lt;br&gt;
+[[MediaWiki_talk:8d2a8168|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Visit the Main Page &amp;#91;alt-z]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8d2a8168</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7316f250&amp;action=edit 2138d388]&lt;br&gt;
+[[MediaWiki_talk:7316f250|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Mark this as a minor edit &amp;#91;alt-i]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7316f250</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bfe45253&amp;action=edit 00ef7343]&lt;br&gt;
+[[MediaWiki_talk:bfe45253|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Move this page &amp;#91;alt-m]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bfe45253</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2b4d858&amp;action=edit 0bafecde]&lt;br&gt;
+[[MediaWiki_talk:c2b4d858|Talk]]
+&lt;/td&gt;&lt;td&gt;
+List of my contributions &amp;#91;alt-y]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c2b4d858</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22361e38&amp;action=edit ef887076]&lt;br&gt;
+[[MediaWiki_talk:22361e38|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My talk page &amp;#91;alt-n]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:22361e38</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b34e28e3&amp;action=edit 6d66eb21]&lt;br&gt;
+[[MediaWiki_talk:b34e28e3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You don&amp;#39;t have the permissions to move this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b34e28e3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc2cdd3b&amp;action=edit 7e77da11]&lt;br&gt;
+[[MediaWiki_talk:dc2cdd3b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+About the project, what you can do, where to find things
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:dc2cdd3b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2032ad70&amp;action=edit 5611ec73]&lt;br&gt;
+[[MediaWiki_talk:2032ad70|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My preferences
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2032ad70</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d87a6e27&amp;action=edit 71b5f228]&lt;br&gt;
+[[MediaWiki_talk:d87a6e27|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Preview your changes, please use this before saving! &amp;#91;alt-p]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d87a6e27</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:44edd577&amp;action=edit fa1fc302]&lt;br&gt;
+[[MediaWiki_talk:44edd577|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Protect this page &amp;#91;alt-=]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:44edd577</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:aa67a70a&amp;action=edit f2eedbde]&lt;br&gt;
+[[MediaWiki_talk:aa67a70a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Load a random page &amp;#91;alt-x]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:aa67a70a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a5de539f&amp;action=edit cafd58f7]&lt;br&gt;
+[[MediaWiki_talk:a5de539f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The list of recent changes in the wiki. &amp;#91;alt-r]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a5de539f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47cd8236&amp;action=edit ccab4d0f]&lt;br&gt;
+[[MediaWiki_talk:47cd8236|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Recent changes in pages linking to this page &amp;#91;alt-c]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:47cd8236</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:82964371&amp;action=edit 53235bed]&lt;br&gt;
+[[MediaWiki_talk:82964371|Talk]]
+&lt;/td&gt;&lt;td&gt;
+RSS feed for this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:82964371</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec76631f&amp;action=edit 8ce4a9b9]&lt;br&gt;
+[[MediaWiki_talk:ec76631f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Save your changes &amp;#91;alt-s]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ec76631f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6d206f30&amp;action=edit a6413695]&lt;br&gt;
+[[MediaWiki_talk:6d206f30|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Search this wiki &amp;#91;alt-f]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6d206f30</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:65256208&amp;action=edit c2dafa2a]&lt;br&gt;
+[[MediaWiki_talk:65256208|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Support Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:65256208</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:280cc8fd&amp;action=edit 73f9a677]&lt;br&gt;
+[[MediaWiki_talk:280cc8fd|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This is a special page, you can&amp;#39;t edit the page itself.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:280cc8fd</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7c7223be&amp;action=edit 764993b1]&lt;br&gt;
+[[MediaWiki_talk:7c7223be|Talk]]
+&lt;/td&gt;&lt;td&gt;
+List of all special pages &amp;#91;alt-q]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7c7223be</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:06fb1d8e&amp;action=edit cb23801a]&lt;br&gt;
+[[MediaWiki_talk:06fb1d8e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Discussion about the content page &amp;#91;alt-t]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:06fb1d8e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:341a8a32&amp;action=edit df81e982]&lt;br&gt;
+[[MediaWiki_talk:341a8a32|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Restore the $1 edits done to this page before it was deleted &amp;#91;alt-d]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:341a8a32</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:377e895f&amp;action=edit 53f18c52]&lt;br&gt;
+[[MediaWiki_talk:377e895f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Remove this page from your watchlist &amp;#91;alt-w]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:377e895f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1d4103e&amp;action=edit 6143ca0f]&lt;br&gt;
+[[MediaWiki_talk:b1d4103e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload images or media files &amp;#91;alt-u]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b1d4103e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d8cae2f&amp;action=edit 2b3a6ed0]&lt;br&gt;
+[[MediaWiki_talk:3d8cae2f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My user page &amp;#91;alt-.]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3d8cae2f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:141dd88c&amp;action=edit 1ef2ea9d]&lt;br&gt;
+[[MediaWiki_talk:141dd88c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page is protected. You can view its source. &amp;#91;alt-e]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:141dd88c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:68a73399&amp;action=edit 07e7b59d]&lt;br&gt;
+[[MediaWiki_talk:68a73399|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Add this page to your watchlist &amp;#91;alt-w]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:68a73399</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56a787ff&amp;action=edit e24666fc]&lt;br&gt;
+[[MediaWiki_talk:56a787ff|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The list of pages you&amp;#39;re monitoring for changes. &amp;#91;alt-l]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:56a787ff</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3fd46bc1&amp;action=edit fbd416b7]&lt;br&gt;
+[[MediaWiki_talk:3fd46bc1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+List of all wiki pages that link here &amp;#91;alt-b]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3fd46bc1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47514ec5&amp;action=edit c48d8241]&lt;br&gt;
+[[MediaWiki_talk:47514ec5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View the last $1 changes; view the last $2 days.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:47514ec5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6442d081&amp;action=edit 0d69ac51]&lt;br&gt;
+[[MediaWiki_talk:6442d081|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below are this user&amp;#39;s last &amp;lt;b&amp;gt;$1&amp;lt;/b&amp;gt; changes in the last &amp;lt;b&amp;gt;$2&amp;lt;/b&amp;gt; days.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6442d081</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:507d407a&amp;action=edit f9bb6366]&lt;br&gt;
+[[MediaWiki_talk:507d407a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+ (top)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:507d407a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c29ba33&amp;action=edit 2b4842fd]&lt;br&gt;
+[[MediaWiki_talk:8c29ba33|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unblock user
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8c29ba33</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3a879bdb&amp;action=edit 98f7f719]&lt;br&gt;
+[[MediaWiki_talk:3a879bdb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Use the form below to restore write access
+to a previously blocked IP address or username.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3a879bdb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e954d285&amp;action=edit 24e7c6e7]&lt;br&gt;
+[[MediaWiki_talk:e954d285|Talk]]
+&lt;/td&gt;&lt;td&gt;
+unblock
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e954d285</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e55820a&amp;action=edit eecac2a2]&lt;br&gt;
+[[MediaWiki_talk:5e55820a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+unblocked &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5e55820a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9b2a9354&amp;action=edit f690005f]&lt;br&gt;
+[[MediaWiki_talk:9b2a9354|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Restore deleted page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9b2a9354</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:85cdbe83&amp;action=edit d4adea3f]&lt;br&gt;
+[[MediaWiki_talk:85cdbe83|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Undelete $1 edits
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:85cdbe83</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9ba522b6&amp;action=edit c4635e76]&lt;br&gt;
+[[MediaWiki_talk:9ba522b6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Restore deleted page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9ba522b6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3346239e&amp;action=edit 5dd4b2af]&lt;br&gt;
+[[MediaWiki_talk:3346239e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Restore!
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3346239e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2a7eb23&amp;action=edit cf1590b6]&lt;br&gt;
+[[MediaWiki_talk:c2a7eb23|Talk]]
+&lt;/td&gt;&lt;td&gt;
+restored &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c2a7eb23</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40f0db7a&amp;action=edit 5e55bc75]&lt;br&gt;
+[[MediaWiki_talk:40f0db7a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;#91;&amp;#91;$1]] has been successfully restored.
+See &amp;#91;&amp;#91;Wiktionary:Deletion_log]] for a record of recent deletions and restorations.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:40f0db7a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feaa86c6&amp;action=edit a69aad99]&lt;br&gt;
+[[MediaWiki_talk:feaa86c6|Talk]]
+&lt;/td&gt;&lt;td&gt;
+If you restore the page, all revisions will be restored to the history.
+If a new page with the same name has been created since the deletion, the restored
+revisions will appear in the prior history, and the current revision of the live page
+will not be automatically replaced.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:feaa86c6</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9fa6521f&amp;action=edit d650f0a7]&lt;br&gt;
+[[MediaWiki_talk:9fa6521f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View and restore deleted pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9fa6521f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e99f66e&amp;action=edit 19b68d7f]&lt;br&gt;
+[[MediaWiki_talk:2e99f66e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The following pages have been deleted but are still in the archive and
+can be restored. The archive may be periodically cleaned out.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2e99f66e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b097a89b&amp;action=edit 2a3672ef]&lt;br&gt;
+[[MediaWiki_talk:b097a89b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Deleted revision as of $1
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b097a89b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eb2694a4&amp;action=edit d0cd3f87]&lt;br&gt;
+[[MediaWiki_talk:eb2694a4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+$1 revisions archived
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:eb2694a4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b67a8c9&amp;action=edit fd2a2764]&lt;br&gt;
+[[MediaWiki_talk:3b67a8c9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unexpected value: &amp;quot;$1&amp;quot;=&amp;quot;$2&amp;quot;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3b67a8c9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:016b68d2&amp;action=edit 74a8f293]&lt;br&gt;
+[[MediaWiki_talk:016b68d2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unlock database
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:016b68d2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fc3080bf&amp;action=edit ded00b4f]&lt;br&gt;
+[[MediaWiki_talk:fc3080bf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Yes, I really want to unlock the database.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fc3080bf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4df98d29&amp;action=edit 68a2c7e3]&lt;br&gt;
+[[MediaWiki_talk:4df98d29|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unlock database
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:4df98d29</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86605aa9&amp;action=edit eb575aa1]&lt;br&gt;
+[[MediaWiki_talk:86605aa9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Database lock removed
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:86605aa9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1896db20&amp;action=edit a7a78572]&lt;br&gt;
+[[MediaWiki_talk:1896db20|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The database has been unlocked.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1896db20</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd3decce&amp;action=edit 6b32a82f]&lt;br&gt;
+[[MediaWiki_talk:bd3decce|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unlocking the database will restore the ability of all
+users to edit pages, change their preferences, edit their watchlists, and
+other things requiring changes in the database.
+Please confirm that this is what you intend to do.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bd3decce</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d180e0d9&amp;action=edit 116b2a3b]&lt;br&gt;
+[[MediaWiki_talk:d180e0d9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unprotect
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d180e0d9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:affff3c2&amp;action=edit a4439c30]&lt;br&gt;
+[[MediaWiki_talk:affff3c2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Reason for unprotecting
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:affff3c2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8d58125&amp;action=edit 66029ebc]&lt;br&gt;
+[[MediaWiki_talk:b8d58125|Talk]]
+&lt;/td&gt;&lt;td&gt;
+unprotected &amp;#91;&amp;#91;$1]]
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b8d58125</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b15ab8cb&amp;action=edit c77cef4c]&lt;br&gt;
+[[MediaWiki_talk:b15ab8cb|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Unprotecting &amp;quot;$1&amp;quot;)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b15ab8cb</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:10782968&amp;action=edit caa31f1e]&lt;br&gt;
+[[MediaWiki_talk:10782968|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unprotect this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:10782968</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5ed67176&amp;action=edit e17373a9]&lt;br&gt;
+[[MediaWiki_talk:5ed67176|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unused images
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:5ed67176</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:373709c4&amp;action=edit 13626cea]&lt;br&gt;
+[[MediaWiki_talk:373709c4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;p&amp;gt;Please note that other web sites may link to an image with
+a direct URL, and so may still be listed here despite being
+in active use.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:373709c4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51055a00&amp;action=edit f6f282e9]&lt;br&gt;
+[[MediaWiki_talk:51055a00|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Unwatch
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:51055a00</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e21d3614&amp;action=edit c7d1cd1e]&lt;br&gt;
+[[MediaWiki_talk:e21d3614|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Stop watching
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e21d3614</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2f8570d&amp;action=edit 13a1891a]&lt;br&gt;
+[[MediaWiki_talk:f2f8570d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(Updated)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f2f8570d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8bdf057f&amp;action=edit bb73aaaf]&lt;br&gt;
+[[MediaWiki_talk:8bdf057f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload file
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8bdf057f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0238951b&amp;action=edit 6be1c689]&lt;br&gt;
+[[MediaWiki_talk:0238951b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload file
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0238951b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:88f59c5a&amp;action=edit 693f4b51]&lt;br&gt;
+[[MediaWiki_talk:88f59c5a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Sorry, uploading is disabled.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:88f59c5a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7b8969f2&amp;action=edit 7d4f03ff]&lt;br&gt;
+[[MediaWiki_talk:7b8969f2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Uploaded files
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7b8969f2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:954c2a11&amp;action=edit e57056a0]&lt;br&gt;
+[[MediaWiki_talk:954c2a11|Talk]]
+&lt;/td&gt;&lt;td&gt;
+uploaded &amp;quot;$1&amp;quot;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:954c2a11</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:304f9593&amp;action=edit 8f1603bd]&lt;br&gt;
+[[MediaWiki_talk:304f9593|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload error
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:304f9593</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e71a62c&amp;action=edit 40d977b5]&lt;br&gt;
+[[MediaWiki_talk:9e71a62c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload images, sounds, documents etc.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9e71a62c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:955e39f9&amp;action=edit 0bf93eec]&lt;br&gt;
+[[MediaWiki_talk:955e39f9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload images
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:955e39f9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d39c428&amp;action=edit 0d49abe6]&lt;br&gt;
+[[MediaWiki_talk:0d39c428|Talk]]
+&lt;/td&gt;&lt;td&gt;
+upload log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0d39c428</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1f68a0e7&amp;action=edit 87611d30]&lt;br&gt;
+[[MediaWiki_talk:1f68a0e7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload_log
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1f68a0e7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a430331&amp;action=edit 8aa7bf47]&lt;br&gt;
+[[MediaWiki_talk:2a430331|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below is a list of the most recent file uploads.
+All times shown are server time (UTC).
+&amp;lt;ul&amp;gt;
+&amp;lt;/ul&amp;gt;
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2a430331</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:92dd3bc9&amp;action=edit d2d8bd08]&lt;br&gt;
+[[MediaWiki_talk:92dd3bc9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not logged in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:92dd3bc9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fecdb77e&amp;action=edit 09b01f51]&lt;br&gt;
+[[MediaWiki_talk:fecdb77e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must be &amp;lt;a href=&amp;quot;/wiki/Special:Userlogin&amp;quot;&amp;gt;logged in&amp;lt;/a&amp;gt;
+to upload files.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fecdb77e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7804cb84&amp;action=edit 85bb3caa]&lt;br&gt;
+[[MediaWiki_talk:7804cb84|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;strong&amp;gt;STOP!&amp;lt;/strong&amp;gt; Before you upload here,
+make sure to read and follow the &amp;lt;a href=&amp;quot;/wiki/Special:Image_use_policy&amp;quot;&amp;gt;image use policy&amp;lt;/a&amp;gt;.
+&amp;lt;p&amp;gt;If a file with the name you are specifying already
+exists on the wiki, it&amp;#39;ll be replaced without warning.
+So unless you mean to update a file, it&amp;#39;s a good idea
+to first check if such a file exists.
+&amp;lt;p&amp;gt;To view or search previously uploaded images,
+go to the &amp;lt;a href=&amp;quot;/wiki/Special:Imagelist&amp;quot;&amp;gt;list of uploaded images&amp;lt;/a&amp;gt;.
+Uploads and deletions are logged on the &amp;lt;a href=&amp;quot;/wiki/Wiktionary:Upload_log&amp;quot;&amp;gt;upload log&amp;lt;/a&amp;gt;.
+&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Use the form below to upload new image files for use in
+illustrating your pages.
+On most browsers, you will see a &amp;quot;Browse...&amp;quot; button, which will
+bring up your operating system&amp;#39;s standard file open dialog.
+Choosing a file will fill the name of that file into the text
+field next to the button.
+You must also check the box affirming that you are not
+violating any copyrights by uploading the file.
+Press the &amp;quot;Upload&amp;quot; button to finish the upload.
+This may take some time if you have a slow internet connection.
+&amp;lt;p&amp;gt;The preferred formats are JPEG for photographic images, PNG
+for drawings and other iconic images, and OGG for sounds.
+Please name your files descriptively to avoid confusion.
+To include the image in a page, use a link in the form
+&amp;lt;b&amp;gt;&amp;#91;&amp;#91;Image:file.jpg]]&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;&amp;#91;&amp;#91;Image:file.png&amp;#124;alt text]]&amp;lt;/b&amp;gt;
+or &amp;lt;b&amp;gt;&amp;#91;&amp;#91;Media:file.ogg]]&amp;lt;/b&amp;gt; for sounds.
+&amp;lt;p&amp;gt;Please note that as with wiki pages, others may edit or
+delete your uploads if they think it serves the project, and
+you may be blocked from uploading if you abuse the system.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7804cb84</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb3ef2ae&amp;action=edit 8aae8210]&lt;br&gt;
+[[MediaWiki_talk:fb3ef2ae|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Upload warning
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fb3ef2ae</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a5430c9b&amp;action=edit 6a080eb0]&lt;br&gt;
+[[MediaWiki_talk:a5430c9b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;b&amp;gt;User rights for &amp;quot;$1&amp;quot; updated&amp;lt;/b&amp;gt;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a5430c9b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:89b73748&amp;action=edit 8b23a826]&lt;br&gt;
+[[MediaWiki_talk:89b73748|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;#39;&amp;#39;&amp;#39;Note:&amp;#39;&amp;#39;&amp;#39; After saving, you have to tell your bowser to get the new version: &amp;#39;&amp;#39;&amp;#39;Mozilla:&amp;#39;&amp;#39;&amp;#39; click &amp;#39;&amp;#39;reload&amp;#39;&amp;#39;(or &amp;#39;&amp;#39;ctrl-r&amp;#39;&amp;#39;), &amp;#39;&amp;#39;&amp;#39;IE / Opera:&amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;ctrl-f5&amp;#39;&amp;#39;, &amp;#39;&amp;#39;&amp;#39;Safari:&amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;cmd-r&amp;#39;&amp;#39;, &amp;#39;&amp;#39;&amp;#39;Konqueror&amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;ctrl-r&amp;#39;&amp;#39;.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:89b73748</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1656c92b&amp;action=edit 97bd6e75]&lt;br&gt;
+[[MediaWiki_talk:1656c92b|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;strong&amp;gt;Tip:&amp;lt;/strong&amp;gt; Use the &amp;#39;Show preview&amp;#39; button to test your new css/js before saving.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1656c92b</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9f62117d&amp;action=edit b51c3667]&lt;br&gt;
+[[MediaWiki_talk:9f62117d|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;#39;&amp;#39;&amp;#39;Remember that you are only previewing your user css, it has not yet been saved!&amp;#39;&amp;#39;&amp;#39;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:9f62117d</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77541367&amp;action=edit a49220af]&lt;br&gt;
+[[MediaWiki_talk:77541367|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The user name you entered is already in use. Please choose a different name.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:77541367</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eca4b211&amp;action=edit 2e8efec0]&lt;br&gt;
+[[MediaWiki_talk:eca4b211|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;#39;&amp;#39;&amp;#39;Remember that you are only testing/previewing your user javascript, it has not yet been saved!&amp;#39;&amp;#39;&amp;#39;
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:eca4b211</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49c670f4&amp;action=edit eb0f23d8]&lt;br&gt;
+[[MediaWiki_talk:49c670f4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Log in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:49c670f4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb3467d9&amp;action=edit 271a962f]&lt;br&gt;
+[[MediaWiki_talk:fb3467d9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Log out
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:fb3467d9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1881ca2&amp;action=edit 0e3f35e1]&lt;br&gt;
+[[MediaWiki_talk:e1881ca2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Mail object returned error:
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e1881ca2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:823fdaf7&amp;action=edit ea81d010]&lt;br&gt;
+[[MediaWiki_talk:823fdaf7|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View user page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:823fdaf7</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f25ef873&amp;action=edit 2ab9a2af]&lt;br&gt;
+[[MediaWiki_talk:f25ef873|Talk]]
+&lt;/td&gt;&lt;td&gt;
+User statistics
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f25ef873</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b704c939&amp;action=edit 903f135d]&lt;br&gt;
+[[MediaWiki_talk:b704c939|Talk]]
+&lt;/td&gt;&lt;td&gt;
+There are &amp;#39;&amp;#39;&amp;#39;$1&amp;#39;&amp;#39;&amp;#39; registered users.
+&amp;#39;&amp;#39;&amp;#39;$2&amp;#39;&amp;#39;&amp;#39; of these are administrators (see $3).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b704c939</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2da600bf&amp;action=edit c692273d]&lt;br&gt;
+[[MediaWiki_talk:2da600bf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Version
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2da600bf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd20ed80&amp;action=edit 9204f6f2]&lt;br&gt;
+[[MediaWiki_talk:cd20ed80|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This page has been accessed $1 times.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cd20ed80</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b3a212e8&amp;action=edit 023f0549]&lt;br&gt;
+[[MediaWiki_talk:b3a212e8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View ($1) ($2) ($3).
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:b3a212e8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1affdb1e&amp;action=edit db9e2eba]&lt;br&gt;
+[[MediaWiki_talk:1affdb1e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View source
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:1affdb1e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6336004&amp;action=edit 2e250bd9]&lt;br&gt;
+[[MediaWiki_talk:f6336004|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View discussion
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f6336004</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7da05431&amp;action=edit 4d2466a3]&lt;br&gt;
+[[MediaWiki_talk:7da05431|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wanted pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7da05431</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d91ebf58&amp;action=edit 292b0901]&lt;br&gt;
+[[MediaWiki_talk:d91ebf58|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Watch
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d91ebf58</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d815e414&amp;action=edit ddfeb02c]&lt;br&gt;
+[[MediaWiki_talk:d815e414|Talk]]
+&lt;/td&gt;&lt;td&gt;
+($1 pages watched not counting talk pages;
+$2 total pages edited since cutoff;
+$3...
+&amp;lt;a href=&amp;#39;$4&amp;#39;&amp;gt;show and edit complete list&amp;lt;/a&amp;gt;.)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d815e414</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:780e4559&amp;action=edit d7d3bb79]&lt;br&gt;
+[[MediaWiki_talk:780e4559|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Here&amp;#39;s an alphabetical list of your
+watched pages. Check the boxes of pages you want to remove
+from your watchlist and click the &amp;#39;remove checked&amp;#39; button
+at the bottom of the screen.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:780e4559</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:48a616d9&amp;action=edit db14f0be]&lt;br&gt;
+[[MediaWiki_talk:48a616d9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+My watchlist
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:48a616d9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:690e08f8&amp;action=edit 37074879]&lt;br&gt;
+[[MediaWiki_talk:690e08f8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your watchlist contains $1 pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:690e08f8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:913a8eb4&amp;action=edit 1d490f51]&lt;br&gt;
+[[MediaWiki_talk:913a8eb4|Talk]]
+&lt;/td&gt;&lt;td&gt;
+(for user &amp;quot;$1&amp;quot;)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:913a8eb4</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:983ce9b1&amp;action=edit b5396cea]&lt;br&gt;
+[[MediaWiki_talk:983ce9b1|Talk]]
+&lt;/td&gt;&lt;td&gt;
+checking watched pages for recent edits
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:983ce9b1</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e5e56e2&amp;action=edit c69b87d2]&lt;br&gt;
+[[MediaWiki_talk:2e5e56e2|Talk]]
+&lt;/td&gt;&lt;td&gt;
+checking recent edits for watched pages
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2e5e56e2</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cdd40087&amp;action=edit 24353550]&lt;br&gt;
+[[MediaWiki_talk:cdd40087|Talk]]
+&lt;/td&gt;&lt;td&gt;
+None of your watched items were edited in the time period displayed.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:cdd40087</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec51da09&amp;action=edit c873a8c3]&lt;br&gt;
+[[MediaWiki_talk:ec51da09|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Not logged in
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:ec51da09</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7870af11&amp;action=edit 080c4da9]&lt;br&gt;
+[[MediaWiki_talk:7870af11|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You must be &amp;lt;a href=&amp;quot;/wiki/Special:Userlogin&amp;quot;&amp;gt;logged in&amp;lt;/a&amp;gt;
+to modify your watchlist.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7870af11</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2fa65d73&amp;action=edit 89758668]&lt;br&gt;
+[[MediaWiki_talk:2fa65d73|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Watch this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2fa65d73</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:79260dc8&amp;action=edit d94c2857]&lt;br&gt;
+[[MediaWiki_talk:79260dc8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Watch this page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:79260dc8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:622a355f&amp;action=edit 5b3750aa]&lt;br&gt;
+[[MediaWiki_talk:622a355f|Talk]]
+&lt;/td&gt;&lt;td&gt;
+&amp;lt;h2&amp;gt;Welcome, $1!&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;Your account has been created.
+Don&amp;#39;t forget to change your Wiktionary preferences.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:622a355f</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bde1fbba&amp;action=edit 28d0e2a8]&lt;br&gt;
+[[MediaWiki_talk:bde1fbba|Talk]]
+&lt;/td&gt;&lt;td&gt;
+What links here
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:bde1fbba</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53f0999a&amp;action=edit b3775e04]&lt;br&gt;
+[[MediaWiki_talk:53f0999a|Talk]]
+&lt;/td&gt;&lt;td&gt;
+To be allowed to create accounts in this Wiki you have to &amp;#91;&amp;#91;Special:Userlogin&amp;#124;log]] in and have the appropriate permissions.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:53f0999a</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:901574b0&amp;action=edit 13f7d937]&lt;br&gt;
+[[MediaWiki_talk:901574b0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You are not allowed to create an account
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:901574b0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28589651&amp;action=edit 8d93b543]&lt;br&gt;
+[[MediaWiki_talk:28589651|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have to &amp;#91;&amp;#91;Special:Userlogin&amp;#124;login]] to edit pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:28589651</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d4e0db33&amp;action=edit 76713eb6]&lt;br&gt;
+[[MediaWiki_talk:d4e0db33|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Login required to edit
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d4e0db33</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7046be67&amp;action=edit 3c46b4af]&lt;br&gt;
+[[MediaWiki_talk:7046be67|Talk]]
+&lt;/td&gt;&lt;td&gt;
+You have to &amp;#91;&amp;#91;Special:Userlogin&amp;#124;login]] to read pages.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:7046be67</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56f7b6c8&amp;action=edit 27809c2a]&lt;br&gt;
+[[MediaWiki_talk:56f7b6c8|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Login required to read
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:56f7b6c8</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8815fbb3&amp;action=edit 80a9ff8d]&lt;br&gt;
+[[MediaWiki_talk:8815fbb3|Talk]]
+&lt;/td&gt;&lt;td&gt;
+View project page
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:8815fbb3</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d00a5142&amp;action=edit 937cdab5]&lt;br&gt;
+[[MediaWiki_talk:d00a5142|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Wiktionary
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:d00a5142</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a7ee1c5c&amp;action=edit b6ea8219]&lt;br&gt;
+[[MediaWiki_talk:a7ee1c5c|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Below are the last $1 changes in the last &amp;lt;b&amp;gt;$2&amp;lt;/b&amp;gt; hours.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a7ee1c5c</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:deb21c59&amp;action=edit 843af08d]&lt;br&gt;
+[[MediaWiki_talk:deb21c59|Talk]]
+&lt;/td&gt;&lt;td&gt;
+This is a saved version of your watchlist.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:deb21c59</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e77517fa&amp;action=edit 89821357]&lt;br&gt;
+[[MediaWiki_talk:e77517fa|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Show last $1 hours $2 days $3
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:e77517fa</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a9b62164&amp;action=edit d526a8a6]&lt;br&gt;
+[[MediaWiki_talk:a9b62164|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Incorrect parameters to wfQuery()&amp;lt;br /&amp;gt;
+Function: $1&amp;lt;br /&amp;gt;
+Query: $2
+
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:a9b62164</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3314dacf&amp;action=edit d8ecf7db]&lt;br&gt;
+[[MediaWiki_talk:3314dacf|Talk]]
+&lt;/td&gt;&lt;td&gt;
+The password you entered is incorrect. Please try again.
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:3314dacf</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e0414f0&amp;action=edit 4fe151ac]&lt;br&gt;
+[[MediaWiki_talk:2e0414f0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Differences
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:2e0414f0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0f5ab9c9&amp;action=edit 0a98c2ad]&lt;br&gt;
+[[MediaWiki_talk:0f5ab9c9|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your email*
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:0f5ab9c9</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f495043e&amp;action=edit 32d0e33a]&lt;br&gt;
+[[MediaWiki_talk:f495043e|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your user name
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f495043e</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6aa78968&amp;action=edit f8b28bd9]&lt;br&gt;
+[[MediaWiki_talk:6aa78968|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your nickname (for signatures)
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:6aa78968</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13a44203&amp;action=edit b48cf014]&lt;br&gt;
+[[MediaWiki_talk:13a44203|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:13a44203</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c0ad7f05&amp;action=edit e14a732b]&lt;br&gt;
+[[MediaWiki_talk:c0ad7f05|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Retype password
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:c0ad7f05</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:519f30b5&amp;action=edit 7fc3e5b1]&lt;br&gt;
+[[MediaWiki_talk:519f30b5|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your real name*
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:519f30b5</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f98650e0&amp;action=edit 5b5af4ea]&lt;br&gt;
+[[MediaWiki_talk:f98650e0|Talk]]
+&lt;/td&gt;&lt;td&gt;
+Your text
+&lt;/td&gt;&lt;td&gt;
+<template lineStart="1"><title>int:f98650e0</title></template>
+&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
+
+</root> \ No newline at end of file
diff --git a/www/wiki/tests/parser/preprocess/All_system_messages.txt b/www/wiki/tests/parser/preprocess/All_system_messages.txt
new file mode 100644
index 00000000..3212ae10
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/All_system_messages.txt
@@ -0,0 +1,5603 @@
+{{int:57dbe26a}}
+
+<table border=1 width=100%><tr><td>
+'''Name'''
+</td><td>
+'''Default text'''
+</td><td>
+'''Current text'''
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f9cca05b&action=edit f9cca05b]<br>
+[[MediaWiki_talk:f9cca05b|Talk]]
+</td><td>
+$1 moved to $2
+</td><td>
+{{int:f9cca05b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ed065216&action=edit ed065216]<br>
+[[MediaWiki_talk:ed065216|Talk]]
+</td><td>
+/* edit this file to customize the monobook skin for the entire site */
+</td><td>
+{{int:ed065216}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b21fb79&action=edit 5780daf6]<br>
+[[MediaWiki_talk:6b21fb79|Talk]]
+</td><td>
+About
+</td><td>
+{{int:6b21fb79}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54f19e13&action=edit 4bd9b804]<br>
+[[MediaWiki_talk:54f19e13|Talk]]
+</td><td>
+Wiktionary:About
+</td><td>
+{{int:54f19e13}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e17cc1b&action=edit 7be96c69]<br>
+[[MediaWiki_talk:8e17cc1b|Talk]]
+</td><td>
+About Wiktionary
+</td><td>
+{{int:8e17cc1b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4b7f0428&action=edit 69f5ae1e]<br>
+[[MediaWiki_talk:4b7f0428|Talk]]
+</td><td>
++
+</td><td>
+{{int:4b7f0428}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b18a7fba&action=edit ba8c9426]<br>
+[[MediaWiki_talk:b18a7fba|Talk]]
+</td><td>
+n
+</td><td>
+{{int:b18a7fba}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3cfd08b4&action=edit 098256f5]<br>
+[[MediaWiki_talk:3cfd08b4|Talk]]
+</td><td>
+.
+</td><td>
+{{int:3cfd08b4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d00706c5&action=edit 7638fc38]<br>
+[[MediaWiki_talk:d00706c5|Talk]]
+</td><td>
+a
+</td><td>
+{{int:d00706c5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7bbcdfc9&action=edit 840afed8]<br>
+[[MediaWiki_talk:7bbcdfc9|Talk]]
+</td><td>
+v
+</td><td>
+{{int:7bbcdfc9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0750ed4b&action=edit 9703e6d9]<br>
+[[MediaWiki_talk:0750ed4b|Talk]]
+</td><td>
+&amp;lt;accesskey-contributions&amp;gt;
+</td><td>
+{{int:0750ed4b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:602dda6f&action=edit 7e13f963]<br>
+[[MediaWiki_talk:602dda6f|Talk]]
+</td><td>
+&amp;lt;accesskey-currentevents&amp;gt;
+</td><td>
+{{int:602dda6f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a395260e&action=edit be42f966]<br>
+[[MediaWiki_talk:a395260e|Talk]]
+</td><td>
+d
+</td><td>
+{{int:a395260e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f89faca3&action=edit 89888a71]<br>
+[[MediaWiki_talk:f89faca3|Talk]]
+</td><td>
+e
+</td><td>
+{{int:f89faca3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc7a3e78&action=edit 7b2ee991]<br>
+[[MediaWiki_talk:bc7a3e78|Talk]]
+</td><td>
+&amp;lt;accesskey-emailuser&amp;gt;
+</td><td>
+{{int:bc7a3e78}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e9d3613&action=edit fe788279]<br>
+[[MediaWiki_talk:9e9d3613|Talk]]
+</td><td>
+&amp;lt;accesskey-help&amp;gt;
+</td><td>
+{{int:9e9d3613}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7ea0e322&action=edit 4bb7a2e4]<br>
+[[MediaWiki_talk:7ea0e322|Talk]]
+</td><td>
+h
+</td><td>
+{{int:7ea0e322}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4204d3db&action=edit 725cb6bf]<br>
+[[MediaWiki_talk:4204d3db|Talk]]
+</td><td>
+o
+</td><td>
+{{int:4204d3db}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a92e37a&action=edit a1de2049]<br>
+[[MediaWiki_talk:2a92e37a|Talk]]
+</td><td>
+o
+</td><td>
+{{int:2a92e37a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:68d388ec&action=edit 0542623d]<br>
+[[MediaWiki_talk:68d388ec|Talk]]
+</td><td>
+z
+</td><td>
+{{int:68d388ec}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18fe1121&action=edit e3f25b72]<br>
+[[MediaWiki_talk:18fe1121|Talk]]
+</td><td>
+i
+</td><td>
+{{int:18fe1121}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6d15983f&action=edit c9d212d3]<br>
+[[MediaWiki_talk:6d15983f|Talk]]
+</td><td>
+m
+</td><td>
+{{int:6d15983f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ecaba7f4&action=edit ac57178f]<br>
+[[MediaWiki_talk:ecaba7f4|Talk]]
+</td><td>
+y
+</td><td>
+{{int:ecaba7f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:711aec5d&action=edit 6d3ae9a7]<br>
+[[MediaWiki_talk:711aec5d|Talk]]
+</td><td>
+n
+</td><td>
+{{int:711aec5d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9905f56f&action=edit 0a376cab]<br>
+[[MediaWiki_talk:9905f56f|Talk]]
+</td><td>
+&amp;lt;accesskey-portal&amp;gt;
+</td><td>
+{{int:9905f56f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9305eef3&action=edit e72912be]<br>
+[[MediaWiki_talk:9305eef3|Talk]]
+</td><td>
+&amp;lt;accesskey-preferences&amp;gt;
+</td><td>
+{{int:9305eef3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:186ee8a4&action=edit cef51de6]<br>
+[[MediaWiki_talk:186ee8a4|Talk]]
+</td><td>
+p
+</td><td>
+{{int:186ee8a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:676f28e9&action=edit 0f10afb5]<br>
+[[MediaWiki_talk:676f28e9|Talk]]
+</td><td>
+=
+</td><td>
+{{int:676f28e9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1a09f43e&action=edit 46a4e82c]<br>
+[[MediaWiki_talk:1a09f43e|Talk]]
+</td><td>
+x
+</td><td>
+{{int:1a09f43e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1306607d&action=edit 025b667f]<br>
+[[MediaWiki_talk:1306607d|Talk]]
+</td><td>
+r
+</td><td>
+{{int:1306607d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e14390c4&action=edit 600e8a44]<br>
+[[MediaWiki_talk:e14390c4|Talk]]
+</td><td>
+c
+</td><td>
+{{int:e14390c4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:59b75a10&action=edit 0fde75cd]<br>
+[[MediaWiki_talk:59b75a10|Talk]]
+</td><td>
+s
+</td><td>
+{{int:59b75a10}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0b6fd89e&action=edit 5163ba5b]<br>
+[[MediaWiki_talk:0b6fd89e|Talk]]
+</td><td>
+f
+</td><td>
+{{int:0b6fd89e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba9e0fc4&action=edit f70dbcff]<br>
+[[MediaWiki_talk:ba9e0fc4|Talk]]
+</td><td>
+&amp;lt;accesskey-sitesupport&amp;gt;
+</td><td>
+{{int:ba9e0fc4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b932fee9&action=edit 8949be8d]<br>
+[[MediaWiki_talk:b932fee9|Talk]]
+</td><td>
+&amp;lt;accesskey-specialpage&amp;gt;
+</td><td>
+{{int:b932fee9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1ac10275&action=edit 59a5e487]<br>
+[[MediaWiki_talk:1ac10275|Talk]]
+</td><td>
+q
+</td><td>
+{{int:1ac10275}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:116fd1b0&action=edit a83f2193]<br>
+[[MediaWiki_talk:116fd1b0|Talk]]
+</td><td>
+t
+</td><td>
+{{int:116fd1b0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec06f1a7&action=edit 5894e42e]<br>
+[[MediaWiki_talk:ec06f1a7|Talk]]
+</td><td>
+d
+</td><td>
+{{int:ec06f1a7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f99a8c2&action=edit 2a2a9d13]<br>
+[[MediaWiki_talk:7f99a8c2|Talk]]
+</td><td>
+w
+</td><td>
+{{int:7f99a8c2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:903549e8&action=edit 3a1dcde8]<br>
+[[MediaWiki_talk:903549e8|Talk]]
+</td><td>
+u
+</td><td>
+{{int:903549e8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f696cc0&action=edit be76a8c2]<br>
+[[MediaWiki_talk:8f696cc0|Talk]]
+</td><td>
+.
+</td><td>
+{{int:8f696cc0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:613ebbad&action=edit e467bdec]<br>
+[[MediaWiki_talk:613ebbad|Talk]]
+</td><td>
+e
+</td><td>
+{{int:613ebbad}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f598b5d6&action=edit 8bbdd8ad]<br>
+[[MediaWiki_talk:f598b5d6|Talk]]
+</td><td>
+w
+</td><td>
+{{int:f598b5d6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:59863979&action=edit f8563593]<br>
+[[MediaWiki_talk:59863979|Talk]]
+</td><td>
+l
+</td><td>
+{{int:59863979}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:00143391&action=edit 016415ff]<br>
+[[MediaWiki_talk:00143391|Talk]]
+</td><td>
+b
+</td><td>
+{{int:00143391}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d4dce921&action=edit c90b0565]<br>
+[[MediaWiki_talk:d4dce921|Talk]]
+</td><td>
+The Password for &#39;$1&#39; has been sent to $2.
+</td><td>
+{{int:d4dce921}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e6cd678&action=edit 05cb31f3]<br>
+[[MediaWiki_talk:9e6cd678|Talk]]
+</td><td>
+Password sent.
+</td><td>
+{{int:9e6cd678}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:37186ec6&action=edit 6703566b]<br>
+[[MediaWiki_talk:37186ec6|Talk]]
+</td><td>
+Action complete
+</td><td>
+{{int:37186ec6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2bacba53&action=edit 9a954e94]<br>
+[[MediaWiki_talk:2bacba53|Talk]]
+</td><td>
+Added to watchlist
+</td><td>
+{{int:2bacba53}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b28893b8&action=edit cb101aa3]<br>
+[[MediaWiki_talk:b28893b8|Talk]]
+</td><td>
+The page &quot;$1&quot; has been added to your &#91;&#91;Special:Watchlist&#124;watchlist]].
+Future changes to this page and its associated Talk page will be listed there,
+and the page will appear &#39;&#39;&#39;bolded&#39;&#39;&#39; in the &#91;&#91;Special:Recentchanges&#124;list of recent changes]] to
+make it easier to pick out.
+
+&lt;p&gt;If you want to remove the page from your watchlist later, click &quot;Stop watching&quot; in the sidebar.
+</td><td>
+{{int:b28893b8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:291bfe3c&action=edit 788205f7]<br>
+[[MediaWiki_talk:291bfe3c|Talk]]
+</td><td>
++
+</td><td>
+{{int:291bfe3c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d4d418a&action=edit 69189a95]<br>
+[[MediaWiki_talk:0d4d418a|Talk]]
+</td><td>
+Wiktionary:Administrators
+</td><td>
+{{int:0d4d418a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1b4ceeda&action=edit f61e4837]<br>
+[[MediaWiki_talk:1b4ceeda|Talk]]
+</td><td>
+I affirm that the copyright holder of this file
+agrees to license it under the terms of the $1.
+</td><td>
+{{int:1b4ceeda}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6a720856&action=edit d87c4480]<br>
+[[MediaWiki_talk:6a720856|Talk]]
+</td><td>
+all
+</td><td>
+{{int:6a720856}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2fab435&action=edit a6623c77]<br>
+[[MediaWiki_talk:f2fab435|Talk]]
+</td><td>
+All system messages
+</td><td>
+{{int:f2fab435}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e57c77b8&action=edit 57dbe26a]<br>
+[[MediaWiki_talk:e57c77b8|Talk]]
+</td><td>
+This is a list of all system messages available in the MediaWiki: namespace.
+</td><td>
+{{int:e57c77b8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ff8db74d&action=edit bf1dccf6]<br>
+[[MediaWiki_talk:ff8db74d|Talk]]
+</td><td>
+All pages
+</td><td>
+{{int:ff8db74d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:89c23e53&action=edit 1ee05de8]<br>
+[[MediaWiki_talk:89c23e53|Talk]]
+</td><td>
+$1 to $2
+</td><td>
+{{int:89c23e53}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8550125b&action=edit 0dc174ae]<br>
+[[MediaWiki_talk:8550125b|Talk]]
+</td><td>
+&lt;font color=red&gt;&lt;b&gt;User $1, you are already logged in!&lt;/b&gt;&lt;/font&gt;&lt;br /&gt;
+
+</td><td>
+{{int:8550125b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3f7be8a8&action=edit 3f1bd6a1]<br>
+[[MediaWiki_talk:3f7be8a8|Talk]]
+</td><td>
+Cannot rollback last edit of &#91;&#91;$1]]
+by &#91;&#91;User:$2&#124;$2]] (&#91;&#91;User talk:$2&#124;Talk]]); someone else has edited or rolled back the page already.
+
+Last edit was by &#91;&#91;User:$3&#124;$3]] (&#91;&#91;User talk:$3&#124;Talk]]).
+</td><td>
+{{int:3f7be8a8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49a4df39&action=edit 4f70712f]<br>
+[[MediaWiki_talk:49a4df39|Talk]]
+</td><td>
+Oldest pages
+</td><td>
+{{int:49a4df39}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a01e33f4&action=edit cffa50a3]<br>
+[[MediaWiki_talk:a01e33f4|Talk]]
+</td><td>
+and
+</td><td>
+{{int:a01e33f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:20cb482e&action=edit 801db13e]<br>
+[[MediaWiki_talk:20cb482e|Talk]]
+</td><td>
+Talk for this IP
+</td><td>
+{{int:20cb482e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5bbc19f4&action=edit 07575f81]<br>
+[[MediaWiki_talk:5bbc19f4|Talk]]
+</td><td>
+----&#39;&#39;This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical &#91;&#91;IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please &#91;&#91;Special:Userlogin&#124;create an account or log in]] to avoid future confusion with other anonymous users.&#39;&#39;
+</td><td>
+{{int:5bbc19f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9bed5104&action=edit 0a92fab3]<br>
+[[MediaWiki_talk:9bed5104|Talk]]
+</td><td>
+Anonymous user(s) of Wiktionary
+</td><td>
+{{int:9bed5104}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4360c2dc&action=edit 565cecd7]<br>
+[[MediaWiki_talk:4360c2dc|Talk]]
+</td><td>
+Content page
+</td><td>
+{{int:4360c2dc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d3ee4a57&action=edit ac8af25b]<br>
+[[MediaWiki_talk:d3ee4a57|Talk]]
+</td><td>
+A page of that name already exists, or the
+name you have chosen is not valid.
+Please choose another name.
+</td><td>
+{{int:d3ee4a57}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:494f1af2&action=edit 01d643b6]<br>
+[[MediaWiki_talk:494f1af2|Talk]]
+</td><td>
+View content page
+</td><td>
+{{int:494f1af2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc93382e&action=edit 4e529571]<br>
+[[MediaWiki_talk:dc93382e|Talk]]
+</td><td>
+SQL query
+</td><td>
+{{int:dc93382e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d12f6023&action=edit 47551563]<br>
+[[MediaWiki_talk:d12f6023|Talk]]
+</td><td>
+Use the form below to make a direct query of the
+database.
+Use single quotes (&#39;like this&#39;) to delimit string literals.
+This can often add considerable load to the server, so please use
+this function sparingly.
+</td><td>
+{{int:d12f6023}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f36efd21&action=edit d8f0b5e0]<br>
+[[MediaWiki_talk:f36efd21|Talk]]
+</td><td>
+Autoblocked because you share an IP address with &quot;$1&quot;. Reason &quot;$2&quot;.
+</td><td>
+{{int:f36efd21}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9503e2b1&action=edit 100ce8a2]<br>
+[[MediaWiki_talk:9503e2b1|Talk]]
+</td><td>
+This action cannot be performed on this page.
+</td><td>
+{{int:9503e2b1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f146770f&action=edit 5c50b102]<br>
+[[MediaWiki_talk:f146770f|Talk]]
+</td><td>
+Image name has been changed to &quot;$1&quot;.
+</td><td>
+{{int:f146770f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a87ee981&action=edit fe89c3de]<br>
+[[MediaWiki_talk:a87ee981|Talk]]
+</td><td>
+&quot;.$1&quot; is not a recommended image file format.
+</td><td>
+{{int:a87ee981}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0222775a&action=edit c7623eeb]<br>
+[[MediaWiki_talk:0222775a|Talk]]
+</td><td>
+Invalid IP address
+</td><td>
+{{int:0222775a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feabd786&action=edit 798bc46a]<br>
+[[MediaWiki_talk:feabd786|Talk]]
+</td><td>
+Badly formed search query
+</td><td>
+{{int:feabd786}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e82f04b&action=edit e5493056]<br>
+[[MediaWiki_talk:7e82f04b|Talk]]
+</td><td>
+We could not process your query.
+This is probably because you have attempted to search for a
+word fewer than three letters long, which is not yet supported.
+It could also be that you have mistyped the expression, for
+example &quot;fish and and scales&quot;.
+Please try another query.
+</td><td>
+{{int:7e82f04b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:36ad01d4&action=edit c36e32c1]<br>
+[[MediaWiki_talk:36ad01d4|Talk]]
+</td><td>
+The passwords you entered do not match.
+</td><td>
+{{int:36ad01d4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ab570b90&action=edit 5c0f9f2b]<br>
+[[MediaWiki_talk:ab570b90|Talk]]
+</td><td>
+Bad title
+</td><td>
+{{int:ab570b90}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:73766845&action=edit e9ac7510]<br>
+[[MediaWiki_talk:73766845|Talk]]
+</td><td>
+The requested page title was invalid, empty, or
+an incorrectly linked inter-language or inter-wiki title.
+</td><td>
+{{int:73766845}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ef0a17b1&action=edit ec00742f]<br>
+[[MediaWiki_talk:ef0a17b1|Talk]]
+</td><td>
+(Main)
+</td><td>
+{{int:ef0a17b1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2fe89b37&action=edit 0756a2f3]<br>
+[[MediaWiki_talk:2fe89b37|Talk]]
+</td><td>
+Your user name or IP address has been blocked by $1.
+The reason given is this:&lt;br /&gt;&#39;&#39;$2&#39;&#39;&lt;p&gt;You may contact $1 or one of the other
+&#91;&#91;Wiktionary:Administrators&#124;administrators]] to discuss the block.
+
+Note that you may not use the &quot;email this user&quot; feature unless you have a valid email address registered in your &#91;&#91;Special:Preferences&#124;user preferences]].
+
+Your IP address is $3. Please include this address in any queries you make.
+
+</td><td>
+{{int:2fe89b37}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4153985a&action=edit ee09eebe]<br>
+[[MediaWiki_talk:4153985a|Talk]]
+</td><td>
+User is blocked
+</td><td>
+{{int:4153985a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8225753&action=edit 387c304e]<br>
+[[MediaWiki_talk:f8225753|Talk]]
+</td><td>
+Block user
+</td><td>
+{{int:f8225753}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:178b4021&action=edit d19404ef]<br>
+[[MediaWiki_talk:178b4021|Talk]]
+</td><td>
+Block succeeded
+</td><td>
+{{int:178b4021}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c9aa5295&action=edit 8c464806]<br>
+[[MediaWiki_talk:c9aa5295|Talk]]
+</td><td>
+&quot;$1&quot; has been blocked.
+&lt;br /&gt;See &#91;&#91;Special:Ipblocklist&#124;IP block list]] to review blocks.
+</td><td>
+{{int:c9aa5295}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d79d9fe6&action=edit ec372bf2]<br>
+[[MediaWiki_talk:d79d9fe6|Talk]]
+</td><td>
+Use the form below to block write access
+from a specific IP address or username.
+This should be done only only to prevent vandalism, and in
+accordance with &#91;&#91;Wiktionary:Policy&#124;policy]].
+Fill in a specific reason below (for example, citing particular
+pages that were vandalized).
+</td><td>
+{{int:d79d9fe6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9a96cfdc&action=edit 1c6c7aa2]<br>
+[[MediaWiki_talk:9a96cfdc|Talk]]
+</td><td>
+block
+</td><td>
+{{int:9a96cfdc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b81f5cad&action=edit b821b758]<br>
+[[MediaWiki_talk:b81f5cad|Talk]]
+</td><td>
+$1, $2 blocked $3 (expires $4)
+</td><td>
+{{int:b81f5cad}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0871a19a&action=edit 9be87d66]<br>
+[[MediaWiki_talk:0871a19a|Talk]]
+</td><td>
+blocked &quot;$1&quot; with an expiry time of $2
+</td><td>
+{{int:0871a19a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31534d45&action=edit 4bcce96c]<br>
+[[MediaWiki_talk:31534d45|Talk]]
+</td><td>
+Block_log
+</td><td>
+{{int:31534d45}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f4872c71&action=edit b9902a3c]<br>
+[[MediaWiki_talk:f4872c71|Talk]]
+</td><td>
+This is a log of user blocking and unblocking actions. Automatically
+blocked IP addresses are not be listed. See the &#91;&#91;Special:Ipblocklist&#124;IP block list]] for
+the list of currently operational bans and blocks.
+</td><td>
+{{int:f4872c71}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d8ae34f5&action=edit e9a0daa2]<br>
+[[MediaWiki_talk:d8ae34f5|Talk]]
+</td><td>
+Bold text
+</td><td>
+{{int:d8ae34f5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58086558&action=edit 02320399]<br>
+[[MediaWiki_talk:58086558|Talk]]
+</td><td>
+Bold text
+</td><td>
+{{int:58086558}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d546a7c&action=edit 9bd576b3]<br>
+[[MediaWiki_talk:1d546a7c|Talk]]
+</td><td>
+Book sources
+</td><td>
+{{int:1d546a7c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:809e6557&action=edit 72f7a5ba]<br>
+[[MediaWiki_talk:809e6557|Talk]]
+</td><td>
+Below is a list of links to other sites that
+sell new and used books, and may also have further information
+about books you are looking for.Wiktionary is not affiliated with any of these businesses, and
+this list should not be construed as an endorsement.
+</td><td>
+{{int:809e6557}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40925079&action=edit fe673f57]<br>
+[[MediaWiki_talk:40925079|Talk]]
+</td><td>
+Broken Redirects
+</td><td>
+{{int:40925079}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3953d564&action=edit 283e89cc]<br>
+[[MediaWiki_talk:3953d564|Talk]]
+</td><td>
+The following redirects link to a non-existing pages.
+</td><td>
+{{int:3953d564}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f12ee4ee&action=edit 741bd9a7]<br>
+[[MediaWiki_talk:f12ee4ee|Talk]]
+</td><td>
+Bug reports
+</td><td>
+{{int:f12ee4ee}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1e9054cf&action=edit 7cc56699]<br>
+[[MediaWiki_talk:1e9054cf|Talk]]
+</td><td>
+Wiktionary:Bug_reports
+</td><td>
+{{int:1e9054cf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cfea7660&action=edit eaac0dcf]<br>
+[[MediaWiki_talk:cfea7660|Talk]]
+</td><td>
+Bureaucrat_log
+</td><td>
+{{int:cfea7660}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:04cf1ba3&action=edit cc1544ab]<br>
+[[MediaWiki_talk:04cf1ba3|Talk]]
+</td><td>
+Rights for user &quot;$1&quot; set &quot;$2&quot;
+</td><td>
+{{int:04cf1ba3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a0750047&action=edit 5eb1e911]<br>
+[[MediaWiki_talk:a0750047|Talk]]
+</td><td>
+The action you have requested can only be
+performed by sysops with &quot;bureaucrat&quot; status.
+</td><td>
+{{int:a0750047}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4837977b&action=edit f523b504]<br>
+[[MediaWiki_talk:4837977b|Talk]]
+</td><td>
+Bureaucrat access required
+</td><td>
+{{int:4837977b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:590988e2&action=edit f06de085]<br>
+[[MediaWiki_talk:590988e2|Talk]]
+</td><td>
+by date
+</td><td>
+{{int:590988e2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c08c3f0d&action=edit e51a8413]<br>
+[[MediaWiki_talk:c08c3f0d|Talk]]
+</td><td>
+by name
+</td><td>
+{{int:c08c3f0d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ede279e9&action=edit 43ba766a]<br>
+[[MediaWiki_talk:ede279e9|Talk]]
+</td><td>
+by size
+</td><td>
+{{int:ede279e9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1ad9b35&action=edit 075fc8df]<br>
+[[MediaWiki_talk:e1ad9b35|Talk]]
+</td><td>
+The following is a cached copy of the requested page, and may not be up to date.
+</td><td>
+{{int:e1ad9b35}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77dfd213&action=edit 4fd0653c]<br>
+[[MediaWiki_talk:77dfd213|Talk]]
+</td><td>
+Cancel
+</td><td>
+{{int:77dfd213}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:03442eec&action=edit ee57c22e]<br>
+[[MediaWiki_talk:03442eec|Talk]]
+</td><td>
+Could not delete the page or image specified. (It may have already been deleted by someone else.)
+</td><td>
+{{int:03442eec}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:27b55ed3&action=edit 4b739ac2]<br>
+[[MediaWiki_talk:27b55ed3|Talk]]
+</td><td>
+Cannot revert edit; last contributor is only author of this page.
+</td><td>
+{{int:27b55ed3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6ccb6007&action=edit 50b9e781]<br>
+[[MediaWiki_talk:6ccb6007|Talk]]
+</td><td>
+Categories
+</td><td>
+{{int:6ccb6007}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3c686e7&action=edit 5ccbf9c9]<br>
+[[MediaWiki_talk:a3c686e7|Talk]]
+</td><td>
+category
+</td><td>
+{{int:a3c686e7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2ff5f46&action=edit 7245f61e]<br>
+[[MediaWiki_talk:f2ff5f46|Talk]]
+</td><td>
+Articles in category &quot;$1&quot;
+</td><td>
+{{int:f2ff5f46}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cc60b2e2&action=edit 3dfd4581]<br>
+[[MediaWiki_talk:cc60b2e2|Talk]]
+</td><td>
+Change password
+</td><td>
+{{int:cc60b2e2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8aa57de6&action=edit 49a04ba4]<br>
+[[MediaWiki_talk:8aa57de6|Talk]]
+</td><td>
+changes
+</td><td>
+{{int:8aa57de6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf723c59&action=edit 4f1b1dbe]<br>
+[[MediaWiki_talk:cf723c59|Talk]]
+</td><td>
+Columns
+</td><td>
+{{int:cf723c59}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a4f8ff8&action=edit 99be507a]<br>
+[[MediaWiki_talk:2a4f8ff8|Talk]]
+</td><td>
+ (comment)
+</td><td>
+{{int:2a4f8ff8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9833df65&action=edit 978cce5f]<br>
+[[MediaWiki_talk:9833df65|Talk]]
+</td><td>
+Compare selected versions
+</td><td>
+{{int:9833df65}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:04a21221&action=edit d0c4047c]<br>
+[[MediaWiki_talk:04a21221|Talk]]
+</td><td>
+Confirm
+</td><td>
+{{int:04a21221}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8e469fe&action=edit bb4bf8de]<br>
+[[MediaWiki_talk:b8e469fe|Talk]]
+</td><td>
+Yes, I really want to delete this.
+</td><td>
+{{int:b8e469fe}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7773ad82&action=edit 16805d57]<br>
+[[MediaWiki_talk:7773ad82|Talk]]
+</td><td>
+Confirm delete
+</td><td>
+{{int:7773ad82}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:87358bf0&action=edit 872e01c0]<br>
+[[MediaWiki_talk:87358bf0|Talk]]
+</td><td>
+You are about to permanently delete a page
+or image along with all of its history from the database.
+Please confirm that you intend to do this, that you understand the
+consequences, and that you are doing this in accordance with
+&#91;&#91;Wiktionary:Policy]].
+</td><td>
+{{int:87358bf0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b46f1463&action=edit 96a48c11]<br>
+[[MediaWiki_talk:b46f1463|Talk]]
+</td><td>
+Confirm protection
+</td><td>
+{{int:b46f1463}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e382b883&action=edit e76ab37d]<br>
+[[MediaWiki_talk:e382b883|Talk]]
+</td><td>
+Do you really want to protect this page?
+</td><td>
+{{int:e382b883}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:33be1711&action=edit 306661e6]<br>
+[[MediaWiki_talk:33be1711|Talk]]
+</td><td>
+Confirm unprotection
+</td><td>
+{{int:33be1711}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2d82e05f&action=edit 4df1abe3]<br>
+[[MediaWiki_talk:2d82e05f|Talk]]
+</td><td>
+Do you really want to unprotect this page?
+</td><td>
+{{int:2d82e05f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f051e88&action=edit 0858695c]<br>
+[[MediaWiki_talk:7f051e88|Talk]]
+</td><td>
+Characters of context per line
+</td><td>
+{{int:7f051e88}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7127b581&action=edit e9d81e50]<br>
+[[MediaWiki_talk:7127b581|Talk]]
+</td><td>
+Lines to show per hit
+</td><td>
+{{int:7127b581}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9850ceab&action=edit df5b918c]<br>
+[[MediaWiki_talk:9850ceab|Talk]]
+</td><td>
+contribs
+</td><td>
+{{int:9850ceab}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b688a4d7&action=edit ab48ec14]<br>
+[[MediaWiki_talk:b688a4d7|Talk]]
+</td><td>
+For $1
+</td><td>
+{{int:b688a4d7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:aa11023f&action=edit 9d5b6e5e]<br>
+[[MediaWiki_talk:aa11023f|Talk]]
+</td><td>
+User contributions
+</td><td>
+{{int:aa11023f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a420abf6&action=edit 521307dd]<br>
+[[MediaWiki_talk:a420abf6|Talk]]
+</td><td>
+Content is available under $1.
+</td><td>
+{{int:a420abf6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fc8c1b42&action=edit 5327fdcf]<br>
+[[MediaWiki_talk:fc8c1b42|Talk]]
+</td><td>
+Wiktionary:Copyrights
+</td><td>
+{{int:fc8c1b42}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52a98e51&action=edit f6652583]<br>
+[[MediaWiki_talk:52a98e51|Talk]]
+</td><td>
+Wiktionary copyright
+</td><td>
+{{int:52a98e51}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:25a1afd7&action=edit 731cc8a6]<br>
+[[MediaWiki_talk:25a1afd7|Talk]]
+</td><td>
+Please note that all contributions to Wiktionary are
+considered to be released under the GNU Free Documentation License
+(see $1 for details).
+If you don&#39;t want your writing to be edited mercilessly and redistributed
+at will, then don&#39;t submit it here.&lt;br /&gt;
+You are also promising us that you wrote this yourself, or copied it from a
+public domain or similar free resource.
+&lt;strong&gt;DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!&lt;/strong&gt;
+</td><td>
+{{int:25a1afd7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:465ca4b8&action=edit e04b3a96]<br>
+[[MediaWiki_talk:465ca4b8|Talk]]
+</td><td>
+Couldn&#39;t remove item &#39;$1&#39;...
+</td><td>
+{{int:465ca4b8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3724dfa6&action=edit 19fd5658]<br>
+[[MediaWiki_talk:3724dfa6|Talk]]
+</td><td>
+Create new account
+</td><td>
+{{int:3724dfa6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a4a1f0cb&action=edit b10d6306]<br>
+[[MediaWiki_talk:a4a1f0cb|Talk]]
+</td><td>
+by email
+</td><td>
+{{int:a4a1f0cb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:07f81f3c&action=edit dce81611]<br>
+[[MediaWiki_talk:07f81f3c|Talk]]
+</td><td>
+cur
+</td><td>
+{{int:07f81f3c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:42b921f8&action=edit 81c8f458]<br>
+[[MediaWiki_talk:42b921f8|Talk]]
+</td><td>
+Current events
+</td><td>
+{{int:42b921f8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78892831&action=edit 23418566]<br>
+[[MediaWiki_talk:78892831|Talk]]
+</td><td>
+Current revision
+</td><td>
+{{int:78892831}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e4838ed0&action=edit 66409316]<br>
+[[MediaWiki_talk:e4838ed0|Talk]]
+</td><td>
+Database error
+</td><td>
+{{int:e4838ed0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:507be676&action=edit 3b538bdf]<br>
+[[MediaWiki_talk:507be676|Talk]]
+</td><td>
+Date format
+</td><td>
+{{int:507be676}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0bfa85bb&action=edit 34c01d3c]<br>
+[[MediaWiki_talk:0bfa85bb|Talk]]
+</td><td>
+A database query syntax error has occurred.
+This could be because of an illegal search query (see $5),
+or it may indicate a bug in the software.
+The last attempted database query was:
+&lt;blockquote&gt;&lt;tt&gt;$1&lt;/tt&gt;&lt;/blockquote&gt;
+from within function &quot;&lt;tt&gt;$2&lt;/tt&gt;&quot;.
+MySQL returned error &quot;&lt;tt&gt;$3: $4&lt;/tt&gt;&quot;.
+</td><td>
+{{int:0bfa85bb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:39d82941&action=edit f6e1bcbd]<br>
+[[MediaWiki_talk:39d82941|Talk]]
+</td><td>
+A database query syntax error has occurred.
+The last attempted database query was:
+&quot;$1&quot;
+from within function &quot;$2&quot;.
+MySQL returned error &quot;$3: $4&quot;.
+
+</td><td>
+{{int:39d82941}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ae14da43&action=edit d4234aad]<br>
+[[MediaWiki_talk:ae14da43|Talk]]
+</td><td>
+Dead-end pages
+</td><td>
+{{int:ae14da43}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd604d99&action=edit 32faaeca]<br>
+[[MediaWiki_talk:bd604d99|Talk]]
+</td><td>
+Debug
+</td><td>
+{{int:bd604d99}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f349a89&action=edit f674a4a1]<br>
+[[MediaWiki_talk:6f349a89|Talk]]
+</td><td>
+Search in these namespaces by default:
+</td><td>
+{{int:6f349a89}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:801b725b&action=edit 93c2c32b]<br>
+[[MediaWiki_talk:801b725b|Talk]]
+</td><td>
+Wiktionary e-mail
+</td><td>
+{{int:801b725b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6fdbe48&action=edit 9485989f]<br>
+[[MediaWiki_talk:f6fdbe48|Talk]]
+</td><td>
+Delete
+</td><td>
+{{int:f6fdbe48}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:728e102f&action=edit 070ad01c]<br>
+[[MediaWiki_talk:728e102f|Talk]]
+</td><td>
+Reason for deletion
+</td><td>
+{{int:728e102f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:784f094b&action=edit abb03e0b]<br>
+[[MediaWiki_talk:784f094b|Talk]]
+</td><td>
+deleted &quot;$1&quot;
+</td><td>
+{{int:784f094b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b40dc398&action=edit 81545b85]<br>
+[[MediaWiki_talk:b40dc398|Talk]]
+</td><td>
+&quot;$1&quot; has been deleted.
+See $2 for a record of recent deletions.
+</td><td>
+{{int:b40dc398}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:64a8bf46&action=edit 6f4d03ee]<br>
+[[MediaWiki_talk:64a8bf46|Talk]]
+</td><td>
+del
+</td><td>
+{{int:64a8bf46}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3316ac85&action=edit c423c282]<br>
+[[MediaWiki_talk:3316ac85|Talk]]
+</td><td>
+Delete page
+</td><td>
+{{int:3316ac85}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a2496a13&action=edit a3173eab]<br>
+[[MediaWiki_talk:a2496a13|Talk]]
+</td><td>
+(Deleting &quot;$1&quot;)
+</td><td>
+{{int:a2496a13}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9d817726&action=edit b93901eb]<br>
+[[MediaWiki_talk:9d817726|Talk]]
+</td><td>
+Delete this page
+</td><td>
+{{int:9d817726}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49653e1b&action=edit 58f0b919]<br>
+[[MediaWiki_talk:49653e1b|Talk]]
+</td><td>
+deletion log
+</td><td>
+{{int:49653e1b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d73442e4&action=edit c5ee36a7]<br>
+[[MediaWiki_talk:d73442e4|Talk]]
+</td><td>
+Deletion_log
+</td><td>
+{{int:d73442e4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2349bb58&action=edit 6526e633]<br>
+[[MediaWiki_talk:2349bb58|Talk]]
+</td><td>
+Below is a list of the most recent deletions.
+All times shown are server time (UTC).
+&lt;ul&gt;
+&lt;/ul&gt;
+
+</td><td>
+{{int:2349bb58}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:381bedfc&action=edit 015693e1]<br>
+[[MediaWiki_talk:381bedfc|Talk]]
+</td><td>
+For developer use only
+</td><td>
+{{int:381bedfc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52713d3d&action=edit 9c6f4cd5]<br>
+[[MediaWiki_talk:52713d3d|Talk]]
+</td><td>
+The action you have requested can only be
+performed by users with &quot;developer&quot; status.
+See $1.
+</td><td>
+{{int:52713d3d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6cca6111&action=edit 59afe6b0]<br>
+[[MediaWiki_talk:6cca6111|Talk]]
+</td><td>
+Developer access required
+</td><td>
+{{int:6cca6111}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d23a1c9f&action=edit 75a0ee1b]<br>
+[[MediaWiki_talk:d23a1c9f|Talk]]
+</td><td>
+diff
+</td><td>
+{{int:d23a1c9f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b16f1f66&action=edit 48d53c6e]<br>
+[[MediaWiki_talk:b16f1f66|Talk]]
+</td><td>
+(Difference between revisions)
+</td><td>
+{{int:b16f1f66}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3c1c1596&action=edit 657b3530]<br>
+[[MediaWiki_talk:3c1c1596|Talk]]
+</td><td>
+Wiktionary:General_disclaimer
+</td><td>
+{{int:3c1c1596}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2cbbc29e&action=edit 774706d2]<br>
+[[MediaWiki_talk:2cbbc29e|Talk]]
+</td><td>
+Disclaimers
+</td><td>
+{{int:2cbbc29e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac57c500&action=edit c06b805b]<br>
+[[MediaWiki_talk:ac57c500|Talk]]
+</td><td>
+Double Redirects
+</td><td>
+{{int:ac57c500}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba6ba737&action=edit 49eadc1d]<br>
+[[MediaWiki_talk:ba6ba737|Talk]]
+</td><td>
+&lt;b&gt;Attention:&lt;/b&gt; This list may contain false positives. That usually means there is additional text with links below the first #REDIRECT.&lt;br /&gt;
+Each row contains links to the first and second redirect, as well as the first line of the second redirect text, usually giving the &quot;real&quot; target page, which the first redirect should point to.
+</td><td>
+{{int:ba6ba737}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5301648d&action=edit 9ead47a8]<br>
+[[MediaWiki_talk:5301648d|Talk]]
+</td><td>
+Edit
+</td><td>
+{{int:5301648d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:299ca80d&action=edit 74940f72]<br>
+[[MediaWiki_talk:299ca80d|Talk]]
+</td><td>
+The edit comment was: &quot;&lt;i&gt;$1&lt;/i&gt;&quot;.
+</td><td>
+{{int:299ca80d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1af657fb&action=edit 3b56e95b]<br>
+[[MediaWiki_talk:1af657fb|Talk]]
+</td><td>
+Edit conflict: $1
+</td><td>
+{{int:1af657fb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8b46c7e0&action=edit 10d395b9]<br>
+[[MediaWiki_talk:8b46c7e0|Talk]]
+</td><td>
+Edit the current version of this page
+</td><td>
+{{int:8b46c7e0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47f4389a&action=edit a1524e37]<br>
+[[MediaWiki_talk:47f4389a|Talk]]
+</td><td>
+Editing help
+</td><td>
+{{int:47f4389a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56815513&action=edit 7072deb5]<br>
+[[MediaWiki_talk:56815513|Talk]]
+</td><td>
+Help:Editing
+</td><td>
+{{int:56815513}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b9ba1a2&action=edit f34946be]<br>
+[[MediaWiki_talk:3b9ba1a2|Talk]]
+</td><td>
+Editing $1
+</td><td>
+{{int:3b9ba1a2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e6bd9f3&action=edit bd55ff2e]<br>
+[[MediaWiki_talk:5e6bd9f3|Talk]]
+</td><td>
+&lt;strong&gt;WARNING: You are editing an out-of-date
+revision of this page.
+If you save it, any changes made since this revision will be lost.&lt;/strong&gt;
+
+</td><td>
+{{int:5e6bd9f3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51905619&action=edit 965b4116]<br>
+[[MediaWiki_talk:51905619|Talk]]
+</td><td>
+edit
+</td><td>
+{{int:51905619}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2138f524&action=edit 8bc15909]<br>
+[[MediaWiki_talk:2138f524|Talk]]
+</td><td>
+Edit this page
+</td><td>
+{{int:2138f524}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:96c0b2c5&action=edit 4a27c333]<br>
+[[MediaWiki_talk:96c0b2c5|Talk]]
+</td><td>
+Disable e-mail from other users
+</td><td>
+{{int:96c0b2c5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8a275a27&action=edit e4573eb4]<br>
+[[MediaWiki_talk:8a275a27|Talk]]
+</td><td>
+Fields marked with a star (*) are optional. Storing an email address enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.&lt;br /&gt;&lt;br /&gt;Your real name, if you choose to provide it, will be used for giving you attribution for your work.
+</td><td>
+{{int:8a275a27}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:34a573ac&action=edit b29c18eb]<br>
+[[MediaWiki_talk:34a573ac|Talk]]
+</td><td>
+From
+</td><td>
+{{int:34a573ac}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1653aeb3&action=edit 8d8c0edf]<br>
+[[MediaWiki_talk:1653aeb3|Talk]]
+</td><td>
+Message
+</td><td>
+{{int:1653aeb3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac5cfb8e&action=edit a9b033ab]<br>
+[[MediaWiki_talk:ac5cfb8e|Talk]]
+</td><td>
+E-mail user
+</td><td>
+{{int:ac5cfb8e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e3fc4fe2&action=edit eb6bf1bb]<br>
+[[MediaWiki_talk:e3fc4fe2|Talk]]
+</td><td>
+If this user has entered a valid e-mail address in
+his or her user preferences, the form below will send a single message.
+The e-mail address you entered in your user preferences will appear
+as the &quot;From&quot; address of the mail, so the recipient will be able
+to reply.
+</td><td>
+{{int:e3fc4fe2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:145da553&action=edit 05072b51]<br>
+[[MediaWiki_talk:145da553|Talk]]
+</td><td>
+Send
+</td><td>
+{{int:145da553}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:833a22dc&action=edit b1d3f3e4]<br>
+[[MediaWiki_talk:833a22dc|Talk]]
+</td><td>
+E-mail sent
+</td><td>
+{{int:833a22dc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e3935836&action=edit 2effa7aa]<br>
+[[MediaWiki_talk:e3935836|Talk]]
+</td><td>
+Your e-mail message has been sent.
+</td><td>
+{{int:e3935836}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8dba338&action=edit 275a0d68]<br>
+[[MediaWiki_talk:c8dba338|Talk]]
+</td><td>
+Subject
+</td><td>
+{{int:c8dba338}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c35740f4&action=edit 88b0fd50]<br>
+[[MediaWiki_talk:c35740f4|Talk]]
+</td><td>
+To
+</td><td>
+{{int:c35740f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac5cfb8e&action=edit a9b033ab]<br>
+[[MediaWiki_talk:ac5cfb8e|Talk]]
+</td><td>
+E-mail this user
+</td><td>
+{{int:ac5cfb8e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b0a234b&action=edit 698a308a]<br>
+[[MediaWiki_talk:6b0a234b|Talk]]
+</td><td>
+Enter a reason for the lock, including an estimate
+of when the lock will be released
+</td><td>
+{{int:6b0a234b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f2f6a15&action=edit 11f9578d]<br>
+[[MediaWiki_talk:7f2f6a15|Talk]]
+</td><td>
+Error
+</td><td>
+{{int:7f2f6a15}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53ee1378&action=edit aa2d1eba]<br>
+[[MediaWiki_talk:53ee1378|Talk]]
+</td><td>
+Error
+</td><td>
+{{int:53ee1378}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8aedeece&action=edit a1c634a7]<br>
+[[MediaWiki_talk:8aedeece|Talk]]
+</td><td>
+content before blanking was:
+</td><td>
+{{int:8aedeece}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:42abde88&action=edit eba6d64f]<br>
+[[MediaWiki_talk:42abde88|Talk]]
+</td><td>
+page was empty
+</td><td>
+{{int:42abde88}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dd028a5c&action=edit fe80d230]<br>
+[[MediaWiki_talk:dd028a5c|Talk]]
+</td><td>
+content was:
+</td><td>
+{{int:dd028a5c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b7845dfb&action=edit 1a7999fa]<br>
+[[MediaWiki_talk:b7845dfb|Talk]]
+</td><td>
+Someone else has changed this page since you
+started editing it.
+The upper text area contains the page text as it currently exists.
+Your changes are shown in the lower text area.
+You will have to merge your changes into the existing text.
+&lt;b&gt;Only&lt;/b&gt; the text in the upper text area will be saved when you
+press &quot;Save page&quot;.
+&lt;p&gt;
+</td><td>
+{{int:b7845dfb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f3e4fadb&action=edit 51713409]<br>
+[[MediaWiki_talk:f3e4fadb|Talk]]
+</td><td>
+Export pages
+</td><td>
+{{int:f3e4fadb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b68aeee1&action=edit bf364325]<br>
+[[MediaWiki_talk:b68aeee1|Talk]]
+</td><td>
+Include only the current revision, not the full history
+</td><td>
+{{int:b68aeee1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e884d79&action=edit eddfb839]<br>
+[[MediaWiki_talk:7e884d79|Talk]]
+</td><td>
+You can export the text and editing history of a particular
+page or set of pages wrapped in some XML; this can then be imported into another
+wiki running MediaWiki software, transformed, or just kept for your private
+amusement.
+</td><td>
+{{int:7e884d79}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a34d80e8&action=edit 8f95a409]<br>
+[[MediaWiki_talk:a34d80e8|Talk]]
+</td><td>
+http&#58;//www.example.com link title
+</td><td>
+{{int:a34d80e8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:117651f0&action=edit 481904c0]<br>
+[[MediaWiki_talk:117651f0|Talk]]
+</td><td>
+External link (remember http&#58;// prefix)
+</td><td>
+{{int:117651f0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f11042a4&action=edit e75bc045]<br>
+[[MediaWiki_talk:f11042a4|Talk]]
+</td><td>
+FAQ
+</td><td>
+{{int:f11042a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e891e10&action=edit 5b772c96]<br>
+[[MediaWiki_talk:2e891e10|Talk]]
+</td><td>
+Wiktionary:FAQ
+</td><td>
+{{int:2e891e10}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86edbc13&action=edit 62f8af98]<br>
+[[MediaWiki_talk:86edbc13|Talk]]
+</td><td>
+Feed:
+</td><td>
+{{int:86edbc13}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2727dd90&action=edit 6c916412]<br>
+[[MediaWiki_talk:2727dd90|Talk]]
+</td><td>
+Could not copy file &quot;$1&quot; to &quot;$2&quot;.
+</td><td>
+{{int:2727dd90}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e60a2c42&action=edit d393dbbc]<br>
+[[MediaWiki_talk:e60a2c42|Talk]]
+</td><td>
+Could not delete file &quot;$1&quot;.
+</td><td>
+{{int:e60a2c42}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d7b25eeb&action=edit 6dace2d5]<br>
+[[MediaWiki_talk:d7b25eeb|Talk]]
+</td><td>
+Summary
+</td><td>
+{{int:d7b25eeb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3cbb98d&action=edit 08deae8d]<br>
+[[MediaWiki_talk:a3cbb98d|Talk]]
+</td><td>
+Filename
+</td><td>
+{{int:a3cbb98d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8f6c94d&action=edit 35c4ded6]<br>
+[[MediaWiki_talk:c8f6c94d|Talk]]
+</td><td>
+Could not find file &quot;$1&quot;.
+</td><td>
+{{int:c8f6c94d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9b56972&action=edit 6d195b75]<br>
+[[MediaWiki_talk:b9b56972|Talk]]
+</td><td>
+Could not rename file &quot;$1&quot; to &quot;$2&quot;.
+</td><td>
+{{int:b9b56972}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a6a1eb6&action=edit 1ffce53a]<br>
+[[MediaWiki_talk:0a6a1eb6|Talk]]
+</td><td>
+Source
+</td><td>
+{{int:0a6a1eb6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0f0e70a0&action=edit 040e2ba8]<br>
+[[MediaWiki_talk:0f0e70a0|Talk]]
+</td><td>
+Copyright status
+</td><td>
+{{int:0f0e70a0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:45eaa53f&action=edit 79423d38]<br>
+[[MediaWiki_talk:45eaa53f|Talk]]
+</td><td>
+File &quot;$1&quot; uploaded successfully.
+Please follow this link: $2 to the description page and fill
+in information about the file, such as where it came from, when it was
+created and by whom, and anything else you may know about it.
+</td><td>
+{{int:45eaa53f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a303ff06&action=edit 416cf9e4]<br>
+[[MediaWiki_talk:a303ff06|Talk]]
+</td><td>
+Error: could not submit form
+</td><td>
+{{int:a303ff06}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc08787f&action=edit ada66d8e]<br>
+[[MediaWiki_talk:dc08787f|Talk]]
+</td><td>
+From Wiktionary
+</td><td>
+{{int:dc08787f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c4c83db8&action=edit f8d783cd]<br>
+[[MediaWiki_talk:c4c83db8|Talk]]
+</td><td>
+fetching image list
+</td><td>
+{{int:c4c83db8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e0b45f2&action=edit 1ec558a6]<br>
+[[MediaWiki_talk:2e0b45f2|Talk]]
+</td><td>
+Go
+</td><td>
+{{int:2e0b45f2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:749351b4&action=edit 49a50bdf]<br>
+[[MediaWiki_talk:749351b4|Talk]]
+</td><td>
+
+&lt;!-- SiteSearch Google --&gt;
+&lt;FORM method=GET action=&quot;http&#58;//www.google.com/search&quot;&gt;
+&lt;TABLE bgcolor=&quot;#FFFFFF&quot;&gt;&lt;tr&gt;&lt;td&gt;
+&lt;A HREF=&quot;http&#58;//www.google.com/&quot;&gt;
+&lt;IMG SRC=&quot;http&#58;//www.google.com/logos/Logo_40wht.gif&quot;
+border=&quot;0&quot; ALT=&quot;Google&quot;&gt;&lt;/A&gt;
+&lt;/td&gt;
+&lt;td&gt;
+&lt;INPUT TYPE=text name=q size=31 maxlength=255 value=&quot;$1&quot;&gt;
+&lt;INPUT type=submit name=btnG VALUE=&quot;Google Search&quot;&gt;
+&lt;font size=-1&gt;
+&lt;input type=hidden name=domains value=&quot;http&#58;//tl.wiktionary.org&quot;&gt;&lt;br /&gt;&lt;input type=radio name=sitesearch value=&quot;&quot;&gt; WWW &lt;input type=radio name=sitesearch value=&quot;http&#58;//tl.wiktionary.org&quot; checked&gt; http&#58;//tl.wiktionary.org &lt;br /&gt;
+&lt;input type=&#39;hidden&#39; name=&#39;ie&#39; value=&#39;$2&#39;&gt;
+&lt;input type=&#39;hidden&#39; name=&#39;oe&#39; value=&#39;$2&#39;&gt;
+&lt;/font&gt;
+&lt;/td&gt;&lt;/tr&gt;&lt;/TABLE&gt;
+&lt;/FORM&gt;
+&lt;!-- SiteSearch Google --&gt;
+</td><td>
+{{int:749351b4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:489b474b&action=edit 8da95a41]<br>
+[[MediaWiki_talk:489b474b|Talk]]
+</td><td>
+Fill in from browser
+</td><td>
+{{int:489b474b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:237cf168&action=edit 7f401fbb]<br>
+[[MediaWiki_talk:237cf168|Talk]]
+</td><td>
+Headline text
+</td><td>
+{{int:237cf168}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:91b3bc72&action=edit c4eef2f5]<br>
+[[MediaWiki_talk:91b3bc72|Talk]]
+</td><td>
+Level 2 headline
+</td><td>
+{{int:91b3bc72}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c47ae153&action=edit 92005ecf]<br>
+[[MediaWiki_talk:c47ae153|Talk]]
+</td><td>
+Help
+</td><td>
+{{int:c47ae153}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56203224&action=edit 9ca36083]<br>
+[[MediaWiki_talk:56203224|Talk]]
+</td><td>
+Help:Contents
+</td><td>
+{{int:56203224}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:34d8b60f&action=edit 93c8c96b]<br>
+[[MediaWiki_talk:34d8b60f|Talk]]
+</td><td>
+hide
+</td><td>
+{{int:34d8b60f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9aa39fe3&action=edit 1cc77a14]<br>
+[[MediaWiki_talk:9aa39fe3|Talk]]
+</td><td>
+hide
+</td><td>
+{{int:9aa39fe3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4d9810c0&action=edit 56714843]<br>
+[[MediaWiki_talk:4d9810c0|Talk]]
+</td><td>
+hist
+</td><td>
+{{int:4d9810c0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f37ab91a&action=edit 4e7121e9]<br>
+[[MediaWiki_talk:f37ab91a|Talk]]
+</td><td>
+Diff selection: mark the radio boxes of the versions to compare and hit enter or the button at the bottom.&lt;br/&gt;
+Legend: (cur) = difference with current version,
+(last) = difference with preceding version, M = minor edit.
+</td><td>
+{{int:f37ab91a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:90ccd649&action=edit 66f79d8a]<br>
+[[MediaWiki_talk:90ccd649|Talk]]
+</td><td>
+Page history
+</td><td>
+{{int:90ccd649}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:15a13ace&action=edit a937e036]<br>
+[[MediaWiki_talk:15a13ace|Talk]]
+</td><td>
+History
+</td><td>
+{{int:15a13ace}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e02c3587&action=edit 6079f80a]<br>
+[[MediaWiki_talk:e02c3587|Talk]]
+</td><td>
+Warning: The page you are about to delete has a history:
+</td><td>
+{{int:e02c3587}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5741ad8f&action=edit 48849a80]<br>
+[[MediaWiki_talk:5741ad8f|Talk]]
+</td><td>
+Horizontal line (use sparingly)
+</td><td>
+{{int:5741ad8f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e18602a&action=edit d874ec59]<br>
+[[MediaWiki_talk:7e18602a|Talk]]
+</td><td>
+Ignore warning and save file anyway.
+</td><td>
+{{int:7e18602a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5bf1efaa&action=edit a98182df]<br>
+[[MediaWiki_talk:5bf1efaa|Talk]]
+</td><td>
+Show all images with names matching
+</td><td>
+{{int:5bf1efaa}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e7a51d5&action=edit f8288ad8]<br>
+[[MediaWiki_talk:8e7a51d5|Talk]]
+</td><td>
+Search
+</td><td>
+{{int:8e7a51d5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:133971b3&action=edit be19a728]<br>
+[[MediaWiki_talk:133971b3|Talk]]
+</td><td>
+Example.jpg
+</td><td>
+{{int:133971b3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a73e0c3&action=edit d103e97d]<br>
+[[MediaWiki_talk:2a73e0c3|Talk]]
+</td><td>
+Embedded image
+</td><td>
+{{int:2a73e0c3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:353c260c&action=edit 3414ac48]<br>
+[[MediaWiki_talk:353c260c|Talk]]
+</td><td>
+Image links
+</td><td>
+{{int:353c260c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:affc6aca&action=edit 4c06ba77]<br>
+[[MediaWiki_talk:affc6aca|Talk]]
+</td><td>
+Image list
+</td><td>
+{{int:affc6aca}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ade85019&action=edit 2e8294bd]<br>
+[[MediaWiki_talk:ade85019|Talk]]
+</td><td>
+Below is a list of $1 images sorted $2.
+</td><td>
+{{int:ade85019}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7277ee94&action=edit a152014b]<br>
+[[MediaWiki_talk:7277ee94|Talk]]
+</td><td>
+View image page
+</td><td>
+{{int:7277ee94}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c783375c&action=edit b1d4cc4c]<br>
+[[MediaWiki_talk:c783375c|Talk]]
+</td><td>
+Revert to earlier version was successful.
+</td><td>
+{{int:c783375c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c6f52751&action=edit 6656e4f4]<br>
+[[MediaWiki_talk:c6f52751|Talk]]
+</td><td>
+del
+</td><td>
+{{int:c6f52751}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3c281ed6&action=edit a1adca28]<br>
+[[MediaWiki_talk:3c281ed6|Talk]]
+</td><td>
+desc
+</td><td>
+{{int:3c281ed6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:186e5ca1&action=edit de786597]<br>
+[[MediaWiki_talk:186e5ca1|Talk]]
+</td><td>
+Legend: (cur) = this is the current image, (del) = delete
+this old version, (rev) = revert to this old version.
+&lt;br /&gt;&lt;i&gt;Click on date to see image uploaded on that date&lt;/i&gt;.
+</td><td>
+{{int:186e5ca1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d78c0d7&action=edit d9305ede]<br>
+[[MediaWiki_talk:8d78c0d7|Talk]]
+</td><td>
+Image history
+</td><td>
+{{int:8d78c0d7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86260b9f&action=edit a46e05c1]<br>
+[[MediaWiki_talk:86260b9f|Talk]]
+</td><td>
+Legend: (desc) = show/edit image description.
+</td><td>
+{{int:86260b9f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d6fbc9d2&action=edit 62fdfbd5]<br>
+[[MediaWiki_talk:d6fbc9d2|Talk]]
+</td><td>
+Import pages
+</td><td>
+{{int:d6fbc9d2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bac6ed75&action=edit 85d2877a]<br>
+[[MediaWiki_talk:bac6ed75|Talk]]
+</td><td>
+Import failed: $1
+</td><td>
+{{int:bac6ed75}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f4dee51e&action=edit f74f664b]<br>
+[[MediaWiki_talk:f4dee51e|Talk]]
+</td><td>
+Conflicting history revision exists (may have imported this page before)
+</td><td>
+{{int:f4dee51e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d461354&action=edit ff881471]<br>
+[[MediaWiki_talk:1d461354|Talk]]
+</td><td>
+Empty or no text
+</td><td>
+{{int:1d461354}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5b910f21&action=edit e2781bd1]<br>
+[[MediaWiki_talk:5b910f21|Talk]]
+</td><td>
+Import succeeded!
+</td><td>
+{{int:5b910f21}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d58d609&action=edit 965243c5]<br>
+[[MediaWiki_talk:3d58d609|Talk]]
+</td><td>
+Please export the file from the source wiki using the Special:Export utility, save it to your disk and upload it here.
+</td><td>
+{{int:3d58d609}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31be67da&action=edit 176bd169]<br>
+[[MediaWiki_talk:31be67da|Talk]]
+</td><td>
+Click a button to get an example text
+</td><td>
+{{int:31be67da}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2854823a&action=edit 6de0a6d1]<br>
+[[MediaWiki_talk:2854823a|Talk]]
+</td><td>
+Please enter the text you want to be formatted.\n It will be shown in the infobox for copy and pasting.\nExample:\n$1\nwill become:\n$2
+</td><td>
+{{int:2854823a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:103c360a&action=edit e90e9e1c]<br>
+[[MediaWiki_talk:103c360a|Talk]]
+</td><td>
+Internal error
+</td><td>
+{{int:103c360a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:148008a6&action=edit 919b03e5]<br>
+[[MediaWiki_talk:148008a6|Talk]]
+</td><td>
+Interlanguage links
+</td><td>
+{{int:148008a6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:07586557&action=edit 5c2ff182]<br>
+[[MediaWiki_talk:07586557|Talk]]
+</td><td>
+Invalid IP range.
+
+</td><td>
+{{int:07586557}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22f9ff50&action=edit 1f99aaad]<br>
+[[MediaWiki_talk:22f9ff50|Talk]]
+</td><td>
+IP Address/username
+</td><td>
+{{int:22f9ff50}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8994552&action=edit 91b35c2d]<br>
+[[MediaWiki_talk:f8994552|Talk]]
+</td><td>
+Expiry time invalid.
+</td><td>
+{{int:f8994552}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2147c662&action=edit 524cfd7e]<br>
+[[MediaWiki_talk:2147c662|Talk]]
+</td><td>
+Expiry
+</td><td>
+{{int:2147c662}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9cb7e6ee&action=edit 503153e9]<br>
+[[MediaWiki_talk:9cb7e6ee|Talk]]
+</td><td>
+List of blocked IP addresses and usernames
+</td><td>
+{{int:9cb7e6ee}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6774dfa8&action=edit 1ecdad25]<br>
+[[MediaWiki_talk:6774dfa8|Talk]]
+</td><td>
+Reason
+</td><td>
+{{int:6774dfa8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:62218118&action=edit e29a20a2]<br>
+[[MediaWiki_talk:62218118|Talk]]
+</td><td>
+Block this user
+</td><td>
+{{int:62218118}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7863d305&action=edit 73ecf10c]<br>
+[[MediaWiki_talk:7863d305|Talk]]
+</td><td>
+Unblock this address
+</td><td>
+{{int:7863d305}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba95215c&action=edit 5fc7f411]<br>
+[[MediaWiki_talk:ba95215c|Talk]]
+</td><td>
+&quot;$1&quot; unblocked
+</td><td>
+{{int:ba95215c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e89a827&action=edit 9aa403ad]<br>
+[[MediaWiki_talk:8e89a827|Talk]]
+</td><td>
+ISBN
+</td><td>
+{{int:8e89a827}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5b017ff1&action=edit abdf987b]<br>
+[[MediaWiki_talk:5b017ff1|Talk]]
+</td><td>
+redirect page
+</td><td>
+{{int:5b017ff1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:208e76ed&action=edit 95f02073]<br>
+[[MediaWiki_talk:208e76ed|Talk]]
+</td><td>
+Italic text
+</td><td>
+{{int:208e76ed}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e5211e9&action=edit 3f1c7185]<br>
+[[MediaWiki_talk:7e5211e9|Talk]]
+</td><td>
+Italic text
+</td><td>
+{{int:7e5211e9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bcce0a8a&action=edit 0e29818a]<br>
+[[MediaWiki_talk:bcce0a8a|Talk]]
+</td><td>
+Problem with item &#39;$1&#39;, invalid name...
+</td><td>
+{{int:bcce0a8a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:996c231b&action=edit 5dd7fd8c]<br>
+[[MediaWiki_talk:996c231b|Talk]]
+</td><td>
+It is recommended that images not exceed 100k in size.
+</td><td>
+{{int:996c231b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d1c69a85&action=edit 213ed3ea]<br>
+[[MediaWiki_talk:d1c69a85|Talk]]
+</td><td>
+last
+</td><td>
+{{int:d1c69a85}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:26d03483&action=edit 1d0be5cf]<br>
+[[MediaWiki_talk:26d03483|Talk]]
+</td><td>
+This page was last modified $1.
+</td><td>
+{{int:26d03483}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d8b6a1ce&action=edit b4c7424e]<br>
+[[MediaWiki_talk:d8b6a1ce|Talk]]
+</td><td>
+This page was last modified $1 by $2.
+</td><td>
+{{int:d8b6a1ce}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b5fb75c3&action=edit 7aab91e5]<br>
+[[MediaWiki_talk:b5fb75c3|Talk]]
+</td><td>
+Line $1:
+</td><td>
+{{int:b5fb75c3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a1a27fd2&action=edit 4c4ec68a]<br>
+[[MediaWiki_talk:a1a27fd2|Talk]]
+</td><td>
+Link title
+</td><td>
+{{int:a1a27fd2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28f8c928&action=edit e0ee37d8]<br>
+[[MediaWiki_talk:28f8c928|Talk]]
+</td><td>
+Internal link
+</td><td>
+{{int:28f8c928}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:003058f7&action=edit c692b683]<br>
+[[MediaWiki_talk:003058f7|Talk]]
+</td><td>
+(List of links)
+</td><td>
+{{int:003058f7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6508e12f&action=edit ce30384f]<br>
+[[MediaWiki_talk:6508e12f|Talk]]
+</td><td>
+The following pages link to here:
+</td><td>
+{{int:6508e12f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6dbd59d&action=edit 50b839a3]<br>
+[[MediaWiki_talk:f6dbd59d|Talk]]
+</td><td>
+The following pages link to this image:
+</td><td>
+{{int:f6dbd59d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eb68781a&action=edit 743236e7]<br>
+[[MediaWiki_talk:eb68781a|Talk]]
+</td><td>
+/^(&#91;a-z]+)(.*)$/sD
+</td><td>
+{{int:eb68781a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8ca6811&action=edit 069b38c0]<br>
+[[MediaWiki_talk:a8ca6811|Talk]]
+</td><td>
+list
+</td><td>
+{{int:a8ca6811}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9bf82beb&action=edit aabbb062]<br>
+[[MediaWiki_talk:9bf82beb|Talk]]
+</td><td>
+User list
+</td><td>
+{{int:9bf82beb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:61a6ed55&action=edit 1b4ae4f9]<br>
+[[MediaWiki_talk:61a6ed55|Talk]]
+</td><td>
+Loading page history
+</td><td>
+{{int:61a6ed55}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bf19b1de&action=edit b6bb9fa5]<br>
+[[MediaWiki_talk:bf19b1de|Talk]]
+</td><td>
+loading revision for diff
+</td><td>
+{{int:bf19b1de}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:43678846&action=edit f25bccd7]<br>
+[[MediaWiki_talk:43678846|Talk]]
+</td><td>
+Local time display
+</td><td>
+{{int:43678846}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31dcaa22&action=edit 62c50181]<br>
+[[MediaWiki_talk:31dcaa22|Talk]]
+</td><td>
+Lock database
+</td><td>
+{{int:31dcaa22}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9dc82fa2&action=edit 5199ac8e]<br>
+[[MediaWiki_talk:9dc82fa2|Talk]]
+</td><td>
+Yes, I really want to lock the database.
+</td><td>
+{{int:9dc82fa2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fef93b9b&action=edit 4f29ae0a]<br>
+[[MediaWiki_talk:fef93b9b|Talk]]
+</td><td>
+Lock database
+</td><td>
+{{int:fef93b9b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b4abc4bb&action=edit e73c06d7]<br>
+[[MediaWiki_talk:b4abc4bb|Talk]]
+</td><td>
+Database lock succeeded
+</td><td>
+{{int:b4abc4bb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b6fcfec5&action=edit 88c6fb22]<br>
+[[MediaWiki_talk:b6fcfec5|Talk]]
+</td><td>
+The database has been locked.
+&lt;br /&gt;Remember to remove the lock after your maintenance is complete.
+</td><td>
+{{int:b6fcfec5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:459bf648&action=edit 070ff9ae]<br>
+[[MediaWiki_talk:459bf648|Talk]]
+</td><td>
+Locking the database will suspend the ability of all
+users to edit pages, change their preferences, edit their watchlists, and
+other things requiring changes in the database.
+Please confirm that this is what you intend to do, and that you will
+unlock the database when your maintenance is done.
+</td><td>
+{{int:459bf648}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2727a733&action=edit 8a890d0a]<br>
+[[MediaWiki_talk:2727a733|Talk]]
+</td><td>
+You did not check the confirmation box.
+</td><td>
+{{int:2727a733}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4e5a2893&action=edit 2736fab2]<br>
+[[MediaWiki_talk:4e5a2893|Talk]]
+</td><td>
+Log in
+</td><td>
+{{int:4e5a2893}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fcfc7549&action=edit e6f9a4e2]<br>
+[[MediaWiki_talk:fcfc7549|Talk]]
+</td><td>
+Login error
+</td><td>
+{{int:fcfc7549}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4113f724&action=edit 36f843a7]<br>
+[[MediaWiki_talk:4113f724|Talk]]
+</td><td>
+User login
+</td><td>
+{{int:4113f724}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7a6963a6&action=edit d23ee6a8]<br>
+[[MediaWiki_talk:7a6963a6|Talk]]
+</td><td>
+&lt;b&gt;There has been a problem with your login.&lt;/b&gt;&lt;br /&gt;Try again!
+</td><td>
+{{int:7a6963a6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bbf56890&action=edit 221d44a4]<br>
+[[MediaWiki_talk:bbf56890|Talk]]
+</td><td>
+You must have cookies enabled to log in to Wiktionary.
+</td><td>
+{{int:bbf56890}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75749962&action=edit ee8446ea]<br>
+[[MediaWiki_talk:75749962|Talk]]
+</td><td>
+You must &#91;&#91;special:Userlogin&#124;login]] to view other pages.
+</td><td>
+{{int:75749962}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c779400b&action=edit a90049e8]<br>
+[[MediaWiki_talk:c779400b|Talk]]
+</td><td>
+Login Required
+</td><td>
+{{int:c779400b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:753694e0&action=edit a5607b10]<br>
+[[MediaWiki_talk:753694e0|Talk]]
+</td><td>
+You are now logged in to Wiktionary as &quot;$1&quot;.
+</td><td>
+{{int:753694e0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:73eb6767&action=edit 5c2a05be]<br>
+[[MediaWiki_talk:73eb6767|Talk]]
+</td><td>
+Login successful
+</td><td>
+{{int:73eb6767}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e43d612e&action=edit 55525e1b]<br>
+[[MediaWiki_talk:e43d612e|Talk]]
+</td><td>
+Log out
+</td><td>
+{{int:e43d612e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8455b1c&action=edit 50310460]<br>
+[[MediaWiki_talk:a8455b1c|Talk]]
+</td><td>
+You are now logged out.
+You can continue to use Wiktionary anonymously, or you can log in
+again as the same or as a different user. Note that some pages may
+continue to be displayed as if you were still logged in, until you clear
+your browser cache
+
+</td><td>
+{{int:a8455b1c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd48f4e7&action=edit 8f9db4e5]<br>
+[[MediaWiki_talk:cd48f4e7|Talk]]
+</td><td>
+User logout
+</td><td>
+{{int:cd48f4e7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:916f5569&action=edit 92ab2259]<br>
+[[MediaWiki_talk:916f5569|Talk]]
+</td><td>
+Orphaned pages
+</td><td>
+{{int:916f5569}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9cdfa115&action=edit 38996948]<br>
+[[MediaWiki_talk:9cdfa115|Talk]]
+</td><td>
+Long pages
+</td><td>
+{{int:9cdfa115}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b91ee293&action=edit 09b5b0a2]<br>
+[[MediaWiki_talk:b91ee293|Talk]]
+</td><td>
+WARNING: This page is $1 kilobytes long; some
+browsers may have problems editing pages approaching or longer than 32kb.
+Please consider breaking the page into smaller sections.
+</td><td>
+{{int:b91ee293}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1ca3c8a2&action=edit 2b82fce3]<br>
+[[MediaWiki_talk:1ca3c8a2|Talk]]
+</td><td>
+Error sending mail: $1
+</td><td>
+{{int:1ca3c8a2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:97681e3e&action=edit 669d145f]<br>
+[[MediaWiki_talk:97681e3e|Talk]]
+</td><td>
+Mail me a new password
+</td><td>
+{{int:97681e3e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8646515d&action=edit 874a6660]<br>
+[[MediaWiki_talk:8646515d|Talk]]
+</td><td>
+No send address
+</td><td>
+{{int:8646515d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8116e36&action=edit ce0442ed]<br>
+[[MediaWiki_talk:f8116e36|Talk]]
+</td><td>
+You must be &lt;a href=&quot;{{localurl:Special:Userlogin&quot;&gt;logged in&lt;/a&gt;
+and have a valid e-mail address in your &lt;a href=&quot;/wiki/Special:Preferences&quot;&gt;preferences&lt;/a&gt;
+to send e-mail to other users.
+</td><td>
+{{int:f8116e36}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:95989ab3&action=edit 6ad3db9a]<br>
+[[MediaWiki_talk:95989ab3|Talk]]
+</td><td>
+Main Page
+</td><td>
+{{int:95989ab3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:216e0fe3&action=edit 19d499cf]<br>
+[[MediaWiki_talk:216e0fe3|Talk]]
+</td><td>
+Please see &#91;http&#58;//meta.wikipedia.org/wiki/MediaWiki_i18n documentation on customizing the interface]
+and the &#91;http&#58;//meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User&#39;s Guide] for usage and configuration help.
+</td><td>
+{{int:216e0fe3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:29c07aac&action=edit 30186460]<br>
+[[MediaWiki_talk:29c07aac|Talk]]
+</td><td>
+Wiki software successfully installed.
+</td><td>
+{{int:29c07aac}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:94de303b&action=edit 5b30e2c5]<br>
+[[MediaWiki_talk:94de303b|Talk]]
+</td><td>
+Maintenance page
+</td><td>
+{{int:94de303b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b98df751&action=edit aa734abd]<br>
+[[MediaWiki_talk:b98df751|Talk]]
+</td><td>
+Back to Maintenance Page
+</td><td>
+{{int:b98df751}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e830e7c&action=edit ff589b21]<br>
+[[MediaWiki_talk:5e830e7c|Talk]]
+</td><td>
+This page includes several handy tools for everyday maintenance. Some of these functions tend to stress the database, so please do not hit reload after every item you fixed ;-)
+</td><td>
+{{int:5e830e7c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:147d840b&action=edit 192a7baa]<br>
+[[MediaWiki_talk:147d840b|Talk]]
+</td><td>
+Make a user into a sysop
+</td><td>
+{{int:147d840b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3e1272dd&action=edit c857a847]<br>
+[[MediaWiki_talk:3e1272dd|Talk]]
+</td><td>
+&lt;b&gt;User &quot;$1&quot; could not be made into a sysop. (Did you enter the name correctly?)&lt;/b&gt;
+</td><td>
+{{int:3e1272dd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f942827d&action=edit 4ae2de91]<br>
+[[MediaWiki_talk:f942827d|Talk]]
+</td><td>
+Name of the user:
+</td><td>
+{{int:f942827d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8933e97e&action=edit 1138d88d]<br>
+[[MediaWiki_talk:8933e97e|Talk]]
+</td><td>
+&lt;b&gt;User &quot;$1&quot; is now a sysop&lt;/b&gt;
+</td><td>
+{{int:8933e97e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ffde53f7&action=edit 51a3d81a]<br>
+[[MediaWiki_talk:ffde53f7|Talk]]
+</td><td>
+Make this user into a sysop
+</td><td>
+{{int:ffde53f7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6135d20c&action=edit 9014f0fd]<br>
+[[MediaWiki_talk:6135d20c|Talk]]
+</td><td>
+This form is used by bureaucrats to turn ordinary users into administrators.
+Type the name of the user in the box and press the button to make the user an administrator
+</td><td>
+{{int:6135d20c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40537c23&action=edit 9d7a92cc]<br>
+[[MediaWiki_talk:40537c23|Talk]]
+</td><td>
+Make a user into a sysop
+</td><td>
+{{int:40537c23}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b00f5f1f&action=edit f2f4e13e]<br>
+[[MediaWiki_talk:b00f5f1f|Talk]]
+</td><td>
+The query &quot;$1&quot; matched $2 page titles
+and the text of $3 pages.
+</td><td>
+{{int:b00f5f1f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3edf0df4&action=edit 7a488390]<br>
+[[MediaWiki_talk:3edf0df4|Talk]]
+</td><td>
+Rendering math
+</td><td>
+{{int:3edf0df4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78c6cb06&action=edit d9b8688c]<br>
+[[MediaWiki_talk:78c6cb06|Talk]]
+</td><td>
+Can&#39;t write to or create math output directory
+</td><td>
+{{int:78c6cb06}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f83fe947&action=edit be21263f]<br>
+[[MediaWiki_talk:f83fe947|Talk]]
+</td><td>
+Can&#39;t write to or create math temp directory
+</td><td>
+{{int:f83fe947}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f8cf40ba&action=edit 53e1c013]<br>
+[[MediaWiki_talk:f8cf40ba|Talk]]
+</td><td>
+Failed to parse
+</td><td>
+{{int:f8cf40ba}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7b3e958f&action=edit 7082c48f]<br>
+[[MediaWiki_talk:7b3e958f|Talk]]
+</td><td>
+PNG conversion failed; check for correct installation of latex, dvips, gs, and convert
+</td><td>
+{{int:7b3e958f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d6a158de&action=edit 41e6fe2b]<br>
+[[MediaWiki_talk:d6a158de|Talk]]
+</td><td>
+lexing error
+</td><td>
+{{int:d6a158de}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8109168a&action=edit 20ec4685]<br>
+[[MediaWiki_talk:8109168a|Talk]]
+</td><td>
+Missing texvc executable; please see math/README to configure.
+</td><td>
+{{int:8109168a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:41b65279&action=edit 3e8b5972]<br>
+[[MediaWiki_talk:41b65279|Talk]]
+</td><td>
+Insert formula here
+</td><td>
+{{int:41b65279}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5cbab860&action=edit d5667f6b]<br>
+[[MediaWiki_talk:5cbab860|Talk]]
+</td><td>
+syntax error
+</td><td>
+{{int:5cbab860}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7e756feb&action=edit 0baadf18]<br>
+[[MediaWiki_talk:7e756feb|Talk]]
+</td><td>
+Mathematical formula (LaTeX)
+</td><td>
+{{int:7e756feb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb4d261d&action=edit 5e0c970a]<br>
+[[MediaWiki_talk:fb4d261d|Talk]]
+</td><td>
+unknown error
+</td><td>
+{{int:fb4d261d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:26558f91&action=edit a0577d1d]<br>
+[[MediaWiki_talk:26558f91|Talk]]
+</td><td>
+unknown function
+</td><td>
+{{int:26558f91}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:63e94059&action=edit 704093ed]<br>
+[[MediaWiki_talk:63e94059|Talk]]
+</td><td>
+Example.mp3
+</td><td>
+{{int:63e94059}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8e4baaa8&action=edit 77fbb90b]<br>
+[[MediaWiki_talk:8e4baaa8|Talk]]
+</td><td>
+Media file link
+</td><td>
+{{int:8e4baaa8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cca18055&action=edit 61350cd2]<br>
+[[MediaWiki_talk:cca18055|Talk]]
+</td><td>
+Image names must be at least three letters.
+</td><td>
+{{int:cca18055}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7f8c4ff3&action=edit 3dd77123]<br>
+[[MediaWiki_talk:7f8c4ff3|Talk]]
+</td><td>
+This is a minor edit
+</td><td>
+{{int:7f8c4ff3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce5828a8&action=edit 3c37ba2f]<br>
+[[MediaWiki_talk:ce5828a8|Talk]]
+</td><td>
+M
+</td><td>
+{{int:ce5828a8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1e3a3f5e&action=edit abf0b01a]<br>
+[[MediaWiki_talk:1e3a3f5e|Talk]]
+</td><td>
+Pages with misspellings
+</td><td>
+{{int:1e3a3f5e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18c50601&action=edit 4841b1be]<br>
+[[MediaWiki_talk:18c50601|Talk]]
+</td><td>
+List of common misspellings
+</td><td>
+{{int:18c50601}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ff661e66&action=edit 20eeb250]<br>
+[[MediaWiki_talk:ff661e66|Talk]]
+</td><td>
+The following pages contain a common misspelling, which are listed on $1. The correct spelling might be given (like this).
+</td><td>
+{{int:ff661e66}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77dd649d&action=edit 28d8d2f3]<br>
+[[MediaWiki_talk:77dd649d|Talk]]
+</td><td>
+The database did not find the text of a page
+that it should have found, named &quot;$1&quot;.
+
+&lt;p&gt;This is usually caused by following an outdated diff or history link to a
+page that has been deleted.
+
+&lt;p&gt;If this is not the case, you may have found a bug in the software.
+Please report this to an administrator, making note of the URL.
+</td><td>
+{{int:77dd649d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:43bf0acd&action=edit d6472ac8]<br>
+[[MediaWiki_talk:43bf0acd|Talk]]
+</td><td>
+&lt;b&gt;Missing image&lt;/b&gt;&lt;br /&gt;&lt;i&gt;$1&lt;/i&gt;
+
+</td><td>
+{{int:43bf0acd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75c0518a&action=edit f433e9c8]<br>
+[[MediaWiki_talk:75c0518a|Talk]]
+</td><td>
+Missing Language Links
+</td><td>
+{{int:75c0518a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5ef61b91&action=edit a4a9fdcd]<br>
+[[MediaWiki_talk:5ef61b91|Talk]]
+</td><td>
+Find missing language links for
+</td><td>
+{{int:5ef61b91}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f5affad8&action=edit e46ff038]<br>
+[[MediaWiki_talk:f5affad8|Talk]]
+</td><td>
+These pages do &lt;i&gt;not&lt;/i&gt; link to their counterpart in $1. Redirects and subpages are &lt;i&gt;not&lt;/i&gt; shown.
+</td><td>
+{{int:f5affad8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22e2c957&action=edit b43c02b9]<br>
+[[MediaWiki_talk:22e2c957|Talk]]
+</td><td>
+More...
+</td><td>
+{{int:22e2c957}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:76cdb950&action=edit 379d6ce9]<br>
+[[MediaWiki_talk:76cdb950|Talk]]
+</td><td>
+Move
+</td><td>
+{{int:76cdb950}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31d22872&action=edit d55a3c2a]<br>
+[[MediaWiki_talk:31d22872|Talk]]
+</td><td>
+Move page
+</td><td>
+{{int:31d22872}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb280ed2&action=edit 0bd0c880]<br>
+[[MediaWiki_talk:fb280ed2|Talk]]
+</td><td>
+moved to
+</td><td>
+{{int:fb280ed2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8ddc20a0&action=edit 7c041d6e]<br>
+[[MediaWiki_talk:8ddc20a0|Talk]]
+</td><td>
+Not logged in
+</td><td>
+{{int:8ddc20a0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:75985d0e&action=edit e479574b]<br>
+[[MediaWiki_talk:75985d0e|Talk]]
+</td><td>
+You must be a registered user and &lt;a href=&quot;/wiki/Special:Userlogin&quot;&gt;logged in&lt;/a&gt;
+to move a page.
+</td><td>
+{{int:75985d0e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:addffb42&action=edit 0f05ab2b]<br>
+[[MediaWiki_talk:addffb42|Talk]]
+</td><td>
+Move page
+</td><td>
+{{int:addffb42}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f9e8dfc&action=edit 0311d79b]<br>
+[[MediaWiki_talk:6f9e8dfc|Talk]]
+</td><td>
+Move page
+</td><td>
+{{int:6f9e8dfc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:993d5ce8&action=edit 53ab3d1c]<br>
+[[MediaWiki_talk:993d5ce8|Talk]]
+</td><td>
+The associated talk page, if any, will be automatically moved along with it &#39;&#39;&#39;unless:&#39;&#39;&#39;
+*You are moving the page across namespaces,
+*A non-empty talk page already exists under the new name, or
+*You uncheck the box below.
+
+In those cases, you will have to move or merge the page manually if desired.
+</td><td>
+{{int:993d5ce8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce6bc0ee&action=edit a363312c]<br>
+[[MediaWiki_talk:ce6bc0ee|Talk]]
+</td><td>
+Using the form below will rename a page, moving all
+of its history to the new name.
+The old title will become a redirect page to the new title.
+Links to the old page title will not be changed; be sure to
+&#91;&#91;Special:Maintenance&#124;check]] for double or broken redirects.
+You are responsible for making sure that links continue to
+point where they are supposed to go.
+
+Note that the page will &#39;&#39;&#39;not&#39;&#39;&#39; be moved if there is already
+a page at the new title, unless it is empty or a redirect and has no
+past edit history. This means that you can rename a page back to where
+it was just renamed from if you make a mistake, and you cannot overwrite
+an existing page.
+
+&lt;b&gt;WARNING!&lt;/b&gt;
+This can be a drastic and unexpected change for a popular page;
+please be sure you understand the consequences of this before
+proceeding.
+</td><td>
+{{int:ce6bc0ee}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e0a05db0&action=edit 7bd87d2d]<br>
+[[MediaWiki_talk:e0a05db0|Talk]]
+</td><td>
+Move &quot;talk&quot; page as well, if applicable.
+</td><td>
+{{int:e0a05db0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:689ff1e7&action=edit 2119d3ee]<br>
+[[MediaWiki_talk:689ff1e7|Talk]]
+</td><td>
+Move this page
+</td><td>
+{{int:689ff1e7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0dc37cdb&action=edit 12b6caf0]<br>
+[[MediaWiki_talk:0dc37cdb|Talk]]
+</td><td>
+My contributions
+</td><td>
+{{int:0dc37cdb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51a7215d&action=edit 5d558678]<br>
+[[MediaWiki_talk:51a7215d|Talk]]
+</td><td>
+My page
+</td><td>
+{{int:51a7215d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fbe8f485&action=edit 49886539]<br>
+[[MediaWiki_talk:fbe8f485|Talk]]
+</td><td>
+My talk
+</td><td>
+{{int:fbe8f485}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf03cf2e&action=edit ad831792]<br>
+[[MediaWiki_talk:cf03cf2e|Talk]]
+</td><td>
+Navigation
+</td><td>
+{{int:cf03cf2e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b5b13ae8&action=edit e75caf8a]<br>
+[[MediaWiki_talk:b5b13ae8|Talk]]
+</td><td>
+$1 bytes
+</td><td>
+{{int:b5b13ae8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bee99a5f&action=edit 3d7d513a]<br>
+[[MediaWiki_talk:bee99a5f|Talk]]
+</td><td>
+$1 changes
+</td><td>
+{{int:bee99a5f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:654df301&action=edit 06b1c460]<br>
+[[MediaWiki_talk:654df301|Talk]]
+</td><td>
+(New)
+</td><td>
+{{int:654df301}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1622d18&action=edit b90d5eb0]<br>
+[[MediaWiki_talk:f1622d18|Talk]]
+</td><td>
+You&#39;ve followed a link to a page that doesn&#39;t exist yet.
+To create the page, start typing in the box below
+(see the &#91;&#91;Wiktionary:Help&#124;help page]] for more info).
+If you are here by mistake, just click your browser&#39;s &#39;&#39;&#39;back&#39;&#39;&#39; button.
+</td><td>
+{{int:f1622d18}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:780ce01b&action=edit 0b08523d]<br>
+[[MediaWiki_talk:780ce01b|Talk]]
+</td><td>
+You have $1.
+</td><td>
+{{int:780ce01b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e09d8ffe&action=edit 1f028736]<br>
+[[MediaWiki_talk:e09d8ffe|Talk]]
+</td><td>
+new messages
+</td><td>
+{{int:e09d8ffe}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce656abe&action=edit d68c7e3c]<br>
+[[MediaWiki_talk:ce656abe|Talk]]
+</td><td>
+New page
+</td><td>
+{{int:ce656abe}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b886426f&action=edit d081a481]<br>
+[[MediaWiki_talk:b886426f|Talk]]
+</td><td>
+N
+</td><td>
+{{int:b886426f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2adf1ae7&action=edit eeadf049]<br>
+[[MediaWiki_talk:2adf1ae7|Talk]]
+</td><td>
+New pages
+</td><td>
+{{int:2adf1ae7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:393f8bca&action=edit f2c57870]<br>
+[[MediaWiki_talk:393f8bca|Talk]]
+</td><td>
+New password
+</td><td>
+{{int:393f8bca}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fa56bbd9&action=edit a104cc01]<br>
+[[MediaWiki_talk:fa56bbd9|Talk]]
+</td><td>
+To new title
+</td><td>
+{{int:fa56bbd9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a57c83c&action=edit 41af2ba5]<br>
+[[MediaWiki_talk:2a57c83c|Talk]]
+</td><td>
+ (new users only)
+</td><td>
+{{int:2a57c83c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc981983&action=edit edee9402]<br>
+[[MediaWiki_talk:bc981983|Talk]]
+</td><td>
+next
+</td><td>
+{{int:bc981983}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e067f51&action=edit e0bd4ddb]<br>
+[[MediaWiki_talk:5e067f51|Talk]]
+</td><td>
+next $1
+</td><td>
+{{int:5e067f51}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:61c11c45&action=edit 2b45e9af]<br>
+[[MediaWiki_talk:61c11c45|Talk]]
+</td><td>
+$1 links
+</td><td>
+{{int:61c11c45}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e307257f&action=edit f6f5e28d]<br>
+[[MediaWiki_talk:e307257f|Talk]]
+</td><td>
+You must affirm that your upload does not violate
+any copyrights.
+</td><td>
+{{int:e307257f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:335462de&action=edit 2658d031]<br>
+[[MediaWiki_talk:335462de|Talk]]
+</td><td>
+(There is currently no text in this page)
+</td><td>
+{{int:335462de}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:46716843&action=edit 68326cbc]<br>
+[[MediaWiki_talk:46716843|Talk]]
+</td><td>
+You must supply a reason for the block.
+</td><td>
+{{int:46716843}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8fa787f6&action=edit 5d122d51]<br>
+[[MediaWiki_talk:8fa787f6|Talk]]
+</td><td>
+Sorry! The wiki is experiencing some technical difficulties, and cannot contact the database server.
+</td><td>
+{{int:8fa787f6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f60d1a6d&action=edit b88f305b]<br>
+[[MediaWiki_talk:f60d1a6d|Talk]]
+</td><td>
+No changes were found matching these criteria.
+</td><td>
+{{int:f60d1a6d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9d931b8c&action=edit de736886]<br>
+[[MediaWiki_talk:9d931b8c|Talk]]
+</td><td>
+Wiktionary uses cookies to log in users. You have cookies disabled. Please enable them and try again.
+</td><td>
+{{int:9d931b8c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e4a19fc8&action=edit 71c8d192]<br>
+[[MediaWiki_talk:e4a19fc8|Talk]]
+</td><td>
+The user account was created, but you are not logged in. Wiktionary uses cookies to log in users. You have cookies disabled. Please enable them, then log in with your new username and password.
+</td><td>
+{{int:e4a19fc8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6fbb6d3a&action=edit cc61a719]<br>
+[[MediaWiki_talk:6fbb6d3a|Talk]]
+</td><td>
+Creative Commons RDF metadata disabled for this server.
+</td><td>
+{{int:6fbb6d3a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e0dd32fc&action=edit 5ed4cf16]<br>
+[[MediaWiki_talk:e0dd32fc|Talk]]
+</td><td>
+Could not select database $1
+</td><td>
+{{int:e0dd32fc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:067ee3e9&action=edit 3a58322b]<br>
+[[MediaWiki_talk:067ee3e9|Talk]]
+</td><td>
+Dublin Core RDF metadata disabled for this server.
+</td><td>
+{{int:067ee3e9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:325a917f&action=edit 4c8d93d2]<br>
+[[MediaWiki_talk:325a917f|Talk]]
+</td><td>
+There is no e-mail address recorded for user &quot;$1&quot;.
+</td><td>
+{{int:325a917f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:deb172c1&action=edit f8bace82]<br>
+[[MediaWiki_talk:deb172c1|Talk]]
+</td><td>
+This user has not specified a valid e-mail address,
+or has chosen not to receive e-mail from other users.
+</td><td>
+{{int:deb172c1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6bd33d89&action=edit a158d61f]<br>
+[[MediaWiki_talk:6bd33d89|Talk]]
+</td><td>
+No e-mail address
+</td><td>
+{{int:6bd33d89}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e68327b0&action=edit 36552107]<br>
+[[MediaWiki_talk:e68327b0|Talk]]
+</td><td>
+No page with this exact title exists, trying full text search.
+</td><td>
+{{int:e68327b0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:90c1625a&action=edit 8d231ce4]<br>
+[[MediaWiki_talk:90c1625a|Talk]]
+</td><td>
+There is no edit history for this page.
+</td><td>
+{{int:90c1625a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13e13fa2&action=edit e63b6d19]<br>
+[[MediaWiki_talk:13e13fa2|Talk]]
+</td><td>
+No pages link to here.
+</td><td>
+{{int:13e13fa2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5c3c99a8&action=edit 1e827a30]<br>
+[[MediaWiki_talk:5c3c99a8|Talk]]
+</td><td>
+There are no pages that link to this image.
+</td><td>
+{{int:5c3c99a8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d9ff75a4&action=edit e21bfc14]<br>
+[[MediaWiki_talk:d9ff75a4|Talk]]
+</td><td>
+You have not specified a valid user name.
+</td><td>
+{{int:d9ff75a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f7d27b0c&action=edit 5db654d1]<br>
+[[MediaWiki_talk:f7d27b0c|Talk]]
+</td><td>
+&lt;strong&gt;Note&lt;/strong&gt;: unsuccessful searches are
+often caused by searching for common words like &quot;have&quot; and &quot;from&quot;,
+which are not indexed, or by specifying more than one search term (only pages
+containing all of the search terms will appear in the result).
+</td><td>
+{{int:f7d27b0c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d5f565dd&action=edit aaaac807]<br>
+[[MediaWiki_talk:d5f565dd|Talk]]
+</td><td>
+You have requested a special page that is not
+recognized by the wiki.
+</td><td>
+{{int:d5f565dd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:247c2db2&action=edit 273b8154]<br>
+[[MediaWiki_talk:247c2db2|Talk]]
+</td><td>
+No such action
+</td><td>
+{{int:247c2db2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0e2f696c&action=edit e8773306]<br>
+[[MediaWiki_talk:0e2f696c|Talk]]
+</td><td>
+The action specified by the URL is not
+recognized by the wiki
+</td><td>
+{{int:0e2f696c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd0d7ac6&action=edit b98c7c10]<br>
+[[MediaWiki_talk:bd0d7ac6|Talk]]
+</td><td>
+No such special page
+</td><td>
+{{int:bd0d7ac6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22012b0a&action=edit f542883d]<br>
+[[MediaWiki_talk:22012b0a|Talk]]
+</td><td>
+There is no user by the name &quot;$1&quot;.
+Check your spelling, or use the form below to create a new user account.
+</td><td>
+{{int:22012b0a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:982342c7&action=edit f4909824]<br>
+[[MediaWiki_talk:982342c7|Talk]]
+</td><td>
+The wiki server can&#39;t provide data in a format your client can read.
+</td><td>
+{{int:982342c7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:272cfb97&action=edit cdb5d3a9]<br>
+[[MediaWiki_talk:272cfb97|Talk]]
+</td><td>
+Not a content page
+</td><td>
+{{int:272cfb97}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8ccaecd6&action=edit 42534913]<br>
+[[MediaWiki_talk:8ccaecd6|Talk]]
+</td><td>
+You have not specified a target page or user
+to perform this function on.
+</td><td>
+{{int:8ccaecd6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4532ec15&action=edit dff62a20]<br>
+[[MediaWiki_talk:4532ec15|Talk]]
+</td><td>
+No target
+</td><td>
+{{int:4532ec15}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2c924e30&action=edit c51048b7]<br>
+[[MediaWiki_talk:2c924e30|Talk]]
+</td><td>
+&lt;strong&gt;Note:&lt;/strong&gt;
+</td><td>
+{{int:2c924e30}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51c2043b&action=edit 879701e9]<br>
+[[MediaWiki_talk:51c2043b|Talk]]
+</td><td>
+No page text matches
+</td><td>
+{{int:51c2043b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f3befe0&action=edit 5a56ca1b]<br>
+[[MediaWiki_talk:6f3befe0|Talk]]
+</td><td>
+No page title matches
+</td><td>
+{{int:6f3befe0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:219a05e4&action=edit 02bcadd3]<br>
+[[MediaWiki_talk:219a05e4|Talk]]
+</td><td>
+Not logged in
+</td><td>
+{{int:219a05e4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28b54fd2&action=edit ba736b7f]<br>
+[[MediaWiki_talk:28b54fd2|Talk]]
+</td><td>
+You have no items on your watchlist.
+</td><td>
+{{int:28b54fd2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a78319d8&action=edit 2398990d]<br>
+[[MediaWiki_talk:a78319d8|Talk]]
+</td><td>
+Insert non-formatted text here
+</td><td>
+{{int:a78319d8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:20d39be1&action=edit cf8602ad]<br>
+[[MediaWiki_talk:20d39be1|Talk]]
+</td><td>
+Ignore wiki formatting
+</td><td>
+{{int:20d39be1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dee84866&action=edit 7a6336e0]<br>
+[[MediaWiki_talk:dee84866|Talk]]
+</td><td>
+Category
+</td><td>
+{{int:dee84866}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3e0d95e&action=edit 16b32116]<br>
+[[MediaWiki_talk:a3e0d95e|Talk]]
+</td><td>
+Help
+</td><td>
+{{int:a3e0d95e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:911dff1f&action=edit 081e450a]<br>
+[[MediaWiki_talk:911dff1f|Talk]]
+</td><td>
+Image
+</td><td>
+{{int:911dff1f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:931f9736&action=edit 5b9c503a]<br>
+[[MediaWiki_talk:931f9736|Talk]]
+</td><td>
+Article
+</td><td>
+{{int:931f9736}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6da2f6ae&action=edit 86e5f16d]<br>
+[[MediaWiki_talk:6da2f6ae|Talk]]
+</td><td>
+Media
+</td><td>
+{{int:6da2f6ae}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53504d48&action=edit 368d5d22]<br>
+[[MediaWiki_talk:53504d48|Talk]]
+</td><td>
+Message
+</td><td>
+{{int:53504d48}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:14d4daef&action=edit 34a2cba3]<br>
+[[MediaWiki_talk:14d4daef|Talk]]
+</td><td>
+Special
+</td><td>
+{{int:14d4daef}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ed2e8b27&action=edit a1024e18]<br>
+[[MediaWiki_talk:ed2e8b27|Talk]]
+</td><td>
+Template
+</td><td>
+{{int:ed2e8b27}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:31ebc74b&action=edit 313f5ee2]<br>
+[[MediaWiki_talk:31ebc74b|Talk]]
+</td><td>
+User page
+</td><td>
+{{int:31ebc74b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a8d28daa&action=edit 0611a13e]<br>
+[[MediaWiki_talk:a8d28daa|Talk]]
+</td><td>
+About
+</td><td>
+{{int:a8d28daa}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b0a98216&action=edit 7a85f476]<br>
+[[MediaWiki_talk:b0a98216|Talk]]
+</td><td>
+OK
+</td><td>
+{{int:b0a98216}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e081cf87&action=edit 23ace733]<br>
+[[MediaWiki_talk:e081cf87|Talk]]
+</td><td>
+Old password
+</td><td>
+{{int:e081cf87}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:db6998a7&action=edit dc894908]<br>
+[[MediaWiki_talk:db6998a7|Talk]]
+</td><td>
+orig
+</td><td>
+{{int:db6998a7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb5dc4a4&action=edit 89f56e51]<br>
+[[MediaWiki_talk:cb5dc4a4|Talk]]
+</td><td>
+Orphaned pages
+</td><td>
+{{int:cb5dc4a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51caf0b1&action=edit e6287b24]<br>
+[[MediaWiki_talk:51caf0b1|Talk]]
+</td><td>
+Based on work by $1.
+</td><td>
+{{int:51caf0b1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:838fda53&action=edit f953cc13]<br>
+[[MediaWiki_talk:838fda53|Talk]]
+</td><td>
+Other languages
+</td><td>
+{{int:838fda53}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8b80dc12&action=edit 06b2b863]<br>
+[[MediaWiki_talk:8b80dc12|Talk]]
+</td><td>
+Move succeeded
+</td><td>
+{{int:8b80dc12}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:67c1c9b9&action=edit 6df06888]<br>
+[[MediaWiki_talk:67c1c9b9|Talk]]
+</td><td>
+Page &quot;&#91;&#91;$1]]&quot; moved to &quot;&#91;&#91;$2]]&quot;.
+</td><td>
+{{int:67c1c9b9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0488d9f9&action=edit ca0a1736]<br>
+[[MediaWiki_talk:0488d9f9|Talk]]
+</td><td>
+$1 - Wiktionary
+</td><td>
+{{int:0488d9f9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:724220c3&action=edit 00c46482]<br>
+[[MediaWiki_talk:724220c3|Talk]]
+</td><td>
+Someone (probably you, from IP address $1)
+requested that we send you a new Wiktionary login password.
+The password for user &quot;$2&quot; is now &quot;$3&quot;.
+You should log in and change your password now.
+</td><td>
+{{int:724220c3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:67675177&action=edit 9943fd1d]<br>
+[[MediaWiki_talk:67675177|Talk]]
+</td><td>
+Password reminder from Wiktionary
+</td><td>
+{{int:67675177}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feea022e&action=edit 52c6d21a]<br>
+[[MediaWiki_talk:feea022e|Talk]]
+</td><td>
+A new password has been sent to the e-mail address
+registered for &quot;$1&quot;.
+Please log in again after you receive it.
+</td><td>
+{{int:feea022e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d89b33a4&action=edit 6148b748]<br>
+[[MediaWiki_talk:d89b33a4|Talk]]
+</td><td>
+The following data is cached and may not be completely up to date:
+</td><td>
+{{int:d89b33a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7c3d6ba1&action=edit edb94b6f]<br>
+[[MediaWiki_talk:7c3d6ba1|Talk]]
+</td><td>
+Sorry! This feature has been temporarily disabled
+because it slows the database down to the point that no one can use
+the wiki.
+</td><td>
+{{int:7c3d6ba1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ba8fb63e&action=edit 7971fbbc]<br>
+[[MediaWiki_talk:ba8fb63e|Talk]]
+</td><td>
+Here&#39;s a saved copy from $1:
+</td><td>
+{{int:ba8fb63e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1f9d5196&action=edit faae8244]<br>
+[[MediaWiki_talk:1f9d5196|Talk]]
+</td><td>
+Personal tools
+</td><td>
+{{int:1f9d5196}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b55223c7&action=edit 23f3fd77]<br>
+[[MediaWiki_talk:b55223c7|Talk]]
+</td><td>
+Community portal
+</td><td>
+{{int:b55223c7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b6100630&action=edit d69501d7]<br>
+[[MediaWiki_talk:b6100630|Talk]]
+</td><td>
+Wiktionary:Community Portal
+</td><td>
+{{int:b6100630}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:83c6e160&action=edit 7ce546d1]<br>
+[[MediaWiki_talk:83c6e160|Talk]]
+</td><td>
+Post a comment
+</td><td>
+{{int:83c6e160}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f715eef0&action=edit 03d7f055]<br>
+[[MediaWiki_talk:f715eef0|Talk]]
+</td><td>
+Wiktionary is powered by &#91;http&#58;//www.mediawiki.org/ MediaWiki], an open source wiki engine.
+</td><td>
+{{int:f715eef0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5f86f380&action=edit fe586261]<br>
+[[MediaWiki_talk:5f86f380|Talk]]
+</td><td>
+Search
+</td><td>
+{{int:5f86f380}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:02360031&action=edit 7c50040c]<br>
+[[MediaWiki_talk:02360031|Talk]]
+</td><td>
+
+Search in namespaces :&lt;br /&gt;
+$1&lt;br /&gt;
+$2 List redirects &amp;nbsp; Search for $3 $9
+</td><td>
+{{int:02360031}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9dfd349e&action=edit dcedb31d]<br>
+[[MediaWiki_talk:9dfd349e|Talk]]
+</td><td>
+Preferences
+</td><td>
+{{int:9dfd349e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6b97fde2&action=edit 4d381b11]<br>
+[[MediaWiki_talk:6b97fde2|Talk]]
+</td><td>
+* &lt;strong&gt;Real name&lt;/strong&gt; (optional): if you choose to provide it this will be used for giving you attribution for your work.&lt;br/&gt;
+* &lt;strong&gt;Email&lt;/strong&gt; (optional): Enables people to contact you through the website without you having to reveal your
+email address to them, and it can be used to send you a new password if you forget it.
+</td><td>
+{{int:6b97fde2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:30cafb20&action=edit 4413aea7]<br>
+[[MediaWiki_talk:30cafb20|Talk]]
+</td><td>
+Misc settings
+</td><td>
+{{int:30cafb20}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58796ee5&action=edit 79de347d]<br>
+[[MediaWiki_talk:58796ee5|Talk]]
+</td><td>
+User data
+</td><td>
+{{int:58796ee5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e055ac90&action=edit b8a6f738]<br>
+[[MediaWiki_talk:e055ac90|Talk]]
+</td><td>
+Recent changes and stub display
+</td><td>
+{{int:e055ac90}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0603b5a9&action=edit 3b8a7d0e]<br>
+[[MediaWiki_talk:0603b5a9|Talk]]
+</td><td>
+You are logged in as &quot;$1&quot;.
+Your internal ID number is $2.
+
+See &#91;&#91;Wiktionary:User preferences help]] for help deciphering the options.
+</td><td>
+{{int:0603b5a9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2366fb91&action=edit f2475be5]<br>
+[[MediaWiki_talk:2366fb91|Talk]]
+</td><td>
+Not logged in
+</td><td>
+{{int:2366fb91}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0389a76a&action=edit 69cb02c9]<br>
+[[MediaWiki_talk:0389a76a|Talk]]
+</td><td>
+You must be &lt;a href=&quot;/wiki/Special:Userlogin&quot;&gt;logged in&lt;/a&gt;
+to set user preferences.
+</td><td>
+{{int:0389a76a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e6216751&action=edit 2b688ff4]<br>
+[[MediaWiki_talk:e6216751|Talk]]
+</td><td>
+Preferences have been reset from storage.
+</td><td>
+{{int:e6216751}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1fbb2b4&action=edit 1aa787fe]<br>
+[[MediaWiki_talk:f1fbb2b4|Talk]]
+</td><td>
+Preview
+</td><td>
+{{int:f1fbb2b4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7357cd58&action=edit 353820b9]<br>
+[[MediaWiki_talk:7357cd58|Talk]]
+</td><td>
+This preview reflects the text in the upper
+text editing area as it will appear if you choose to save.
+</td><td>
+{{int:7357cd58}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f0bd6ebe&action=edit 2281018c]<br>
+[[MediaWiki_talk:f0bd6ebe|Talk]]
+</td><td>
+Remember that this is only a preview, and has not yet been saved!
+</td><td>
+{{int:f0bd6ebe}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c7db0778&action=edit 8b3bb669]<br>
+[[MediaWiki_talk:c7db0778|Talk]]
+</td><td>
+previous $1
+</td><td>
+{{int:c7db0778}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a67b813&action=edit e1a919ba]<br>
+[[MediaWiki_talk:0a67b813|Talk]]
+</td><td>
+Printable version
+</td><td>
+{{int:0a67b813}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc3b6f21&action=edit d4d3cccd]<br>
+[[MediaWiki_talk:dc3b6f21|Talk]]
+</td><td>
+(From http&#58;//tl.wiktionary.org)
+</td><td>
+{{int:dc3b6f21}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:016ac2dc&action=edit 145969f1]<br>
+[[MediaWiki_talk:016ac2dc|Talk]]
+</td><td>
+Protect
+</td><td>
+{{int:016ac2dc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:073135b4&action=edit bf7f9e49]<br>
+[[MediaWiki_talk:073135b4|Talk]]
+</td><td>
+Reason for protecting
+</td><td>
+{{int:073135b4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3ee691ce&action=edit 1f880b64]<br>
+[[MediaWiki_talk:3ee691ce|Talk]]
+</td><td>
+protected &#91;&#91;$1]]
+</td><td>
+{{int:3ee691ce}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a44b308c&action=edit 7afa7fea]<br>
+[[MediaWiki_talk:a44b308c|Talk]]
+</td><td>
+Protected page
+</td><td>
+{{int:a44b308c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0017a4f5&action=edit 962032da]<br>
+[[MediaWiki_talk:0017a4f5|Talk]]
+</td><td>
+WARNING: This page has been locked so that only
+users with sysop privileges can edit it. Be sure you are following the
+&lt;a href=&#39;/w/wiki.phtml/Wiktionary:Protected_page_guidelines&#39;&gt;protected page
+guidelines&lt;/a&gt;.
+</td><td>
+{{int:0017a4f5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cf2a914e&action=edit 561f00bf]<br>
+[[MediaWiki_talk:cf2a914e|Talk]]
+</td><td>
+This page has been locked to prevent editing; there are
+a number of reasons why this may be so, please see
+&#91;&#91;Wiktionary:Protected page]].
+
+You can view and copy the source of this page:
+</td><td>
+{{int:cf2a914e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bb915483&action=edit 85888484]<br>
+[[MediaWiki_talk:bb915483|Talk]]
+</td><td>
+Protection_log
+</td><td>
+{{int:bb915483}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:061ec7fa&action=edit 197cfa0d]<br>
+[[MediaWiki_talk:061ec7fa|Talk]]
+</td><td>
+Below is a list of page locks/unlocks.
+See &#91;&#91;Wiktionary:Protected page]] for more information.
+</td><td>
+{{int:061ec7fa}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d2ae1354&action=edit 33c2c02c]<br>
+[[MediaWiki_talk:d2ae1354|Talk]]
+</td><td>
+Protect page
+</td><td>
+{{int:d2ae1354}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c0e9bbaf&action=edit 5cbc043a]<br>
+[[MediaWiki_talk:c0e9bbaf|Talk]]
+</td><td>
+(give a reason)
+</td><td>
+{{int:c0e9bbaf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:23176a41&action=edit 24a81acc]<br>
+[[MediaWiki_talk:23176a41|Talk]]
+</td><td>
+(Protecting &quot;$1&quot;)
+</td><td>
+{{int:23176a41}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:884b47b3&action=edit 77ca39fa]<br>
+[[MediaWiki_talk:884b47b3|Talk]]
+</td><td>
+Protect this page
+</td><td>
+{{int:884b47b3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0ebe1928&action=edit 11599708]<br>
+[[MediaWiki_talk:0ebe1928|Talk]]
+</td><td>
+Proxy blocker
+</td><td>
+{{int:0ebe1928}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0ccb1a72&action=edit f4482395]<br>
+[[MediaWiki_talk:0ccb1a72|Talk]]
+</td><td>
+Your IP address has been blocked because it is an open proxy. Please contact your Internet service provider or tech support and inform them of this serious security problem.
+</td><td>
+{{int:0ccb1a72}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:88af6e64&action=edit 01b6671f]<br>
+[[MediaWiki_talk:88af6e64|Talk]]
+</td><td>
+Done.
+
+</td><td>
+{{int:88af6e64}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1594c4a&action=edit 596b17aa]<br>
+[[MediaWiki_talk:b1594c4a|Talk]]
+</td><td>
+Browse
+</td><td>
+{{int:b1594c4a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:25b61f80&action=edit 9e11e13b]<br>
+[[MediaWiki_talk:25b61f80|Talk]]
+</td><td>
+Edit
+</td><td>
+{{int:25b61f80}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1a9ed9d&action=edit cc717307]<br>
+[[MediaWiki_talk:e1a9ed9d|Talk]]
+</td><td>
+Find
+</td><td>
+{{int:e1a9ed9d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:24074cfc&action=edit a40d0b3f]<br>
+[[MediaWiki_talk:24074cfc|Talk]]
+</td><td>
+My pages
+</td><td>
+{{int:24074cfc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:af83fbba&action=edit 8f794a0f]<br>
+[[MediaWiki_talk:af83fbba|Talk]]
+</td><td>
+Context
+</td><td>
+{{int:af83fbba}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c8fff0e7&action=edit 20fec244]<br>
+[[MediaWiki_talk:c8fff0e7|Talk]]
+</td><td>
+This page
+</td><td>
+{{int:c8fff0e7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5a6ec2af&action=edit 2dfd6121]<br>
+[[MediaWiki_talk:5a6ec2af|Talk]]
+</td><td>
+Quickbar settings
+</td><td>
+{{int:5a6ec2af}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8eda832f&action=edit e97e9088]<br>
+[[MediaWiki_talk:8eda832f|Talk]]
+</td><td>
+Special pages
+</td><td>
+{{int:8eda832f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ce1c6b9a&action=edit dc17545e]<br>
+[[MediaWiki_talk:ce1c6b9a|Talk]]
+</td><td>
+Submit query
+</td><td>
+{{int:ce1c6b9a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:342970ff&action=edit 7f2e7314]<br>
+[[MediaWiki_talk:342970ff|Talk]]
+</td><td>
+Query successful
+</td><td>
+{{int:342970ff}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2300ac1&action=edit 08f4cb5c]<br>
+[[MediaWiki_talk:c2300ac1|Talk]]
+</td><td>
+Random page
+</td><td>
+{{int:c2300ac1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9f84f8de&action=edit 0da9559a]<br>
+[[MediaWiki_talk:9f84f8de|Talk]]
+</td><td>
+The sysop ability to create range blocks is disabled.
+</td><td>
+{{int:9f84f8de}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f65142b8&action=edit 65c24302]<br>
+[[MediaWiki_talk:f65142b8|Talk]]
+</td><td>
+in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.
+</td><td>
+{{int:f65142b8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78b9278a&action=edit 96bcbd6a]<br>
+[[MediaWiki_talk:78b9278a|Talk]]
+</td><td>
+Show last $1 changes in last $2 days&lt;br /&gt;$3
+</td><td>
+{{int:78b9278a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ead9cd8b&action=edit 69cdd5ad]<br>
+[[MediaWiki_talk:ead9cd8b|Talk]]
+</td><td>
+Show new changes starting from $1
+</td><td>
+{{int:ead9cd8b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bad8b81d&action=edit f13491ba]<br>
+[[MediaWiki_talk:bad8b81d|Talk]]
+</td><td>
+; $1 edits from logged in users
+</td><td>
+{{int:bad8b81d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:58a7c0de&action=edit ced7752e]<br>
+[[MediaWiki_talk:58a7c0de|Talk]]
+</td><td>
+Loading recent changes
+</td><td>
+{{int:58a7c0de}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c3fd1aca&action=edit d259fbf6]<br>
+[[MediaWiki_talk:c3fd1aca|Talk]]
+</td><td>
+(to pages linked from &quot;$1&quot;)
+</td><td>
+{{int:c3fd1aca}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2c0a654c&action=edit 15ea8401]<br>
+[[MediaWiki_talk:2c0a654c|Talk]]
+</td><td>
+Below are the last &lt;strong&gt;$1&lt;/strong&gt; changes in last &lt;strong&gt;$2&lt;/strong&gt; days.
+</td><td>
+{{int:2c0a654c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0a00aaba&action=edit c516366b]<br>
+[[MediaWiki_talk:0a00aaba|Talk]]
+</td><td>
+Below are the changes since &lt;b&gt;$2&lt;/b&gt; (up to &lt;b&gt;$1&lt;/b&gt; shown).
+</td><td>
+{{int:0a00aaba}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1d920fff&action=edit 9a277182]<br>
+[[MediaWiki_talk:1d920fff|Talk]]
+</td><td>
+Database locked
+</td><td>
+{{int:1d920fff}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:64743780&action=edit e5990e81]<br>
+[[MediaWiki_talk:64743780|Talk]]
+</td><td>
+The database is currently locked to new
+entries and other modifications, probably for routine database maintenance,
+after which it will be back to normal.
+The administrator who locked it offered this explanation:
+&lt;p&gt;$1
+</td><td>
+{{int:64743780}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c9d6af6&action=edit 74bcbeed]<br>
+[[MediaWiki_talk:8c9d6af6|Talk]]
+</td><td>
+WARNING: The database has been locked for maintenance,
+so you will not be able to save your edits right now. You may wish to cut-n-paste
+the text into a text file and save it for later.
+</td><td>
+{{int:8c9d6af6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4d75dd33&action=edit 51734654]<br>
+[[MediaWiki_talk:4d75dd33|Talk]]
+</td><td>
+Recent changes
+</td><td>
+{{int:4d75dd33}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40f1d259&action=edit 44d93957]<br>
+[[MediaWiki_talk:40f1d259|Talk]]
+</td><td>
+Number of titles in recent changes
+</td><td>
+{{int:40f1d259}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:312aafe1&action=edit b5822b16]<br>
+[[MediaWiki_talk:312aafe1|Talk]]
+</td><td>
+Related changes
+</td><td>
+{{int:312aafe1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f453993&action=edit 049f8c5f]<br>
+[[MediaWiki_talk:2f453993|Talk]]
+</td><td>
+Track the most recent changes to the wiki on this page.
+</td><td>
+{{int:2f453993}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7124fa4a&action=edit 43d741c1]<br>
+[[MediaWiki_talk:7124fa4a|Talk]]
+</td><td>
+(Redirected from $1)
+</td><td>
+{{int:7124fa4a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54d89323&action=edit 4eef1c9f]<br>
+[[MediaWiki_talk:54d89323|Talk]]
+</td><td>
+Remember my password across sessions.
+</td><td>
+{{int:54d89323}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:537f5507&action=edit bfa5dc98]<br>
+[[MediaWiki_talk:537f5507|Talk]]
+</td><td>
+Remove checked items from watchlist
+</td><td>
+{{int:537f5507}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:78e82769&action=edit eeadf87c]<br>
+[[MediaWiki_talk:78e82769|Talk]]
+</td><td>
+Removed from watchlist
+</td><td>
+{{int:78e82769}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ad711aa8&action=edit d9807612]<br>
+[[MediaWiki_talk:ad711aa8|Talk]]
+</td><td>
+The page &quot;$1&quot; has been removed from your watchlist.
+</td><td>
+{{int:ad711aa8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:48b0bcb6&action=edit 7d083ee5]<br>
+[[MediaWiki_talk:48b0bcb6|Talk]]
+</td><td>
+Removing requested items from watchlist...
+</td><td>
+{{int:48b0bcb6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f022894&action=edit 4b81718e]<br>
+[[MediaWiki_talk:2f022894|Talk]]
+</td><td>
+Reset preferences
+</td><td>
+{{int:2f022894}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bc47acaf&action=edit 8f8f7d13]<br>
+[[MediaWiki_talk:bc47acaf|Talk]]
+</td><td>
+$1 deleted edits
+</td><td>
+{{int:bc47acaf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6add8c15&action=edit 8f0c68f0]<br>
+[[MediaWiki_talk:6add8c15|Talk]]
+</td><td>
+Hits to show per page
+</td><td>
+{{int:6add8c15}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6f54af5b&action=edit a5e2f101]<br>
+[[MediaWiki_talk:6f54af5b|Talk]]
+</td><td>
+Retrieved from &quot;$1&quot;
+</td><td>
+{{int:6f54af5b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3dcff1b0&action=edit 58f19667]<br>
+[[MediaWiki_talk:3dcff1b0|Talk]]
+</td><td>
+Return to $1.
+</td><td>
+{{int:3dcff1b0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9ac79c6&action=edit 2b9171b6]<br>
+[[MediaWiki_talk:b9ac79c6|Talk]]
+</td><td>
+Retype new password
+</td><td>
+{{int:b9ac79c6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b7ae8f64&action=edit a3eee606]<br>
+[[MediaWiki_talk:b7ae8f64|Talk]]
+</td><td>
+Re-upload
+</td><td>
+{{int:b7ae8f64}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd783da0&action=edit d7ba5bcb]<br>
+[[MediaWiki_talk:cd783da0|Talk]]
+</td><td>
+Return to the upload form.
+</td><td>
+{{int:cd783da0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c73c43f3&action=edit f322de9a]<br>
+[[MediaWiki_talk:c73c43f3|Talk]]
+</td><td>
+Reverted to earlier revision
+</td><td>
+{{int:c73c43f3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:18591a4b&action=edit 0d86ed82]<br>
+[[MediaWiki_talk:18591a4b|Talk]]
+</td><td>
+rev
+</td><td>
+{{int:18591a4b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b24ef4f1&action=edit 8ce494ea]<br>
+[[MediaWiki_talk:b24ef4f1|Talk]]
+</td><td>
+Reverted edit of $2, changed back to last version by $1
+</td><td>
+{{int:b24ef4f1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:96e64350&action=edit 949a77c7]<br>
+[[MediaWiki_talk:96e64350|Talk]]
+</td><td>
+Revision history
+</td><td>
+{{int:96e64350}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0c299dc7&action=edit 3338672b]<br>
+[[MediaWiki_talk:0c299dc7|Talk]]
+</td><td>
+Revision as of $1
+</td><td>
+{{int:0c299dc7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:159f321a&action=edit d567812b]<br>
+[[MediaWiki_talk:159f321a|Talk]]
+</td><td>
+Revision not found
+</td><td>
+{{int:159f321a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:955fec48&action=edit 4060f114]<br>
+[[MediaWiki_talk:955fec48|Talk]]
+</td><td>
+The old revision of the page you asked for could not be found.
+Please check the URL you used to access this page.
+
+</td><td>
+{{int:955fec48}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b2f04988&action=edit e8b606c2]<br>
+[[MediaWiki_talk:b2f04988|Talk]]
+</td><td>
+http&#58;//www.faqs.org/rfcs/rfc$1.html
+</td><td>
+{{int:b2f04988}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:db94ff6b&action=edit 1407cb23]<br>
+[[MediaWiki_talk:db94ff6b|Talk]]
+</td><td>
+Rights:
+</td><td>
+{{int:db94ff6b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f28daee2&action=edit ff3a6f3b]<br>
+[[MediaWiki_talk:f28daee2|Talk]]
+</td><td>
+Roll back edits
+</td><td>
+{{int:f28daee2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2aaec24c&action=edit 5f0fa7e7]<br>
+[[MediaWiki_talk:2aaec24c|Talk]]
+</td><td>
+Rollback
+</td><td>
+{{int:2aaec24c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:54d37a4c&action=edit 73c685e6]<br>
+[[MediaWiki_talk:54d37a4c|Talk]]
+</td><td>
+Rollback failed
+</td><td>
+{{int:54d37a4c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b82a8f42&action=edit 1a9fae49]<br>
+[[MediaWiki_talk:b82a8f42|Talk]]
+</td><td>
+rollback
+</td><td>
+{{int:b82a8f42}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:52d0b352&action=edit 6c30d261]<br>
+[[MediaWiki_talk:52d0b352|Talk]]
+</td><td>
+Rows
+</td><td>
+{{int:52d0b352}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5a43014e&action=edit 1308cde0]<br>
+[[MediaWiki_talk:5a43014e|Talk]]
+</td><td>
+Save page
+</td><td>
+{{int:5a43014e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0e53fdc8&action=edit 5f6543d0]<br>
+[[MediaWiki_talk:0e53fdc8|Talk]]
+</td><td>
+Your preferences have been saved.
+</td><td>
+{{int:0e53fdc8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1415b15&action=edit d6d40a58]<br>
+[[MediaWiki_talk:e1415b15|Talk]]
+</td><td>
+Save file
+</td><td>
+{{int:e1415b15}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ad98e68e&action=edit 34ac956e]<br>
+[[MediaWiki_talk:ad98e68e|Talk]]
+</td><td>
+Save preferences
+</td><td>
+{{int:ad98e68e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bce06414&action=edit 3559d7ac]<br>
+[[MediaWiki_talk:bce06414|Talk]]
+</td><td>
+Search
+</td><td>
+{{int:bce06414}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f6495a7&action=edit cfa0722d]<br>
+[[MediaWiki_talk:8f6495a7|Talk]]
+</td><td>
+&lt;p&gt;Sorry! Full text search has been disabled temporarily, for performance reasons. In the meantime, you can use the Google search below, which may be out of date.&lt;/p&gt;
+</td><td>
+{{int:8f6495a7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:72344e87&action=edit 3eea6ce4]<br>
+[[MediaWiki_talk:72344e87|Talk]]
+</td><td>
+Wiktionary:Searching
+</td><td>
+{{int:72344e87}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb9c1653&action=edit da48347f]<br>
+[[MediaWiki_talk:cb9c1653|Talk]]
+</td><td>
+Searching Wiktionary
+</td><td>
+{{int:cb9c1653}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d79ca88&action=edit 64bdca9a]<br>
+[[MediaWiki_talk:3d79ca88|Talk]]
+</td><td>
+For query &quot;$1&quot;
+</td><td>
+{{int:3d79ca88}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b2f7c0e1&action=edit 8ef6d4d3]<br>
+[[MediaWiki_talk:b2f7c0e1|Talk]]
+</td><td>
+Search results
+</td><td>
+{{int:b2f7c0e1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e5ed9018&action=edit 83d578cd]<br>
+[[MediaWiki_talk:e5ed9018|Talk]]
+</td><td>
+Search result settings
+</td><td>
+{{int:e5ed9018}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8cab5350&action=edit 781b9fee]<br>
+[[MediaWiki_talk:8cab5350|Talk]]
+</td><td>
+For more information about searching Wiktionary, see $1.
+</td><td>
+{{int:8cab5350}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:37b6df63&action=edit a26b768d]<br>
+[[MediaWiki_talk:37b6df63|Talk]]
+</td><td>
+ (section)
+</td><td>
+{{int:37b6df63}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:be4aaa62&action=edit 2ddce298]<br>
+[[MediaWiki_talk:be4aaa62|Talk]]
+</td><td>
+Select a newer version for comparison
+</td><td>
+{{int:be4aaa62}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5124db4d&action=edit 80ffa0cb]<br>
+[[MediaWiki_talk:5124db4d|Talk]]
+</td><td>
+Select an older version for comparison
+</td><td>
+{{int:5124db4d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a3c0a747&action=edit 5ec1b504]<br>
+[[MediaWiki_talk:a3c0a747|Talk]]
+</td><td>
+Only read-only queries are allowed.
+</td><td>
+{{int:a3c0a747}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e93eec9e&action=edit 06cf46b3]<br>
+[[MediaWiki_talk:e93eec9e|Talk]]
+</td><td>
+Pages with Self Links
+</td><td>
+{{int:e93eec9e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f993dd01&action=edit e7caf074]<br>
+[[MediaWiki_talk:f993dd01|Talk]]
+</td><td>
+The following pages contain a link to themselves, which they should not.
+</td><td>
+{{int:f993dd01}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fa56e16c&action=edit 249c203d]<br>
+[[MediaWiki_talk:fa56e16c|Talk]]
+</td><td>
+There were serious xhtml markup errors detected by tidy.
+</td><td>
+{{int:fa56e16c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5123f28d&action=edit 8fcf47da]<br>
+[[MediaWiki_talk:5123f28d|Talk]]
+</td><td>
+Server time is now
+</td><td>
+{{int:5123f28d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4075f71a&action=edit 79d35179]<br>
+[[MediaWiki_talk:4075f71a|Talk]]
+</td><td>
+&lt;b&gt;User rights for &quot;$1&quot; could not be set. (Did you enter the name correctly?)&lt;/b&gt;
+</td><td>
+{{int:4075f71a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13187ffc&action=edit f2cd2a2a]<br>
+[[MediaWiki_talk:13187ffc|Talk]]
+</td><td>
+Set user rights
+</td><td>
+{{int:13187ffc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56640761&action=edit c5bfd68a]<br>
+[[MediaWiki_talk:56640761|Talk]]
+</td><td>
+Set bureaucrat flag
+</td><td>
+{{int:56640761}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d3f883b&action=edit fff9c94a]<br>
+[[MediaWiki_talk:0d3f883b|Talk]]
+</td><td>
+Short pages
+</td><td>
+{{int:0d3f883b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d97d1ee3&action=edit 9fb29051]<br>
+[[MediaWiki_talk:d97d1ee3|Talk]]
+</td><td>
+show
+</td><td>
+{{int:d97d1ee3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f1a75ecf&action=edit 4fe654c7]<br>
+[[MediaWiki_talk:f1a75ecf|Talk]]
+</td><td>
+$1 minor edits &#124; $2 bots &#124; $3 logged in users
+</td><td>
+{{int:f1a75ecf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:72fad336&action=edit 9569cf23]<br>
+[[MediaWiki_talk:72fad336|Talk]]
+</td><td>
+Showing below &lt;b&gt;$1&lt;/b&gt; results starting with #&lt;b&gt;$2&lt;/b&gt;.
+</td><td>
+{{int:72fad336}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6db37657&action=edit f7535b52]<br>
+[[MediaWiki_talk:6db37657|Talk]]
+</td><td>
+Showing below &lt;b&gt;$3&lt;/b&gt; results starting with #&lt;b&gt;$2&lt;/b&gt;.
+</td><td>
+{{int:6db37657}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:acbdf814&action=edit 43158759]<br>
+[[MediaWiki_talk:acbdf814|Talk]]
+</td><td>
+Show last $1 images sorted $2.
+</td><td>
+{{int:acbdf814}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:915318a0&action=edit ac2b4c32]<br>
+[[MediaWiki_talk:915318a0|Talk]]
+</td><td>
+Show preview
+</td><td>
+{{int:915318a0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cfff5a5a&action=edit 6eeee3cb]<br>
+[[MediaWiki_talk:cfff5a5a|Talk]]
+</td><td>
+show
+</td><td>
+{{int:cfff5a5a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ac617b53&action=edit 1144c9d9]<br>
+[[MediaWiki_talk:ac617b53|Talk]]
+</td><td>
+Your signature with timestamp
+</td><td>
+{{int:ac617b53}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6baa6ad&action=edit 7f5726ac]<br>
+[[MediaWiki_talk:f6baa6ad|Talk]]
+</td><td>
+Site statistics
+</td><td>
+{{int:f6baa6ad}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e150b0f4&action=edit 8e86f95d]<br>
+[[MediaWiki_talk:e150b0f4|Talk]]
+</td><td>
+There are &#39;&#39;&#39;$1&#39;&#39;&#39; total pages in the database.
+This includes &quot;talk&quot; pages, pages about Wiktionary, minimal &quot;stub&quot;
+pages, redirects, and others that probably don&#39;t qualify as content pages.
+Excluding those, there are &#39;&#39;&#39;$2&#39;&#39;&#39; pages that are probably legitimate
+content pages.
+
+There have been a total of &#39;&#39;&#39;$3&#39;&#39;&#39; page views, and &#39;&#39;&#39;$4&#39;&#39;&#39; page edits
+since the wiki was setup.
+That comes to &#39;&#39;&#39;$5&#39;&#39;&#39; average edits per page, and &#39;&#39;&#39;$6&#39;&#39;&#39; views per edit.
+</td><td>
+{{int:e150b0f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:daaf7240&action=edit 8dca090f]<br>
+[[MediaWiki_talk:daaf7240|Talk]]
+</td><td>
+The Free Encyclopedia
+</td><td>
+{{int:daaf7240}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b434c6d&action=edit 32b42c53]<br>
+[[MediaWiki_talk:3b434c6d|Talk]]
+</td><td>
+Donations
+</td><td>
+{{int:3b434c6d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d75649ef&action=edit d88e8164]<br>
+[[MediaWiki_talk:d75649ef|Talk]]
+</td><td>
+Wiktionary
+</td><td>
+{{int:d75649ef}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cb06d8a3&action=edit b64ec710]<br>
+[[MediaWiki_talk:cb06d8a3|Talk]]
+</td><td>
+Wiktionary user $1
+</td><td>
+{{int:cb06d8a3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d25d37c8&action=edit 4f548531]<br>
+[[MediaWiki_talk:d25d37c8|Talk]]
+</td><td>
+Wiktionary user(s) $1
+</td><td>
+{{int:d25d37c8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8f57bd61&action=edit d0cb2acd]<br>
+[[MediaWiki_talk:8f57bd61|Talk]]
+</td><td>
+Skin
+</td><td>
+{{int:8f57bd61}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d3a6dd4e&action=edit bcd196f9]<br>
+[[MediaWiki_talk:d3a6dd4e|Talk]]
+</td><td>
+The page you wanted to save was blocked by the spam filter. This is probably caused by a link to an external site.
+
+You might want to check the following regular expression for patterns that are currently blocked:
+</td><td>
+{{int:d3a6dd4e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:add33980&action=edit 60a90929]<br>
+[[MediaWiki_talk:add33980|Talk]]
+</td><td>
+Spam protection filter
+</td><td>
+{{int:add33980}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:984c6817&action=edit 25255195]<br>
+[[MediaWiki_talk:984c6817|Talk]]
+</td><td>
+Special Page
+</td><td>
+{{int:984c6817}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b67d51d8&action=edit 62bc32dc]<br>
+[[MediaWiki_talk:b67d51d8|Talk]]
+</td><td>
+Special pages
+</td><td>
+{{int:b67d51d8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c9709132&action=edit 73ac2b41]<br>
+[[MediaWiki_talk:c9709132|Talk]]
+</td><td>
+Special pages for all users
+</td><td>
+{{int:c9709132}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:87ac14f6&action=edit ed31e1e1]<br>
+[[MediaWiki_talk:87ac14f6|Talk]]
+</td><td>
+Please note that all queries are logged.
+</td><td>
+{{int:87ac14f6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:00c261e1&action=edit 26cb51a1]<br>
+[[MediaWiki_talk:00c261e1|Talk]]
+</td><td>
+Enter query
+</td><td>
+{{int:00c261e1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2086b21f&action=edit 3d18b2ea]<br>
+[[MediaWiki_talk:2086b21f|Talk]]
+</td><td>
+Statistics
+</td><td>
+{{int:2086b21f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8cd0c85e&action=edit 1b9e838c]<br>
+[[MediaWiki_talk:8cd0c85e|Talk]]
+</td><td>
+Stored version
+</td><td>
+{{int:8cd0c85e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2eb6d4bd&action=edit a5125d69]<br>
+[[MediaWiki_talk:2eb6d4bd|Talk]]
+</td><td>
+Threshold for stub display
+</td><td>
+{{int:2eb6d4bd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f3da206c&action=edit ef062b0e]<br>
+[[MediaWiki_talk:f3da206c|Talk]]
+</td><td>
+Subcategories
+</td><td>
+{{int:f3da206c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d183dbd&action=edit 335ce16b]<br>
+[[MediaWiki_talk:8d183dbd|Talk]]
+</td><td>
+Subject/headline
+</td><td>
+{{int:8d183dbd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ca29f2df&action=edit d7084ef8]<br>
+[[MediaWiki_talk:ca29f2df|Talk]]
+</td><td>
+View subject
+</td><td>
+{{int:ca29f2df}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:17bc3900&action=edit 3dfd0f51]<br>
+[[MediaWiki_talk:17bc3900|Talk]]
+</td><td>
+Successful upload
+</td><td>
+{{int:17bc3900}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:12b71c3e&action=edit 05535ecf]<br>
+[[MediaWiki_talk:12b71c3e|Talk]]
+</td><td>
+Summary
+</td><td>
+{{int:12b71c3e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ee858d9a&action=edit fde4e0f4]<br>
+[[MediaWiki_talk:ee858d9a|Talk]]
+</td><td>
+For sysop use only
+</td><td>
+{{int:ee858d9a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2f758a39&action=edit 85232d4f]<br>
+[[MediaWiki_talk:2f758a39|Talk]]
+</td><td>
+The action you have requested can only be
+performed by users with &quot;sysop&quot; status.
+See $1.
+</td><td>
+{{int:2f758a39}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:91b8467b&action=edit 3265b18d]<br>
+[[MediaWiki_talk:91b8467b|Talk]]
+</td><td>
+Sysop access required
+</td><td>
+{{int:91b8467b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77b9c5ad&action=edit 109e51e1]<br>
+[[MediaWiki_talk:77b9c5ad|Talk]]
+</td><td>
+table
+</td><td>
+{{int:77b9c5ad}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4e6a710d&action=edit e55e91b2]<br>
+[[MediaWiki_talk:4e6a710d|Talk]]
+</td><td>
+Discussion
+</td><td>
+{{int:4e6a710d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c11ac522&action=edit 1ed6d2b4]<br>
+[[MediaWiki_talk:c11ac522|Talk]]
+</td><td>
+The page itself was moved successfully, but the
+talk page could not be moved because one already exists at the new
+title. Please merge them manually.
+</td><td>
+{{int:c11ac522}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6a38ff98&action=edit 3c940bbf]<br>
+[[MediaWiki_talk:6a38ff98|Talk]]
+</td><td>
+Discuss this page
+</td><td>
+{{int:6a38ff98}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2b630ea0&action=edit f053e191]<br>
+[[MediaWiki_talk:2b630ea0|Talk]]
+</td><td>
+The corresponding talk page was also moved.
+</td><td>
+{{int:2b630ea0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2282b1ca&action=edit f3b6a64f]<br>
+[[MediaWiki_talk:2282b1ca|Talk]]
+</td><td>
+The corresponding talk page was &lt;strong&gt;not&lt;/strong&gt; moved.
+</td><td>
+{{int:2282b1ca}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:45e3f76d&action=edit 6534acb5]<br>
+[[MediaWiki_talk:45e3f76d|Talk]]
+</td><td>
+&lt;!-- MediaWiki:talkpagetext --&gt;
+</td><td>
+{{int:45e3f76d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:607359f2&action=edit 5788df25]<br>
+[[MediaWiki_talk:607359f2|Talk]]
+</td><td>
+Textbox dimensions
+</td><td>
+{{int:607359f2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:66571fbc&action=edit 7d66aa0e]<br>
+[[MediaWiki_talk:66571fbc|Talk]]
+</td><td>
+Page text matches
+</td><td>
+{{int:66571fbc}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1f36741&action=edit 83f663ed]<br>
+[[MediaWiki_talk:e1f36741|Talk]]
+</td><td>
+View or restore $1?
+</td><td>
+{{int:e1f36741}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a29f027b&action=edit a299730b]<br>
+[[MediaWiki_talk:a29f027b|Talk]]
+</td><td>
+Enlarge
+</td><td>
+{{int:a29f027b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9ced4850&action=edit 36ee6f56]<br>
+[[MediaWiki_talk:9ced4850|Talk]]
+</td><td>
+Time zone
+</td><td>
+{{int:9ced4850}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ca45a968&action=edit 9dba4eb8]<br>
+[[MediaWiki_talk:ca45a968|Talk]]
+</td><td>
+Offset
+</td><td>
+{{int:ca45a968}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:60bc3c41&action=edit 3f58a2a9]<br>
+[[MediaWiki_talk:60bc3c41|Talk]]
+</td><td>
+Enter number of hours your local time differs
+from server time (UTC).
+</td><td>
+{{int:60bc3c41}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2618febd&action=edit e3f5384c]<br>
+[[MediaWiki_talk:2618febd|Talk]]
+</td><td>
+Article title matches
+</td><td>
+{{int:2618febd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8684fcf&action=edit 2a609230]<br>
+[[MediaWiki_talk:b8684fcf|Talk]]
+</td><td>
+Table of contents
+</td><td>
+{{int:b8684fcf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:692107c0&action=edit d75ba923]<br>
+[[MediaWiki_talk:692107c0|Talk]]
+</td><td>
+Toolbox
+</td><td>
+{{int:692107c0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b9116941&action=edit 04ced041]<br>
+[[MediaWiki_talk:b9116941|Talk]]
+</td><td>
+Add a comment to this page. &#91;alt-+]
+</td><td>
+{{int:b9116941}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b583d36c&action=edit b987f993]<br>
+[[MediaWiki_talk:b583d36c|Talk]]
+</td><td>
+Discussion about edits from this ip address &#91;alt-n]
+</td><td>
+{{int:b583d36c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9efcbe2f&action=edit e3522c89]<br>
+[[MediaWiki_talk:9efcbe2f|Talk]]
+</td><td>
+The user page for the ip you&#39;re editing as &#91;alt-.]
+</td><td>
+{{int:9efcbe2f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a4b9eea&action=edit f3025f7a]<br>
+[[MediaWiki_talk:2a4b9eea|Talk]]
+</td><td>
+View the content page &#91;alt-a]
+</td><td>
+{{int:2a4b9eea}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dcd3ca0c&action=edit e420bf33]<br>
+[[MediaWiki_talk:dcd3ca0c|Talk]]
+</td><td>
+Atom feed for this page
+</td><td>
+{{int:dcd3ca0c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d318992a&action=edit d2ae036e]<br>
+[[MediaWiki_talk:d318992a|Talk]]
+</td><td>
+See the differences between the two selected versions of this page. &#91;alt-v]
+</td><td>
+{{int:d318992a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:17165e38&action=edit 2039dc44]<br>
+[[MediaWiki_talk:17165e38|Talk]]
+</td><td>
+View the list of contributions of this user
+</td><td>
+{{int:17165e38}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:32bcbdd6&action=edit d57ba9d6]<br>
+[[MediaWiki_talk:32bcbdd6|Talk]]
+</td><td>
+Find background information on current events
+</td><td>
+{{int:32bcbdd6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1488dbf&action=edit 742e0c2a]<br>
+[[MediaWiki_talk:b1488dbf|Talk]]
+</td><td>
+Delete this page &#91;alt-d]
+</td><td>
+{{int:b1488dbf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c519c79&action=edit 6b354128]<br>
+[[MediaWiki_talk:8c519c79|Talk]]
+</td><td>
+You can edit this page. Please use the preview button before saving. &#91;alt-e]
+</td><td>
+{{int:8c519c79}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d61f42ac&action=edit 6a333373]<br>
+[[MediaWiki_talk:d61f42ac|Talk]]
+</td><td>
+Send a mail to this user
+</td><td>
+{{int:d61f42ac}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:691c7c4c&action=edit 1f2e0a5e]<br>
+[[MediaWiki_talk:691c7c4c|Talk]]
+</td><td>
+The place to find out.
+</td><td>
+{{int:691c7c4c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:da5d5f0e&action=edit 357e85a5]<br>
+[[MediaWiki_talk:da5d5f0e|Talk]]
+</td><td>
+Past versions of this page, &#91;alt-h]
+</td><td>
+{{int:da5d5f0e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e20e86bb&action=edit ff6db008]<br>
+[[MediaWiki_talk:e20e86bb|Talk]]
+</td><td>
+You are encouraged to log in, it is not mandatory however. &#91;alt-o]
+</td><td>
+{{int:e20e86bb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ab189540&action=edit bd25c34c]<br>
+[[MediaWiki_talk:ab189540|Talk]]
+</td><td>
+Log out &#91;alt-o]
+</td><td>
+{{int:ab189540}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8d2a8168&action=edit 9dd4b86c]<br>
+[[MediaWiki_talk:8d2a8168|Talk]]
+</td><td>
+Visit the Main Page &#91;alt-z]
+</td><td>
+{{int:8d2a8168}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7316f250&action=edit 2138d388]<br>
+[[MediaWiki_talk:7316f250|Talk]]
+</td><td>
+Mark this as a minor edit &#91;alt-i]
+</td><td>
+{{int:7316f250}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bfe45253&action=edit 00ef7343]<br>
+[[MediaWiki_talk:bfe45253|Talk]]
+</td><td>
+Move this page &#91;alt-m]
+</td><td>
+{{int:bfe45253}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2b4d858&action=edit 0bafecde]<br>
+[[MediaWiki_talk:c2b4d858|Talk]]
+</td><td>
+List of my contributions &#91;alt-y]
+</td><td>
+{{int:c2b4d858}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:22361e38&action=edit ef887076]<br>
+[[MediaWiki_talk:22361e38|Talk]]
+</td><td>
+My talk page &#91;alt-n]
+</td><td>
+{{int:22361e38}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b34e28e3&action=edit 6d66eb21]<br>
+[[MediaWiki_talk:b34e28e3|Talk]]
+</td><td>
+You don&#39;t have the permissions to move this page
+</td><td>
+{{int:b34e28e3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:dc2cdd3b&action=edit 7e77da11]<br>
+[[MediaWiki_talk:dc2cdd3b|Talk]]
+</td><td>
+About the project, what you can do, where to find things
+</td><td>
+{{int:dc2cdd3b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2032ad70&action=edit 5611ec73]<br>
+[[MediaWiki_talk:2032ad70|Talk]]
+</td><td>
+My preferences
+</td><td>
+{{int:2032ad70}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d87a6e27&action=edit 71b5f228]<br>
+[[MediaWiki_talk:d87a6e27|Talk]]
+</td><td>
+Preview your changes, please use this before saving! &#91;alt-p]
+</td><td>
+{{int:d87a6e27}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:44edd577&action=edit fa1fc302]<br>
+[[MediaWiki_talk:44edd577|Talk]]
+</td><td>
+Protect this page &#91;alt-=]
+</td><td>
+{{int:44edd577}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:aa67a70a&action=edit f2eedbde]<br>
+[[MediaWiki_talk:aa67a70a|Talk]]
+</td><td>
+Load a random page &#91;alt-x]
+</td><td>
+{{int:aa67a70a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a5de539f&action=edit cafd58f7]<br>
+[[MediaWiki_talk:a5de539f|Talk]]
+</td><td>
+The list of recent changes in the wiki. &#91;alt-r]
+</td><td>
+{{int:a5de539f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47cd8236&action=edit ccab4d0f]<br>
+[[MediaWiki_talk:47cd8236|Talk]]
+</td><td>
+Recent changes in pages linking to this page &#91;alt-c]
+</td><td>
+{{int:47cd8236}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:82964371&action=edit 53235bed]<br>
+[[MediaWiki_talk:82964371|Talk]]
+</td><td>
+RSS feed for this page
+</td><td>
+{{int:82964371}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec76631f&action=edit 8ce4a9b9]<br>
+[[MediaWiki_talk:ec76631f|Talk]]
+</td><td>
+Save your changes &#91;alt-s]
+</td><td>
+{{int:ec76631f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6d206f30&action=edit a6413695]<br>
+[[MediaWiki_talk:6d206f30|Talk]]
+</td><td>
+Search this wiki &#91;alt-f]
+</td><td>
+{{int:6d206f30}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:65256208&action=edit c2dafa2a]<br>
+[[MediaWiki_talk:65256208|Talk]]
+</td><td>
+Support Wiktionary
+</td><td>
+{{int:65256208}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:280cc8fd&action=edit 73f9a677]<br>
+[[MediaWiki_talk:280cc8fd|Talk]]
+</td><td>
+This is a special page, you can&#39;t edit the page itself.
+</td><td>
+{{int:280cc8fd}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7c7223be&action=edit 764993b1]<br>
+[[MediaWiki_talk:7c7223be|Talk]]
+</td><td>
+List of all special pages &#91;alt-q]
+</td><td>
+{{int:7c7223be}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:06fb1d8e&action=edit cb23801a]<br>
+[[MediaWiki_talk:06fb1d8e|Talk]]
+</td><td>
+Discussion about the content page &#91;alt-t]
+</td><td>
+{{int:06fb1d8e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:341a8a32&action=edit df81e982]<br>
+[[MediaWiki_talk:341a8a32|Talk]]
+</td><td>
+Restore the $1 edits done to this page before it was deleted &#91;alt-d]
+</td><td>
+{{int:341a8a32}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:377e895f&action=edit 53f18c52]<br>
+[[MediaWiki_talk:377e895f|Talk]]
+</td><td>
+Remove this page from your watchlist &#91;alt-w]
+</td><td>
+{{int:377e895f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b1d4103e&action=edit 6143ca0f]<br>
+[[MediaWiki_talk:b1d4103e|Talk]]
+</td><td>
+Upload images or media files &#91;alt-u]
+</td><td>
+{{int:b1d4103e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3d8cae2f&action=edit 2b3a6ed0]<br>
+[[MediaWiki_talk:3d8cae2f|Talk]]
+</td><td>
+My user page &#91;alt-.]
+</td><td>
+{{int:3d8cae2f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:141dd88c&action=edit 1ef2ea9d]<br>
+[[MediaWiki_talk:141dd88c|Talk]]
+</td><td>
+This page is protected. You can view its source. &#91;alt-e]
+</td><td>
+{{int:141dd88c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:68a73399&action=edit 07e7b59d]<br>
+[[MediaWiki_talk:68a73399|Talk]]
+</td><td>
+Add this page to your watchlist &#91;alt-w]
+</td><td>
+{{int:68a73399}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56a787ff&action=edit e24666fc]<br>
+[[MediaWiki_talk:56a787ff|Talk]]
+</td><td>
+The list of pages you&#39;re monitoring for changes. &#91;alt-l]
+</td><td>
+{{int:56a787ff}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3fd46bc1&action=edit fbd416b7]<br>
+[[MediaWiki_talk:3fd46bc1|Talk]]
+</td><td>
+List of all wiki pages that link here &#91;alt-b]
+</td><td>
+{{int:3fd46bc1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:47514ec5&action=edit c48d8241]<br>
+[[MediaWiki_talk:47514ec5|Talk]]
+</td><td>
+View the last $1 changes; view the last $2 days.
+</td><td>
+{{int:47514ec5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6442d081&action=edit 0d69ac51]<br>
+[[MediaWiki_talk:6442d081|Talk]]
+</td><td>
+Below are this user&#39;s last &lt;b&gt;$1&lt;/b&gt; changes in the last &lt;b&gt;$2&lt;/b&gt; days.
+</td><td>
+{{int:6442d081}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:507d407a&action=edit f9bb6366]<br>
+[[MediaWiki_talk:507d407a|Talk]]
+</td><td>
+ (top)
+</td><td>
+{{int:507d407a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8c29ba33&action=edit 2b4842fd]<br>
+[[MediaWiki_talk:8c29ba33|Talk]]
+</td><td>
+Unblock user
+</td><td>
+{{int:8c29ba33}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3a879bdb&action=edit 98f7f719]<br>
+[[MediaWiki_talk:3a879bdb|Talk]]
+</td><td>
+Use the form below to restore write access
+to a previously blocked IP address or username.
+</td><td>
+{{int:3a879bdb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e954d285&action=edit 24e7c6e7]<br>
+[[MediaWiki_talk:e954d285|Talk]]
+</td><td>
+unblock
+</td><td>
+{{int:e954d285}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5e55820a&action=edit eecac2a2]<br>
+[[MediaWiki_talk:5e55820a|Talk]]
+</td><td>
+unblocked &quot;$1&quot;
+</td><td>
+{{int:5e55820a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9b2a9354&action=edit f690005f]<br>
+[[MediaWiki_talk:9b2a9354|Talk]]
+</td><td>
+Restore deleted page
+</td><td>
+{{int:9b2a9354}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:85cdbe83&action=edit d4adea3f]<br>
+[[MediaWiki_talk:85cdbe83|Talk]]
+</td><td>
+Undelete $1 edits
+</td><td>
+{{int:85cdbe83}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9ba522b6&action=edit c4635e76]<br>
+[[MediaWiki_talk:9ba522b6|Talk]]
+</td><td>
+Restore deleted page
+</td><td>
+{{int:9ba522b6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3346239e&action=edit 5dd4b2af]<br>
+[[MediaWiki_talk:3346239e|Talk]]
+</td><td>
+Restore!
+</td><td>
+{{int:3346239e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c2a7eb23&action=edit cf1590b6]<br>
+[[MediaWiki_talk:c2a7eb23|Talk]]
+</td><td>
+restored &quot;$1&quot;
+</td><td>
+{{int:c2a7eb23}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:40f0db7a&action=edit 5e55bc75]<br>
+[[MediaWiki_talk:40f0db7a|Talk]]
+</td><td>
+&#91;&#91;$1]] has been successfully restored.
+See &#91;&#91;Wiktionary:Deletion_log]] for a record of recent deletions and restorations.
+</td><td>
+{{int:40f0db7a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:feaa86c6&action=edit a69aad99]<br>
+[[MediaWiki_talk:feaa86c6|Talk]]
+</td><td>
+If you restore the page, all revisions will be restored to the history.
+If a new page with the same name has been created since the deletion, the restored
+revisions will appear in the prior history, and the current revision of the live page
+will not be automatically replaced.
+</td><td>
+{{int:feaa86c6}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9fa6521f&action=edit d650f0a7]<br>
+[[MediaWiki_talk:9fa6521f|Talk]]
+</td><td>
+View and restore deleted pages
+</td><td>
+{{int:9fa6521f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e99f66e&action=edit 19b68d7f]<br>
+[[MediaWiki_talk:2e99f66e|Talk]]
+</td><td>
+The following pages have been deleted but are still in the archive and
+can be restored. The archive may be periodically cleaned out.
+</td><td>
+{{int:2e99f66e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b097a89b&action=edit 2a3672ef]<br>
+[[MediaWiki_talk:b097a89b|Talk]]
+</td><td>
+Deleted revision as of $1
+</td><td>
+{{int:b097a89b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eb2694a4&action=edit d0cd3f87]<br>
+[[MediaWiki_talk:eb2694a4|Talk]]
+</td><td>
+$1 revisions archived
+</td><td>
+{{int:eb2694a4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3b67a8c9&action=edit fd2a2764]<br>
+[[MediaWiki_talk:3b67a8c9|Talk]]
+</td><td>
+Unexpected value: &quot;$1&quot;=&quot;$2&quot;.
+</td><td>
+{{int:3b67a8c9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:016b68d2&action=edit 74a8f293]<br>
+[[MediaWiki_talk:016b68d2|Talk]]
+</td><td>
+Unlock database
+</td><td>
+{{int:016b68d2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fc3080bf&action=edit ded00b4f]<br>
+[[MediaWiki_talk:fc3080bf|Talk]]
+</td><td>
+Yes, I really want to unlock the database.
+</td><td>
+{{int:fc3080bf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:4df98d29&action=edit 68a2c7e3]<br>
+[[MediaWiki_talk:4df98d29|Talk]]
+</td><td>
+Unlock database
+</td><td>
+{{int:4df98d29}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:86605aa9&action=edit eb575aa1]<br>
+[[MediaWiki_talk:86605aa9|Talk]]
+</td><td>
+Database lock removed
+</td><td>
+{{int:86605aa9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1896db20&action=edit a7a78572]<br>
+[[MediaWiki_talk:1896db20|Talk]]
+</td><td>
+The database has been unlocked.
+</td><td>
+{{int:1896db20}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bd3decce&action=edit 6b32a82f]<br>
+[[MediaWiki_talk:bd3decce|Talk]]
+</td><td>
+Unlocking the database will restore the ability of all
+users to edit pages, change their preferences, edit their watchlists, and
+other things requiring changes in the database.
+Please confirm that this is what you intend to do.
+</td><td>
+{{int:bd3decce}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d180e0d9&action=edit 116b2a3b]<br>
+[[MediaWiki_talk:d180e0d9|Talk]]
+</td><td>
+Unprotect
+</td><td>
+{{int:d180e0d9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:affff3c2&action=edit a4439c30]<br>
+[[MediaWiki_talk:affff3c2|Talk]]
+</td><td>
+Reason for unprotecting
+</td><td>
+{{int:affff3c2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b8d58125&action=edit 66029ebc]<br>
+[[MediaWiki_talk:b8d58125|Talk]]
+</td><td>
+unprotected &#91;&#91;$1]]
+</td><td>
+{{int:b8d58125}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b15ab8cb&action=edit c77cef4c]<br>
+[[MediaWiki_talk:b15ab8cb|Talk]]
+</td><td>
+(Unprotecting &quot;$1&quot;)
+</td><td>
+{{int:b15ab8cb}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:10782968&action=edit caa31f1e]<br>
+[[MediaWiki_talk:10782968|Talk]]
+</td><td>
+Unprotect this page
+</td><td>
+{{int:10782968}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:5ed67176&action=edit e17373a9]<br>
+[[MediaWiki_talk:5ed67176|Talk]]
+</td><td>
+Unused images
+</td><td>
+{{int:5ed67176}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:373709c4&action=edit 13626cea]<br>
+[[MediaWiki_talk:373709c4|Talk]]
+</td><td>
+&lt;p&gt;Please note that other web sites may link to an image with
+a direct URL, and so may still be listed here despite being
+in active use.
+</td><td>
+{{int:373709c4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:51055a00&action=edit f6f282e9]<br>
+[[MediaWiki_talk:51055a00|Talk]]
+</td><td>
+Unwatch
+</td><td>
+{{int:51055a00}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e21d3614&action=edit c7d1cd1e]<br>
+[[MediaWiki_talk:e21d3614|Talk]]
+</td><td>
+Stop watching
+</td><td>
+{{int:e21d3614}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f2f8570d&action=edit 13a1891a]<br>
+[[MediaWiki_talk:f2f8570d|Talk]]
+</td><td>
+(Updated)
+</td><td>
+{{int:f2f8570d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8bdf057f&action=edit bb73aaaf]<br>
+[[MediaWiki_talk:8bdf057f|Talk]]
+</td><td>
+Upload file
+</td><td>
+{{int:8bdf057f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0238951b&action=edit 6be1c689]<br>
+[[MediaWiki_talk:0238951b|Talk]]
+</td><td>
+Upload file
+</td><td>
+{{int:0238951b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:88f59c5a&action=edit 693f4b51]<br>
+[[MediaWiki_talk:88f59c5a|Talk]]
+</td><td>
+Sorry, uploading is disabled.
+</td><td>
+{{int:88f59c5a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7b8969f2&action=edit 7d4f03ff]<br>
+[[MediaWiki_talk:7b8969f2|Talk]]
+</td><td>
+Uploaded files
+</td><td>
+{{int:7b8969f2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:954c2a11&action=edit e57056a0]<br>
+[[MediaWiki_talk:954c2a11|Talk]]
+</td><td>
+uploaded &quot;$1&quot;
+</td><td>
+{{int:954c2a11}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:304f9593&action=edit 8f1603bd]<br>
+[[MediaWiki_talk:304f9593|Talk]]
+</td><td>
+Upload error
+</td><td>
+{{int:304f9593}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9e71a62c&action=edit 40d977b5]<br>
+[[MediaWiki_talk:9e71a62c|Talk]]
+</td><td>
+Upload images, sounds, documents etc.
+</td><td>
+{{int:9e71a62c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:955e39f9&action=edit 0bf93eec]<br>
+[[MediaWiki_talk:955e39f9|Talk]]
+</td><td>
+Upload images
+</td><td>
+{{int:955e39f9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0d39c428&action=edit 0d49abe6]<br>
+[[MediaWiki_talk:0d39c428|Talk]]
+</td><td>
+upload log
+</td><td>
+{{int:0d39c428}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1f68a0e7&action=edit 87611d30]<br>
+[[MediaWiki_talk:1f68a0e7|Talk]]
+</td><td>
+Upload_log
+</td><td>
+{{int:1f68a0e7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2a430331&action=edit 8aa7bf47]<br>
+[[MediaWiki_talk:2a430331|Talk]]
+</td><td>
+Below is a list of the most recent file uploads.
+All times shown are server time (UTC).
+&lt;ul&gt;
+&lt;/ul&gt;
+
+</td><td>
+{{int:2a430331}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:92dd3bc9&action=edit d2d8bd08]<br>
+[[MediaWiki_talk:92dd3bc9|Talk]]
+</td><td>
+Not logged in
+</td><td>
+{{int:92dd3bc9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fecdb77e&action=edit 09b01f51]<br>
+[[MediaWiki_talk:fecdb77e|Talk]]
+</td><td>
+You must be &lt;a href=&quot;/wiki/Special:Userlogin&quot;&gt;logged in&lt;/a&gt;
+to upload files.
+</td><td>
+{{int:fecdb77e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7804cb84&action=edit 85bb3caa]<br>
+[[MediaWiki_talk:7804cb84|Talk]]
+</td><td>
+&lt;strong&gt;STOP!&lt;/strong&gt; Before you upload here,
+make sure to read and follow the &lt;a href=&quot;/wiki/Special:Image_use_policy&quot;&gt;image use policy&lt;/a&gt;.
+&lt;p&gt;If a file with the name you are specifying already
+exists on the wiki, it&#39;ll be replaced without warning.
+So unless you mean to update a file, it&#39;s a good idea
+to first check if such a file exists.
+&lt;p&gt;To view or search previously uploaded images,
+go to the &lt;a href=&quot;/wiki/Special:Imagelist&quot;&gt;list of uploaded images&lt;/a&gt;.
+Uploads and deletions are logged on the &lt;a href=&quot;/wiki/Wiktionary:Upload_log&quot;&gt;upload log&lt;/a&gt;.
+&lt;/p&gt;&lt;p&gt;Use the form below to upload new image files for use in
+illustrating your pages.
+On most browsers, you will see a &quot;Browse...&quot; button, which will
+bring up your operating system&#39;s standard file open dialog.
+Choosing a file will fill the name of that file into the text
+field next to the button.
+You must also check the box affirming that you are not
+violating any copyrights by uploading the file.
+Press the &quot;Upload&quot; button to finish the upload.
+This may take some time if you have a slow internet connection.
+&lt;p&gt;The preferred formats are JPEG for photographic images, PNG
+for drawings and other iconic images, and OGG for sounds.
+Please name your files descriptively to avoid confusion.
+To include the image in a page, use a link in the form
+&lt;b&gt;&#91;&#91;Image:file.jpg]]&lt;/b&gt; or &lt;b&gt;&#91;&#91;Image:file.png&#124;alt text]]&lt;/b&gt;
+or &lt;b&gt;&#91;&#91;Media:file.ogg]]&lt;/b&gt; for sounds.
+&lt;p&gt;Please note that as with wiki pages, others may edit or
+delete your uploads if they think it serves the project, and
+you may be blocked from uploading if you abuse the system.
+</td><td>
+{{int:7804cb84}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb3ef2ae&action=edit 8aae8210]<br>
+[[MediaWiki_talk:fb3ef2ae|Talk]]
+</td><td>
+Upload warning
+</td><td>
+{{int:fb3ef2ae}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a5430c9b&action=edit 6a080eb0]<br>
+[[MediaWiki_talk:a5430c9b|Talk]]
+</td><td>
+&lt;b&gt;User rights for &quot;$1&quot; updated&lt;/b&gt;
+</td><td>
+{{int:a5430c9b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:89b73748&action=edit 8b23a826]<br>
+[[MediaWiki_talk:89b73748|Talk]]
+</td><td>
+&#39;&#39;&#39;Note:&#39;&#39;&#39; After saving, you have to tell your bowser to get the new version: &#39;&#39;&#39;Mozilla:&#39;&#39;&#39; click &#39;&#39;reload&#39;&#39;(or &#39;&#39;ctrl-r&#39;&#39;), &#39;&#39;&#39;IE / Opera:&#39;&#39;&#39; &#39;&#39;ctrl-f5&#39;&#39;, &#39;&#39;&#39;Safari:&#39;&#39;&#39; &#39;&#39;cmd-r&#39;&#39;, &#39;&#39;&#39;Konqueror&#39;&#39;&#39; &#39;&#39;ctrl-r&#39;&#39;.
+</td><td>
+{{int:89b73748}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1656c92b&action=edit 97bd6e75]<br>
+[[MediaWiki_talk:1656c92b|Talk]]
+</td><td>
+&lt;strong&gt;Tip:&lt;/strong&gt; Use the &#39;Show preview&#39; button to test your new css/js before saving.
+</td><td>
+{{int:1656c92b}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:9f62117d&action=edit b51c3667]<br>
+[[MediaWiki_talk:9f62117d|Talk]]
+</td><td>
+&#39;&#39;&#39;Remember that you are only previewing your user css, it has not yet been saved!&#39;&#39;&#39;
+</td><td>
+{{int:9f62117d}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:77541367&action=edit a49220af]<br>
+[[MediaWiki_talk:77541367|Talk]]
+</td><td>
+The user name you entered is already in use. Please choose a different name.
+</td><td>
+{{int:77541367}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:eca4b211&action=edit 2e8efec0]<br>
+[[MediaWiki_talk:eca4b211|Talk]]
+</td><td>
+&#39;&#39;&#39;Remember that you are only testing/previewing your user javascript, it has not yet been saved!&#39;&#39;&#39;
+</td><td>
+{{int:eca4b211}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:49c670f4&action=edit eb0f23d8]<br>
+[[MediaWiki_talk:49c670f4|Talk]]
+</td><td>
+Log in
+</td><td>
+{{int:49c670f4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:fb3467d9&action=edit 271a962f]<br>
+[[MediaWiki_talk:fb3467d9|Talk]]
+</td><td>
+Log out
+</td><td>
+{{int:fb3467d9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e1881ca2&action=edit 0e3f35e1]<br>
+[[MediaWiki_talk:e1881ca2|Talk]]
+</td><td>
+Mail object returned error:
+</td><td>
+{{int:e1881ca2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:823fdaf7&action=edit ea81d010]<br>
+[[MediaWiki_talk:823fdaf7|Talk]]
+</td><td>
+View user page
+</td><td>
+{{int:823fdaf7}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f25ef873&action=edit 2ab9a2af]<br>
+[[MediaWiki_talk:f25ef873|Talk]]
+</td><td>
+User statistics
+</td><td>
+{{int:f25ef873}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b704c939&action=edit 903f135d]<br>
+[[MediaWiki_talk:b704c939|Talk]]
+</td><td>
+There are &#39;&#39;&#39;$1&#39;&#39;&#39; registered users.
+&#39;&#39;&#39;$2&#39;&#39;&#39; of these are administrators (see $3).
+</td><td>
+{{int:b704c939}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2da600bf&action=edit c692273d]<br>
+[[MediaWiki_talk:2da600bf|Talk]]
+</td><td>
+Version
+</td><td>
+{{int:2da600bf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cd20ed80&action=edit 9204f6f2]<br>
+[[MediaWiki_talk:cd20ed80|Talk]]
+</td><td>
+This page has been accessed $1 times.
+</td><td>
+{{int:cd20ed80}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:b3a212e8&action=edit 023f0549]<br>
+[[MediaWiki_talk:b3a212e8|Talk]]
+</td><td>
+View ($1) ($2) ($3).
+</td><td>
+{{int:b3a212e8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:1affdb1e&action=edit db9e2eba]<br>
+[[MediaWiki_talk:1affdb1e|Talk]]
+</td><td>
+View source
+</td><td>
+{{int:1affdb1e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f6336004&action=edit 2e250bd9]<br>
+[[MediaWiki_talk:f6336004|Talk]]
+</td><td>
+View discussion
+</td><td>
+{{int:f6336004}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7da05431&action=edit 4d2466a3]<br>
+[[MediaWiki_talk:7da05431|Talk]]
+</td><td>
+Wanted pages
+</td><td>
+{{int:7da05431}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d91ebf58&action=edit 292b0901]<br>
+[[MediaWiki_talk:d91ebf58|Talk]]
+</td><td>
+Watch
+</td><td>
+{{int:d91ebf58}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d815e414&action=edit ddfeb02c]<br>
+[[MediaWiki_talk:d815e414|Talk]]
+</td><td>
+($1 pages watched not counting talk pages;
+$2 total pages edited since cutoff;
+$3...
+&lt;a href=&#39;$4&#39;&gt;show and edit complete list&lt;/a&gt;.)
+</td><td>
+{{int:d815e414}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:780e4559&action=edit d7d3bb79]<br>
+[[MediaWiki_talk:780e4559|Talk]]
+</td><td>
+Here&#39;s an alphabetical list of your
+watched pages. Check the boxes of pages you want to remove
+from your watchlist and click the &#39;remove checked&#39; button
+at the bottom of the screen.
+</td><td>
+{{int:780e4559}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:48a616d9&action=edit db14f0be]<br>
+[[MediaWiki_talk:48a616d9|Talk]]
+</td><td>
+My watchlist
+</td><td>
+{{int:48a616d9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:690e08f8&action=edit 37074879]<br>
+[[MediaWiki_talk:690e08f8|Talk]]
+</td><td>
+Your watchlist contains $1 pages.
+</td><td>
+{{int:690e08f8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:913a8eb4&action=edit 1d490f51]<br>
+[[MediaWiki_talk:913a8eb4|Talk]]
+</td><td>
+(for user &quot;$1&quot;)
+</td><td>
+{{int:913a8eb4}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:983ce9b1&action=edit b5396cea]<br>
+[[MediaWiki_talk:983ce9b1|Talk]]
+</td><td>
+checking watched pages for recent edits
+</td><td>
+{{int:983ce9b1}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e5e56e2&action=edit c69b87d2]<br>
+[[MediaWiki_talk:2e5e56e2|Talk]]
+</td><td>
+checking recent edits for watched pages
+</td><td>
+{{int:2e5e56e2}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:cdd40087&action=edit 24353550]<br>
+[[MediaWiki_talk:cdd40087|Talk]]
+</td><td>
+None of your watched items were edited in the time period displayed.
+</td><td>
+{{int:cdd40087}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:ec51da09&action=edit c873a8c3]<br>
+[[MediaWiki_talk:ec51da09|Talk]]
+</td><td>
+Not logged in
+</td><td>
+{{int:ec51da09}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7870af11&action=edit 080c4da9]<br>
+[[MediaWiki_talk:7870af11|Talk]]
+</td><td>
+You must be &lt;a href=&quot;/wiki/Special:Userlogin&quot;&gt;logged in&lt;/a&gt;
+to modify your watchlist.
+</td><td>
+{{int:7870af11}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2fa65d73&action=edit 89758668]<br>
+[[MediaWiki_talk:2fa65d73|Talk]]
+</td><td>
+Watch this page
+</td><td>
+{{int:2fa65d73}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:79260dc8&action=edit d94c2857]<br>
+[[MediaWiki_talk:79260dc8|Talk]]
+</td><td>
+Watch this page
+</td><td>
+{{int:79260dc8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:622a355f&action=edit 5b3750aa]<br>
+[[MediaWiki_talk:622a355f|Talk]]
+</td><td>
+&lt;h2&gt;Welcome, $1!&lt;/h2&gt;&lt;p&gt;Your account has been created.
+Don&#39;t forget to change your Wiktionary preferences.
+</td><td>
+{{int:622a355f}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:bde1fbba&action=edit 28d0e2a8]<br>
+[[MediaWiki_talk:bde1fbba|Talk]]
+</td><td>
+What links here
+</td><td>
+{{int:bde1fbba}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:53f0999a&action=edit b3775e04]<br>
+[[MediaWiki_talk:53f0999a|Talk]]
+</td><td>
+To be allowed to create accounts in this Wiki you have to &#91;&#91;Special:Userlogin&#124;log]] in and have the appropriate permissions.
+</td><td>
+{{int:53f0999a}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:901574b0&action=edit 13f7d937]<br>
+[[MediaWiki_talk:901574b0|Talk]]
+</td><td>
+You are not allowed to create an account
+</td><td>
+{{int:901574b0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:28589651&action=edit 8d93b543]<br>
+[[MediaWiki_talk:28589651|Talk]]
+</td><td>
+You have to &#91;&#91;Special:Userlogin&#124;login]] to edit pages.
+</td><td>
+{{int:28589651}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d4e0db33&action=edit 76713eb6]<br>
+[[MediaWiki_talk:d4e0db33|Talk]]
+</td><td>
+Login required to edit
+</td><td>
+{{int:d4e0db33}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:7046be67&action=edit 3c46b4af]<br>
+[[MediaWiki_talk:7046be67|Talk]]
+</td><td>
+You have to &#91;&#91;Special:Userlogin&#124;login]] to read pages.
+</td><td>
+{{int:7046be67}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:56f7b6c8&action=edit 27809c2a]<br>
+[[MediaWiki_talk:56f7b6c8|Talk]]
+</td><td>
+Login required to read
+</td><td>
+{{int:56f7b6c8}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:8815fbb3&action=edit 80a9ff8d]<br>
+[[MediaWiki_talk:8815fbb3|Talk]]
+</td><td>
+View project page
+</td><td>
+{{int:8815fbb3}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:d00a5142&action=edit 937cdab5]<br>
+[[MediaWiki_talk:d00a5142|Talk]]
+</td><td>
+Wiktionary
+</td><td>
+{{int:d00a5142}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a7ee1c5c&action=edit b6ea8219]<br>
+[[MediaWiki_talk:a7ee1c5c|Talk]]
+</td><td>
+Below are the last $1 changes in the last &lt;b&gt;$2&lt;/b&gt; hours.
+</td><td>
+{{int:a7ee1c5c}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:deb21c59&action=edit 843af08d]<br>
+[[MediaWiki_talk:deb21c59|Talk]]
+</td><td>
+This is a saved version of your watchlist.
+</td><td>
+{{int:deb21c59}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:e77517fa&action=edit 89821357]<br>
+[[MediaWiki_talk:e77517fa|Talk]]
+</td><td>
+Show last $1 hours $2 days $3
+</td><td>
+{{int:e77517fa}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:a9b62164&action=edit d526a8a6]<br>
+[[MediaWiki_talk:a9b62164|Talk]]
+</td><td>
+Incorrect parameters to wfQuery()&lt;br /&gt;
+Function: $1&lt;br /&gt;
+Query: $2
+
+</td><td>
+{{int:a9b62164}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:3314dacf&action=edit d8ecf7db]<br>
+[[MediaWiki_talk:3314dacf|Talk]]
+</td><td>
+The password you entered is incorrect. Please try again.
+</td><td>
+{{int:3314dacf}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:2e0414f0&action=edit 4fe151ac]<br>
+[[MediaWiki_talk:2e0414f0|Talk]]
+</td><td>
+Differences
+</td><td>
+{{int:2e0414f0}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:0f5ab9c9&action=edit 0a98c2ad]<br>
+[[MediaWiki_talk:0f5ab9c9|Talk]]
+</td><td>
+Your email*
+</td><td>
+{{int:0f5ab9c9}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f495043e&action=edit 32d0e33a]<br>
+[[MediaWiki_talk:f495043e|Talk]]
+</td><td>
+Your user name
+</td><td>
+{{int:f495043e}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:6aa78968&action=edit f8b28bd9]<br>
+[[MediaWiki_talk:6aa78968|Talk]]
+</td><td>
+Your nickname (for signatures)
+</td><td>
+{{int:6aa78968}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:13a44203&action=edit b48cf014]<br>
+[[MediaWiki_talk:13a44203|Talk]]
+</td><td>
+Your password
+</td><td>
+{{int:13a44203}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:c0ad7f05&action=edit e14a732b]<br>
+[[MediaWiki_talk:c0ad7f05|Talk]]
+</td><td>
+Retype password
+</td><td>
+{{int:c0ad7f05}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:519f30b5&action=edit 7fc3e5b1]<br>
+[[MediaWiki_talk:519f30b5|Talk]]
+</td><td>
+Your real name*
+</td><td>
+{{int:519f30b5}}
+</td></tr><tr><td>
+[http://tl.wiktionary.org/w/wiki.phtml?title=MediaWiki:f98650e0&action=edit 5b5af4ea]<br>
+[[MediaWiki_talk:f98650e0|Talk]]
+</td><td>
+Your text
+</td><td>
+{{int:f98650e0}}
+</td></tr></table>
+
diff --git a/www/wiki/tests/parser/preprocess/Factorial.expected b/www/wiki/tests/parser/preprocess/Factorial.expected
new file mode 100644
index 00000000..a10fd6ca
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/Factorial.expected
@@ -0,0 +1,17 @@
+<root><template><title>#expr:<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=00</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>01<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=01</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*01<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=02</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*02<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=03</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*03<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=04</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*04<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=05</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*05<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=06</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*06<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=07</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*07<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=08</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*08<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=09</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*09<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=10</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*10<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=11</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*11<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=12</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*12<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=13</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*13<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=14</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*14<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=15</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*15<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=16</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*16<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=17</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*17<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=18</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*18<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=19</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*19<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=20</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*20<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=21</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*21<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=22</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*22<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=23</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*23<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=24</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*24<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=25</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*25<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=26</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*26<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=27</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*27<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=28</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*28<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=29</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*29<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=30</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*30<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=31</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*31<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=32</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*32<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=33</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*33<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=34</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*34<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=35</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*35<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=36</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*36<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=37</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*37<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=38</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*38<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=39</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*39<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=40</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*40<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=41</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*41<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=42</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*42<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=43</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*43<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=44</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*44<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=45</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*45<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=46</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*46<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=47</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*47<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=48</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*48<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=49</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*49<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=50</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*50<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=51</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*51<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=52</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*52<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=53</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*53<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=54</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*54<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=55</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*55<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=56</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*56<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=57</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*57<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=58</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*58<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=59</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*59<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=60</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*60<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=61</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*61<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=62</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*62<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=63</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*63<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=64</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*64<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=65</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*65<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=66</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*66<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=67</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*67<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=68</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*68<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=69</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*69<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=70</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*70<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=71</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*71<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=72</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*72<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=73</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*73<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=74</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*74<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=75</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*75<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=76</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*76<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=77</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*77<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=78</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*78<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=79</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*79<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=80</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*80<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=81</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*81<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=82</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*82<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=83</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*83<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=84</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*84<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=85</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*85<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=86</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*86<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=87</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*87<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=88</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*88<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=89</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*89<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=90</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*90<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=91</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*91<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=92</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*92<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=93</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*93<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=94</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*94<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=95</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*95<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=96</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*96<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=97</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*97<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=98</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*98<template><title>#ifeq:<template><title>#expr:<tplarg><title>1</title></tplarg>&gt;=99</title></template></title><part><name index="1" /><value>1</value></part><part><name index="2" /><value>*99</value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></value></part></template></title></template><ignore>&lt;noinclude&gt;</ignore>
+<template lineStart="1"><title>Template documentation</title></template>
+This template finds the [[factorial]] of a number. To use it, enter:&lt;br /&gt;
+&lt;code&gt;&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>input</value></part></template>&lt;/nowiki&gt;&lt;/code&gt;&lt;br /&gt;
+The input must be a positive interger smaller than 100 (better than most calculators, which go up to only 69). This template works by repeating conditional multiplications. Examples:&lt;br /&gt;
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>2</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>2</value></part></template>
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>3</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>3</value></part></template>
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>5</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>5</value></part></template>
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>10</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>10</value></part></template>
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>80</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>80</value></part></template>
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>0.5</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>0.5</value></part></template> (invalid input)
+*&lt;nowiki&gt;<template><title>factorial</title><part><name index="1" /><value>-1</value></part></template>&lt;/nowiki&gt; gives <template><title>factorial</title><part><name index="1" /><value>-1</value></part></template> (invalid input)
+<template lineStart="1"><title>esoteric</title></template>
+[[Category:Mathematical templates|<template><title>PAGENAME</title></template>]]
+<ignore>&lt;/noinclude&gt;</ignore>
+
+</root> \ No newline at end of file
diff --git a/www/wiki/tests/parser/preprocess/Factorial.txt b/www/wiki/tests/parser/preprocess/Factorial.txt
new file mode 100644
index 00000000..316f0792
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/Factorial.txt
@@ -0,0 +1,16 @@
+{{#expr:{{#ifeq:{{#expr:{{{1}}}>=00}}|1|01{{#ifeq:{{#expr:{{{1}}}>=01}}|1|*01{{#ifeq:{{#expr:{{{1}}}>=02}}|1|*02{{#ifeq:{{#expr:{{{1}}}>=03}}|1|*03{{#ifeq:{{#expr:{{{1}}}>=04}}|1|*04{{#ifeq:{{#expr:{{{1}}}>=05}}|1|*05{{#ifeq:{{#expr:{{{1}}}>=06}}|1|*06{{#ifeq:{{#expr:{{{1}}}>=07}}|1|*07{{#ifeq:{{#expr:{{{1}}}>=08}}|1|*08{{#ifeq:{{#expr:{{{1}}}>=09}}|1|*09{{#ifeq:{{#expr:{{{1}}}>=10}}|1|*10{{#ifeq:{{#expr:{{{1}}}>=11}}|1|*11{{#ifeq:{{#expr:{{{1}}}>=12}}|1|*12{{#ifeq:{{#expr:{{{1}}}>=13}}|1|*13{{#ifeq:{{#expr:{{{1}}}>=14}}|1|*14{{#ifeq:{{#expr:{{{1}}}>=15}}|1|*15{{#ifeq:{{#expr:{{{1}}}>=16}}|1|*16{{#ifeq:{{#expr:{{{1}}}>=17}}|1|*17{{#ifeq:{{#expr:{{{1}}}>=18}}|1|*18{{#ifeq:{{#expr:{{{1}}}>=19}}|1|*19{{#ifeq:{{#expr:{{{1}}}>=20}}|1|*20{{#ifeq:{{#expr:{{{1}}}>=21}}|1|*21{{#ifeq:{{#expr:{{{1}}}>=22}}|1|*22{{#ifeq:{{#expr:{{{1}}}>=23}}|1|*23{{#ifeq:{{#expr:{{{1}}}>=24}}|1|*24{{#ifeq:{{#expr:{{{1}}}>=25}}|1|*25{{#ifeq:{{#expr:{{{1}}}>=26}}|1|*26{{#ifeq:{{#expr:{{{1}}}>=27}}|1|*27{{#ifeq:{{#expr:{{{1}}}>=28}}|1|*28{{#ifeq:{{#expr:{{{1}}}>=29}}|1|*29{{#ifeq:{{#expr:{{{1}}}>=30}}|1|*30{{#ifeq:{{#expr:{{{1}}}>=31}}|1|*31{{#ifeq:{{#expr:{{{1}}}>=32}}|1|*32{{#ifeq:{{#expr:{{{1}}}>=33}}|1|*33{{#ifeq:{{#expr:{{{1}}}>=34}}|1|*34{{#ifeq:{{#expr:{{{1}}}>=35}}|1|*35{{#ifeq:{{#expr:{{{1}}}>=36}}|1|*36{{#ifeq:{{#expr:{{{1}}}>=37}}|1|*37{{#ifeq:{{#expr:{{{1}}}>=38}}|1|*38{{#ifeq:{{#expr:{{{1}}}>=39}}|1|*39{{#ifeq:{{#expr:{{{1}}}>=40}}|1|*40{{#ifeq:{{#expr:{{{1}}}>=41}}|1|*41{{#ifeq:{{#expr:{{{1}}}>=42}}|1|*42{{#ifeq:{{#expr:{{{1}}}>=43}}|1|*43{{#ifeq:{{#expr:{{{1}}}>=44}}|1|*44{{#ifeq:{{#expr:{{{1}}}>=45}}|1|*45{{#ifeq:{{#expr:{{{1}}}>=46}}|1|*46{{#ifeq:{{#expr:{{{1}}}>=47}}|1|*47{{#ifeq:{{#expr:{{{1}}}>=48}}|1|*48{{#ifeq:{{#expr:{{{1}}}>=49}}|1|*49{{#ifeq:{{#expr:{{{1}}}>=50}}|1|*50{{#ifeq:{{#expr:{{{1}}}>=51}}|1|*51{{#ifeq:{{#expr:{{{1}}}>=52}}|1|*52{{#ifeq:{{#expr:{{{1}}}>=53}}|1|*53{{#ifeq:{{#expr:{{{1}}}>=54}}|1|*54{{#ifeq:{{#expr:{{{1}}}>=55}}|1|*55{{#ifeq:{{#expr:{{{1}}}>=56}}|1|*56{{#ifeq:{{#expr:{{{1}}}>=57}}|1|*57{{#ifeq:{{#expr:{{{1}}}>=58}}|1|*58{{#ifeq:{{#expr:{{{1}}}>=59}}|1|*59{{#ifeq:{{#expr:{{{1}}}>=60}}|1|*60{{#ifeq:{{#expr:{{{1}}}>=61}}|1|*61{{#ifeq:{{#expr:{{{1}}}>=62}}|1|*62{{#ifeq:{{#expr:{{{1}}}>=63}}|1|*63{{#ifeq:{{#expr:{{{1}}}>=64}}|1|*64{{#ifeq:{{#expr:{{{1}}}>=65}}|1|*65{{#ifeq:{{#expr:{{{1}}}>=66}}|1|*66{{#ifeq:{{#expr:{{{1}}}>=67}}|1|*67{{#ifeq:{{#expr:{{{1}}}>=68}}|1|*68{{#ifeq:{{#expr:{{{1}}}>=69}}|1|*69{{#ifeq:{{#expr:{{{1}}}>=70}}|1|*70{{#ifeq:{{#expr:{{{1}}}>=71}}|1|*71{{#ifeq:{{#expr:{{{1}}}>=72}}|1|*72{{#ifeq:{{#expr:{{{1}}}>=73}}|1|*73{{#ifeq:{{#expr:{{{1}}}>=74}}|1|*74{{#ifeq:{{#expr:{{{1}}}>=75}}|1|*75{{#ifeq:{{#expr:{{{1}}}>=76}}|1|*76{{#ifeq:{{#expr:{{{1}}}>=77}}|1|*77{{#ifeq:{{#expr:{{{1}}}>=78}}|1|*78{{#ifeq:{{#expr:{{{1}}}>=79}}|1|*79{{#ifeq:{{#expr:{{{1}}}>=80}}|1|*80{{#ifeq:{{#expr:{{{1}}}>=81}}|1|*81{{#ifeq:{{#expr:{{{1}}}>=82}}|1|*82{{#ifeq:{{#expr:{{{1}}}>=83}}|1|*83{{#ifeq:{{#expr:{{{1}}}>=84}}|1|*84{{#ifeq:{{#expr:{{{1}}}>=85}}|1|*85{{#ifeq:{{#expr:{{{1}}}>=86}}|1|*86{{#ifeq:{{#expr:{{{1}}}>=87}}|1|*87{{#ifeq:{{#expr:{{{1}}}>=88}}|1|*88{{#ifeq:{{#expr:{{{1}}}>=89}}|1|*89{{#ifeq:{{#expr:{{{1}}}>=90}}|1|*90{{#ifeq:{{#expr:{{{1}}}>=91}}|1|*91{{#ifeq:{{#expr:{{{1}}}>=92}}|1|*92{{#ifeq:{{#expr:{{{1}}}>=93}}|1|*93{{#ifeq:{{#expr:{{{1}}}>=94}}|1|*94{{#ifeq:{{#expr:{{{1}}}>=95}}|1|*95{{#ifeq:{{#expr:{{{1}}}>=96}}|1|*96{{#ifeq:{{#expr:{{{1}}}>=97}}|1|*97{{#ifeq:{{#expr:{{{1}}}>=98}}|1|*98{{#ifeq:{{#expr:{{{1}}}>=99}}|1|*99}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}<noinclude>
+{{Template documentation}}
+This template finds the [[factorial]] of a number. To use it, enter:<br />
+<code><nowiki>{{factorial|input}}</nowiki></code><br />
+The input must be a positive interger smaller than 100 (better than most calculators, which go up to only 69). This template works by repeating conditional multiplications. Examples:<br />
+*<nowiki>{{factorial|2}}</nowiki> gives {{factorial|2}}
+*<nowiki>{{factorial|3}}</nowiki> gives {{factorial|3}}
+*<nowiki>{{factorial|5}}</nowiki> gives {{factorial|5}}
+*<nowiki>{{factorial|10}}</nowiki> gives {{factorial|10}}
+*<nowiki>{{factorial|80}}</nowiki> gives {{factorial|80}}
+*<nowiki>{{factorial|0.5}}</nowiki> gives {{factorial|0.5}} (invalid input)
+*<nowiki>{{factorial|-1}}</nowiki> gives {{factorial|-1}} (invalid input)
+{{esoteric}}
+[[Category:Mathematical templates|{{PAGENAME}}]]
+</noinclude>
+
diff --git a/www/wiki/tests/parser/preprocess/Fundraising.expected b/www/wiki/tests/parser/preprocess/Fundraising.expected
new file mode 100644
index 00000000..f5b32cc5
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/Fundraising.expected
@@ -0,0 +1,18 @@
+<root>&lt;div name=&quot;fundraising&quot; id=&quot;fundraising&quot; class=&quot;plainlinks&quot; style=&quot;margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0&quot;&gt;
+'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]'''
+&lt;br /&gt;
+&lt;fundraising/&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
+&lt;fundraisinglogo/&gt;
+&lt;br /&gt;
+&lt;b&gt;Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.&lt;/b&gt;
+&lt;br /&gt;
+&lt;small&gt;
+[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]]
+|
+[[Wikimedia:Fundraising FAQ|FAQ]]
+|
+[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag]
+&lt;/small&gt;
+&lt;/div&gt;
+</root> \ No newline at end of file
diff --git a/www/wiki/tests/parser/preprocess/Fundraising.txt b/www/wiki/tests/parser/preprocess/Fundraising.txt
new file mode 100644
index 00000000..b868b4d8
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/Fundraising.txt
@@ -0,0 +1,17 @@
+<div name="fundraising" id="fundraising" class="plainlinks" style="margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0">
+'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]'''
+<br />
+<fundraising/>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<fundraisinglogo/>
+<br />
+<b>Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.</b>
+<br />
+<small>
+[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]]
+|
+[[Wikimedia:Fundraising FAQ|FAQ]]
+|
+[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag]
+</small>
+</div>
diff --git a/www/wiki/tests/parser/preprocess/NestedTemplates.expected b/www/wiki/tests/parser/preprocess/NestedTemplates.expected
new file mode 100644
index 00000000..645626df
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/NestedTemplates.expected
@@ -0,0 +1,90 @@
+<root><template><title>vorlage</title></template>
+
+<tplarg lineStart="1"><title>argument</title></tplarg>
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{<tplarg><title>vorlagenname</title></tplarg>}
+<template lineStart="1"><title> <template><title>vorlagenname</title></template></title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template> </title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template>erweiterung</title></template>
+
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title> <template><title>vorlagenname</title></template></title></tplarg>
+<template lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title><template><title>vorlagenname</title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></template>
+
+nur etwas erweitert
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></tplarg>
+<template lineStart="1"><title> {<tplarg><title>vorlagenname</title></tplarg></title></template>}
+{<tplarg><title> <template><title>vorlagenname</title></template></title></tplarg>}
+<template lineStart="1"><title> <template><title> <template><title>vorlagenname</title></template></title></template></title></template>
+{<tplarg><title> <template><title>vorlagenname</title></template>} </title></tplarg>
+{<template><title><tplarg><title>vorlagenname</title></tplarg>} </title></template>
+{<tplarg><title><template><title>vorlagenname</title></template> </title></tplarg>}
+<template lineStart="1"><title> <template><title><template><title>vorlagenname</title></template> </title></template></title></template>
+<tplarg lineStart="1"><title> {<template><title>vorlagenname</title></template> </title></tplarg>}
+
+{<tplarg><title><tplarg><title> </title></tplarg></title></tplarg>}
+
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg></title></template>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg></title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg></title></template>
+{{<tplarg><title><tplarg><title> </title></tplarg>} </title></tplarg>}
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg></title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg> </title></template>
+{<tplarg><title><template><title><template><title> </title></template> </title></template> </title></tplarg>}
+{<template><title><tplarg><title><template><title> </title></template> </title></tplarg>} </title></template>
+{<template><title><template><title><tplarg><title> </title></tplarg>} </title></template> </title></template>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg> </title></template>
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg> </title></template> </title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg> </title></tplarg>
+<template lineStart="1"><title><template><title><template><title><template><title> </title></template> </title></template> </title></template> </title></template>
+
+<template lineStart="1"><title>vorlage</title></template>
+
+<tplarg lineStart="1"><title>argument</title></tplarg>
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{<tplarg><title>vorlagenname</title></tplarg>}
+<template lineStart="1"><title> <template><title>vorlagenname</title></template></title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template> </title></template>
+<template lineStart="1"><title><template><title>vorlagenname</title></template>erweiterung</title></template>
+
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title> <template><title>vorlagenname</title></template></title></tplarg>
+<template lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></template>
+<tplarg lineStart="1"><title><template><title>vorlagenname</title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></template>
+
+nur etwas erweitert
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title> <tplarg><title>vorlagenname</title></tplarg></title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title>vorlagenname</title></tplarg> </title></tplarg>
+<template lineStart="1"><title> {<tplarg><title>vorlagenname</title></tplarg></title></template>}
+{<tplarg><title> <template><title>vorlagenname</title></template></title></tplarg>}
+<template lineStart="1"><title> <template><title> <template><title>vorlagenname</title></template></title></template></title></template>
+{<tplarg><title> <template><title>vorlagenname</title></template>} </title></tplarg>
+{<template><title><tplarg><title>vorlagenname</title></tplarg>} </title></template>
+{<tplarg><title><template><title>vorlagenname</title></template> </title></tplarg>}
+<template lineStart="1"><title> <template><title><template><title>vorlagenname</title></template> </title></template></title></template>
+<tplarg lineStart="1"><title> {<template><title>vorlagenname</title></template> </title></tplarg>}
+
+{<tplarg><title><tplarg><title> </title></tplarg></title></tplarg>}
+
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg></title></template>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg></title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg></title></template>
+{{<tplarg><title><tplarg><title> </title></tplarg>} </title></tplarg>}
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg></title></template> </title></tplarg>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg></title></tplarg> </title></template>
+{<tplarg><title><template><title><template><title> </title></template> </title></template> </title></tplarg>}
+{<template><title><tplarg><title><template><title> </title></template> </title></tplarg>} </title></template>
+{<template><title><template><title><tplarg><title> </title></tplarg>} </title></template> </title></template>
+<template lineStart="1"><title><tplarg><title><tplarg><title> </title></tplarg> </title></tplarg> </title></template>
+<tplarg lineStart="1"><title><template><title><tplarg><title> </title></tplarg> </title></template> </title></tplarg>
+<tplarg lineStart="1"><title><tplarg><title><template><title> </title></template> </title></tplarg> </title></tplarg>
+<template lineStart="1"><title><template><title><template><title><template><title> </title></template> </title></template> </title></template> </title></template>
+</root> \ No newline at end of file
diff --git a/www/wiki/tests/parser/preprocess/NestedTemplates.txt b/www/wiki/tests/parser/preprocess/NestedTemplates.txt
new file mode 100644
index 00000000..aa9a472d
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/NestedTemplates.txt
@@ -0,0 +1,89 @@
+{{vorlage}}
+
+{{{argument}}}
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{{{{vorlagenname}}}}
+{{ {{vorlagenname}}}}
+{{{{vorlagenname}} }}
+{{{{vorlagenname}}erweiterung}}
+
+{{{{{vorlagenname}}}}}
+{{{ {{vorlagenname}}}}}
+{{ {{{vorlagenname}}}}}
+{{{{{vorlagenname}} }}}
+{{{{{vorlagenname}}} }}
+
+nur etwas erweitert
+{{{{{{vorlagenname}}}}}}
+{{{ {{{vorlagenname}}}}}}
+{{{{{{vorlagenname}}} }}}
+{{ {{{{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}}}}}
+{{ {{ {{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}} }}}
+{{{{{{vorlagenname}}}} }}
+{{{{{{vorlagenname}} }}}}
+{{ {{{{vorlagenname}} }}}}
+{{{ {{{vorlagenname}} }}}}
+
+{{{{{{{ }}}}}}}
+
+{{{{{{{{ }}}}}}}}
+{{{{{{{{ }} }}}}}}
+{{{{{{{{ }}} }}}}}
+{{{{{{{{ }}}} }}}}
+{{{{{{{{ }}}}} }}}
+{{{{{{{{ }}}}}} }}
+{{{{{{{{ }} }} }}}}
+{{{{{{{{ }} }}}} }}
+{{{{{{{{ }}}} }} }}
+{{{{{{{{ }}} }}} }}
+{{{{{{{{ }}} }} }}}
+{{{{{{{{ }} }}} }}}
+{{{{{{{{ }} }} }} }}
+
+{{vorlage}}
+
+{{{argument}}}
+
+Nach [[:meta:Help:Expansion#XML parse tree]]
+{{{{vorlagenname}}}}
+{{ {{vorlagenname}}}}
+{{{{vorlagenname}} }}
+{{{{vorlagenname}}erweiterung}}
+
+{{{{{vorlagenname}}}}}
+{{{ {{vorlagenname}}}}}
+{{ {{{vorlagenname}}}}}
+{{{{{vorlagenname}} }}}
+{{{{{vorlagenname}}} }}
+
+nur etwas erweitert
+{{{{{{vorlagenname}}}}}}
+{{{ {{{vorlagenname}}}}}}
+{{{{{{vorlagenname}}} }}}
+{{ {{{{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}}}}}
+{{ {{ {{vorlagenname}}}}}}
+{{{{ {{vorlagenname}}} }}}
+{{{{{{vorlagenname}}}} }}
+{{{{{{vorlagenname}} }}}}
+{{ {{{{vorlagenname}} }}}}
+{{{ {{{vorlagenname}} }}}}
+
+{{{{{{{ }}}}}}}
+
+{{{{{{{{ }}}}}}}}
+{{{{{{{{ }} }}}}}}
+{{{{{{{{ }}} }}}}}
+{{{{{{{{ }}}} }}}}
+{{{{{{{{ }}}}} }}}
+{{{{{{{{ }}}}}} }}
+{{{{{{{{ }} }} }}}}
+{{{{{{{{ }} }}}} }}
+{{{{{{{{ }}}} }} }}
+{{{{{{{{ }}} }}} }}
+{{{{{{{{ }}} }} }}}
+{{{{{{{{ }} }}} }}}
+{{{{{{{{ }} }} }} }}
diff --git a/www/wiki/tests/parser/preprocess/QuoteQuran.expected b/www/wiki/tests/parser/preprocess/QuoteQuran.expected
new file mode 100644
index 00000000..e9a78e46
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/QuoteQuran.expected
@@ -0,0 +1,140 @@
+<root><ignore>&lt;noinclude&gt;</ignore><template><title>Template sandbox notice</title></template><ignore>&lt;/noinclude&gt;</ignore>
+&lt;div class=&quot;boilerplate metadata rfa&quot; style=&quot;background-color:#FFFFF5; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px solid #AAAAAA;&quot;&gt;The [[Qur'an]], [[sura|chapter]] <template><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 1) </title><part><name index="1" /><value> 1 ([[Al-Fatiha]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 2) </title><part><name index="1" /><value> 2 ([[Al-Baqara]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 3) </title><part><name index="1" /><value> 3 ([[Ali Imran]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 4) </title><part><name index="1" /><value> 4 ([[An-Nisa]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 5) </title><part><name index="1" /><value> 5 ([[Al-Ma'ida]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 6) </title><part><name index="1" /><value> 6 ([[Al-An'am]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 7) </title><part><name index="1" /><value> 7 ([[Al-A'raf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 8) </title><part><name index="1" /><value> 8 ([[Al-Anfal]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 9) </title><part><name index="1" /><value> 9 ([[At-Tawba]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 10) </title><part><name index="1" /><value> 10 ([[Yunus (sura)|Yunus]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 11) </title><part><name index="1" /><value> 11 ([[Hud (sura)|Hud]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 12) </title><part><name index="1" /><value> 12 ([[Yusuf (sura)|Yusuf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 13) </title><part><name index="1" /><value> 13 ([[Ar-Ra'd]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 14) </title><part><name index="1" /><value> 14 ([[Ibrahim (sura)|Ibrahim]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 15) </title><part><name index="1" /><value> 15 ([[Al-Hijr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 16) </title><part><name index="1" /><value> 16 ([[An-Nahl]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 17) </title><part><name index="1" /><value> 17 ([[Al-Isra]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 18) </title><part><name index="1" /><value> 18 ([[Al-Kahf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 19) </title><part><name index="1" /><value> 19 ([[Maryam (sura)|Maryam]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 20) </title><part><name index="1" /><value> 20 ([[Ta-Ha]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 21) </title><part><name index="1" /><value> 21 ([[Al-Anbiya]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 22) </title><part><name index="1" /><value> 22 ([[Al-Hajj]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 23) </title><part><name index="1" /><value> 23 ([[Al-Muminun]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 24) </title><part><name index="1" /><value> 24 ([[An-Noor]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 25) </title><part><name index="1" /><value> 25 ([[Al-Furqan]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 26) </title><part><name index="1" /><value> 26 ([[Ash-Shu'ara]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 27) </title><part><name index="1" /><value> 27 ([[An-Naml]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 28) </title><part><name index="1" /><value> 28 ([[Al-Qisas]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 29) </title><part><name index="1" /><value> 29 ([[Al-Ankabut]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 30) </title><part><name index="1" /><value> 30 ([[Ar-Rum]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 31) </title><part><name index="1" /><value> 31 ([[Luqman (sura)|Luqman]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 32) </title><part><name index="1" /><value> 32 ([[As-Sajda]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 33) </title><part><name index="1" /><value> 33 ([[Al-Ahzab]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 34) </title><part><name index="1" /><value> 34 ([[Saba (sura)|Saba]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 35) </title><part><name index="1" /><value> 35 ([[Fatir]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 36) </title><part><name index="1" /><value> 36 ([[Ya-Seen]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 37) </title><part><name index="1" /><value> 37 ([[As-Saaffat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 38) </title><part><name index="1" /><value> 38 ([[Sad (sura)|Sad]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 39) </title><part><name index="1" /><value> 39 ([[Az-Zumar]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 40) </title><part><name index="1" /><value> 40 ([[Ghafir]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 41) </title><part><name index="1" /><value> 41 ([[Fussilat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 42) </title><part><name index="1" /><value> 42 ([[Ash-Shura]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 43) </title><part><name index="1" /><value> 43 ([[Az-Zukhruf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 44) </title><part><name index="1" /><value> 44 ([[Ad-Dukhan]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 45) </title><part><name index="1" /><value> 45 ([[Al-Jathiya]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 46) </title><part><name index="1" /><value> 46 ([[Al-Ahqaf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 47) </title><part><name index="1" /><value> 47 ([[Muhammad (sura)|Muhammad]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 48) </title><part><name index="1" /><value> 48 ([[Al-Fath]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 49) </title><part><name index="1" /><value> 49 ([[Al-Hujraat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 50) </title><part><name index="1" /><value> 50 ([[Qaf (sura)|Qaf]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 51) </title><part><name index="1" /><value> 51 ([[Adh-Dhariyat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 52) </title><part><name index="1" /><value> 52 ([[At-Tur]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 53) </title><part><name index="1" /><value> 53 ([[An-Najm]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 54) </title><part><name index="1" /><value> 54 ([[Al-Qamar]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 55) </title><part><name index="1" /><value> 55 ([[Ar-Rahman]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 56) </title><part><name index="1" /><value> 56 ([[Al-Waqia]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 57) </title><part><name index="1" /><value> 57 ([[Al-Hadid]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 58) </title><part><name index="1" /><value> 58 ([[Al-Mujadila]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 59) </title><part><name index="1" /><value> 59 ([[Al-Hashr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 60) </title><part><name index="1" /><value> 60 ([[Al-Mumtahina]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 61) </title><part><name index="1" /><value> 61 ([[As-Saff]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 62) </title><part><name index="1" /><value> 62 ([[Al-Jumua]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 63) </title><part><name index="1" /><value> 63 ([[Al-Munafiqoon]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 64) </title><part><name index="1" /><value> 64 ([[At-Taghabun]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 65) </title><part><name index="1" /><value> 65 ([[At-Talaq]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 66) </title><part><name index="1" /><value> 66 ([[At-Tahrim]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 67) </title><part><name index="1" /><value> 67 ([[Al-Mulk]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 68) </title><part><name index="1" /><value> 68 ([[Al-Qalam]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 69) </title><part><name index="1" /><value> 69 ([[Al-Haaqqa]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 70) </title><part><name index="1" /><value> 70 ([[Al-Maarij]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 71) </title><part><name index="1" /><value> 71 ([[Nooh (sura)|Nooh]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 72) </title><part><name index="1" /><value> 72 ([[Al-Jinn]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 73) </title><part><name index="1" /><value> 73 ([[Al-Muzzammil]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 74) </title><part><name index="1" /><value> 74 ([[Al-Muddaththir]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 75) </title><part><name index="1" /><value> 75 ([[Al-Qiyama]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 76) </title><part><name index="1" /><value> 76 ([[Al-Insan]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 77) </title><part><name index="1" /><value> 77 ([[Al-Mursalat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 78) </title><part><name index="1" /><value> 78 ([[An-Naba]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 79) </title><part><name index="1" /><value> 79 ([[An-Naziat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 80) </title><part><name index="1" /><value> 80 ([[Abasa]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 81) </title><part><name index="1" /><value> 81 ([[At-Takwir]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 82) </title><part><name index="1" /><value> 82 ([[Al-Infitar]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 83) </title><part><name index="1" /><value> 83 ([[Al-Mutaffifin]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 84) </title><part><name index="1" /><value> 84 ([[Al-Inshiqaq]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 85) </title><part><name index="1" /><value> 85 ([[Al-Burooj]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 86) </title><part><name index="1" /><value> 86 ([[At-Tariq]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 87) </title><part><name index="1" /><value> 87 ([[Al-Ala]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 88) </title><part><name index="1" /><value> 88 ([[Al-Ghashiya]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 89) </title><part><name index="1" /><value> 89 ([[Al-Fajr (sura)|Al-Fajr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 90) </title><part><name index="1" /><value> 90 ([[Al-Balad]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 91) </title><part><name index="1" /><value> 91 ([[Ash-Shams]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 92) </title><part><name index="1" /><value> 92 ([[Al-Lail]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 93) </title><part><name index="1" /><value> 93 ([[Ad-Dhuha]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 94) </title><part><name index="1" /><value> 94 ([[Al-Inshirah]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 95) </title><part><name index="1" /><value> 95 ([[At-Tin]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 96) </title><part><name index="1" /><value> 96 ([[Al-Alaq]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 97) </title><part><name index="1" /><value> 97 ([[Al-Qadr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 98) </title><part><name index="1" /><value> 98 ([[Al-Bayyina]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 99) </title><part><name index="1" /><value> 99 ([[Az-Zalzala]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 100) </title><part><name index="1" /><value> 100 ([[Al-Adiyat]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 101) </title><part><name index="1" /><value> 101 ([[Al-Qaria]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 102) </title><part><name index="1" /><value> 102 ([[At-Takathur]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 103) </title><part><name index="1" /><value> 103 ([[Al-Asr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 104) </title><part><name index="1" /><value> 104 ([[Al-Humaza]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 105) </title><part><name index="1" /><value> 105 ([[Al-Fil]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 106) </title><part><name index="1" /><value> 106 ([[Quraysh (sura)|Quraysh]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 107) </title><part><name index="1" /><value> 107 ([[Al-Ma'un]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 108) </title><part><name index="1" /><value> 108 ([[Al-Kawthar]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 109) </title><part><name index="1" /><value> 109 ([[Al-Kafirun]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 110) </title><part><name index="1" /><value> 110 ([[An-Nasr]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 111) </title><part><name index="1" /><value> 111 ([[Al-Masadd]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 112) </title><part><name index="1" /><value> 112 ([[Al-Ikhlas]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 113) </title><part><name index="1" /><value> 113 ([[Al-Falaq]]) </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg> = 114) </title><part><name index="1" /><value> 114 ([[An-Nas]]) </value></part><part><name index="2" /><value>
+error </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template>, [[ayat|verse]] [http://www.usc.edu/dept/MSA/quran/<template><title>three digit</title><part><name index="1" /><value><tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg></value></part></template>.qmt.html#<template><title>three digit</title><part><name index="1" /><value><tplarg><title>1</title><part><name index="1" /><value>1</value></part></tplarg></value></part></template>.<template><title>three digit</title><part><name index="1" /><value><tplarg><title>2</title><part><name index="1" /><value>1</value></part></tplarg></value></part></template> <tplarg><title>2</title><part><name index="1" /><value>1</value></part></tplarg>]''':'''<template><title>cquote</title><part><name index="1" /><value> <tplarg><title>3</title><part><name index="1" /><value>Default text</value></part></tplarg>&amp;mdash; &lt;small&gt;[[Qur'an translations|translated]] by <template><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 0) </title><part><name index="1" /><value> Unknown </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1) </title><part><name index="1" /><value> [[Salman the Persian]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 101) </title><part><name index="1" /><value> [[Marmaduke Pickthall]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 102) </title><part><name index="1" /><value> [[Abdullah Yusuf Ali]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 601) </title><part><name index="1" /><value> [[Muhammad Muhsin Khan]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 701) </title><part><name index="1" /><value> [[Mohammed Habib Shakir|M. H. Shakir]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 901) </title><part><name index="1" /><value> [[Maulana Muhammad Ali]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 902) </title><part><name index="1" /><value> [[Rashad Khalifa]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1001) </title><part><name index="1" /><value> [[Theodor Bibliander]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1002) </title><part><name index="1" /><value> [[Robert of Ketton]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1003) </title><part><name index="1" /><value> [[Andre du Ryer]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1004) </title><part><name index="1" /><value> [[Alexander Ross (writer)|Alexander Ross]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1005) </title><part><name index="1" /><value> [[Abraham Hinckelmann]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1006) </title><part><name index="1" /><value> [[George Sale]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1007) </title><part><name index="1" /><value> [[John Medows Rodwell]] </value></part><part><name index="2" /><value>
+<template lineStart="1"><title>#ifexpr: (<tplarg><title>4</title><part><name index="1" /><value>0</value></part></tplarg> = 1008) </title><part><name index="1" /><value> [[Arthur John Arberry]] </value></part><part><name index="2" /><value>
+error </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template> </value></part></template>&lt;/small&gt;
+<template lineStart="1"><title>#if:<tplarg><title>trans</title><part><name index="1" /><value></value></part></tplarg></title><part><name index="1" /><value>
+----
+[[Transliteration]]: <tplarg><title>trans</title></tplarg></value></part><part><name index="2" /><value> </value></part></template>
+<template lineStart="1"><title>#if:<tplarg><title>arab</title><part><name index="1" /><value></value></part></tplarg></title><part><name index="1" /><value>
+----
+[[Arabic language|Arabic]]: <tplarg><title>arab</title></tplarg></value></part><part><name index="2" /><value> </value></part></template> </value></part></template>&lt;/font&gt;&lt;/div&gt;
+
+</root> \ No newline at end of file
diff --git a/www/wiki/tests/parser/preprocess/QuoteQuran.txt b/www/wiki/tests/parser/preprocess/QuoteQuran.txt
new file mode 100644
index 00000000..3cfac5b2
--- /dev/null
+++ b/www/wiki/tests/parser/preprocess/QuoteQuran.txt
@@ -0,0 +1,139 @@
+<noinclude>{{Template sandbox notice}}</noinclude>
+<div class="boilerplate metadata rfa" style="background-color:#FFFFF5; margin: 2em 0 0 0; padding: 0 10px 0 10px; border: 1px solid #AAAAAA;">The [[Qur'an]], [[sura|chapter]] {{#ifexpr: ({{{1|1}}} = 1) | 1 ([[Al-Fatiha]]) |
+{{#ifexpr: ({{{1|1}}} = 2) | 2 ([[Al-Baqara]]) |
+{{#ifexpr: ({{{1|1}}} = 3) | 3 ([[Ali Imran]]) |
+{{#ifexpr: ({{{1|1}}} = 4) | 4 ([[An-Nisa]]) |
+{{#ifexpr: ({{{1|1}}} = 5) | 5 ([[Al-Ma'ida]]) |
+{{#ifexpr: ({{{1|1}}} = 6) | 6 ([[Al-An'am]]) |
+{{#ifexpr: ({{{1|1}}} = 7) | 7 ([[Al-A'raf]]) |
+{{#ifexpr: ({{{1|1}}} = 8) | 8 ([[Al-Anfal]]) |
+{{#ifexpr: ({{{1|1}}} = 9) | 9 ([[At-Tawba]]) |
+{{#ifexpr: ({{{1|1}}} = 10) | 10 ([[Yunus (sura)|Yunus]]) |
+{{#ifexpr: ({{{1|1}}} = 11) | 11 ([[Hud (sura)|Hud]]) |
+{{#ifexpr: ({{{1|1}}} = 12) | 12 ([[Yusuf (sura)|Yusuf]]) |
+{{#ifexpr: ({{{1|1}}} = 13) | 13 ([[Ar-Ra'd]]) |
+{{#ifexpr: ({{{1|1}}} = 14) | 14 ([[Ibrahim (sura)|Ibrahim]]) |
+{{#ifexpr: ({{{1|1}}} = 15) | 15 ([[Al-Hijr]]) |
+{{#ifexpr: ({{{1|1}}} = 16) | 16 ([[An-Nahl]]) |
+{{#ifexpr: ({{{1|1}}} = 17) | 17 ([[Al-Isra]]) |
+{{#ifexpr: ({{{1|1}}} = 18) | 18 ([[Al-Kahf]]) |
+{{#ifexpr: ({{{1|1}}} = 19) | 19 ([[Maryam (sura)|Maryam]]) |
+{{#ifexpr: ({{{1|1}}} = 20) | 20 ([[Ta-Ha]]) |
+{{#ifexpr: ({{{1|1}}} = 21) | 21 ([[Al-Anbiya]]) |
+{{#ifexpr: ({{{1|1}}} = 22) | 22 ([[Al-Hajj]]) |
+{{#ifexpr: ({{{1|1}}} = 23) | 23 ([[Al-Muminun]]) |
+{{#ifexpr: ({{{1|1}}} = 24) | 24 ([[An-Noor]]) |
+{{#ifexpr: ({{{1|1}}} = 25) | 25 ([[Al-Furqan]]) |
+{{#ifexpr: ({{{1|1}}} = 26) | 26 ([[Ash-Shu'ara]]) |
+{{#ifexpr: ({{{1|1}}} = 27) | 27 ([[An-Naml]]) |
+{{#ifexpr: ({{{1|1}}} = 28) | 28 ([[Al-Qisas]]) |
+{{#ifexpr: ({{{1|1}}} = 29) | 29 ([[Al-Ankabut]]) |
+{{#ifexpr: ({{{1|1}}} = 30) | 30 ([[Ar-Rum]]) |
+{{#ifexpr: ({{{1|1}}} = 31) | 31 ([[Luqman (sura)|Luqman]]) |
+{{#ifexpr: ({{{1|1}}} = 32) | 32 ([[As-Sajda]]) |
+{{#ifexpr: ({{{1|1}}} = 33) | 33 ([[Al-Ahzab]]) |
+{{#ifexpr: ({{{1|1}}} = 34) | 34 ([[Saba (sura)|Saba]]) |
+{{#ifexpr: ({{{1|1}}} = 35) | 35 ([[Fatir]]) |
+{{#ifexpr: ({{{1|1}}} = 36) | 36 ([[Ya-Seen]]) |
+{{#ifexpr: ({{{1|1}}} = 37) | 37 ([[As-Saaffat]]) |
+{{#ifexpr: ({{{1|1}}} = 38) | 38 ([[Sad (sura)|Sad]]) |
+{{#ifexpr: ({{{1|1}}} = 39) | 39 ([[Az-Zumar]]) |
+{{#ifexpr: ({{{1|1}}} = 40) | 40 ([[Ghafir]]) |
+{{#ifexpr: ({{{1|1}}} = 41) | 41 ([[Fussilat]]) |
+{{#ifexpr: ({{{1|1}}} = 42) | 42 ([[Ash-Shura]]) |
+{{#ifexpr: ({{{1|1}}} = 43) | 43 ([[Az-Zukhruf]]) |
+{{#ifexpr: ({{{1|1}}} = 44) | 44 ([[Ad-Dukhan]]) |
+{{#ifexpr: ({{{1|1}}} = 45) | 45 ([[Al-Jathiya]]) |
+{{#ifexpr: ({{{1|1}}} = 46) | 46 ([[Al-Ahqaf]]) |
+{{#ifexpr: ({{{1|1}}} = 47) | 47 ([[Muhammad (sura)|Muhammad]]) |
+{{#ifexpr: ({{{1|1}}} = 48) | 48 ([[Al-Fath]]) |
+{{#ifexpr: ({{{1|1}}} = 49) | 49 ([[Al-Hujraat]]) |
+{{#ifexpr: ({{{1|1}}} = 50) | 50 ([[Qaf (sura)|Qaf]]) |
+{{#ifexpr: ({{{1|1}}} = 51) | 51 ([[Adh-Dhariyat]]) |
+{{#ifexpr: ({{{1|1}}} = 52) | 52 ([[At-Tur]]) |
+{{#ifexpr: ({{{1|1}}} = 53) | 53 ([[An-Najm]]) |
+{{#ifexpr: ({{{1|1}}} = 54) | 54 ([[Al-Qamar]]) |
+{{#ifexpr: ({{{1|1}}} = 55) | 55 ([[Ar-Rahman]]) |
+{{#ifexpr: ({{{1|1}}} = 56) | 56 ([[Al-Waqia]]) |
+{{#ifexpr: ({{{1|1}}} = 57) | 57 ([[Al-Hadid]]) |
+{{#ifexpr: ({{{1|1}}} = 58) | 58 ([[Al-Mujadila]]) |
+{{#ifexpr: ({{{1|1}}} = 59) | 59 ([[Al-Hashr]]) |
+{{#ifexpr: ({{{1|1}}} = 60) | 60 ([[Al-Mumtahina]]) |
+{{#ifexpr: ({{{1|1}}} = 61) | 61 ([[As-Saff]]) |
+{{#ifexpr: ({{{1|1}}} = 62) | 62 ([[Al-Jumua]]) |
+{{#ifexpr: ({{{1|1}}} = 63) | 63 ([[Al-Munafiqoon]]) |
+{{#ifexpr: ({{{1|1}}} = 64) | 64 ([[At-Taghabun]]) |
+{{#ifexpr: ({{{1|1}}} = 65) | 65 ([[At-Talaq]]) |
+{{#ifexpr: ({{{1|1}}} = 66) | 66 ([[At-Tahrim]]) |
+{{#ifexpr: ({{{1|1}}} = 67) | 67 ([[Al-Mulk]]) |
+{{#ifexpr: ({{{1|1}}} = 68) | 68 ([[Al-Qalam]]) |
+{{#ifexpr: ({{{1|1}}} = 69) | 69 ([[Al-Haaqqa]]) |
+{{#ifexpr: ({{{1|1}}} = 70) | 70 ([[Al-Maarij]]) |
+{{#ifexpr: ({{{1|1}}} = 71) | 71 ([[Nooh (sura)|Nooh]]) |
+{{#ifexpr: ({{{1|1}}} = 72) | 72 ([[Al-Jinn]]) |
+{{#ifexpr: ({{{1|1}}} = 73) | 73 ([[Al-Muzzammil]]) |
+{{#ifexpr: ({{{1|1}}} = 74) | 74 ([[Al-Muddaththir]]) |
+{{#ifexpr: ({{{1|1}}} = 75) | 75 ([[Al-Qiyama]]) |
+{{#ifexpr: ({{{1|1}}} = 76) | 76 ([[Al-Insan]]) |
+{{#ifexpr: ({{{1|1}}} = 77) | 77 ([[Al-Mursalat]]) |
+{{#ifexpr: ({{{1|1}}} = 78) | 78 ([[An-Naba]]) |
+{{#ifexpr: ({{{1|1}}} = 79) | 79 ([[An-Naziat]]) |
+{{#ifexpr: ({{{1|1}}} = 80) | 80 ([[Abasa]]) |
+{{#ifexpr: ({{{1|1}}} = 81) | 81 ([[At-Takwir]]) |
+{{#ifexpr: ({{{1|1}}} = 82) | 82 ([[Al-Infitar]]) |
+{{#ifexpr: ({{{1|1}}} = 83) | 83 ([[Al-Mutaffifin]]) |
+{{#ifexpr: ({{{1|1}}} = 84) | 84 ([[Al-Inshiqaq]]) |
+{{#ifexpr: ({{{1|1}}} = 85) | 85 ([[Al-Burooj]]) |
+{{#ifexpr: ({{{1|1}}} = 86) | 86 ([[At-Tariq]]) |
+{{#ifexpr: ({{{1|1}}} = 87) | 87 ([[Al-Ala]]) |
+{{#ifexpr: ({{{1|1}}} = 88) | 88 ([[Al-Ghashiya]]) |
+{{#ifexpr: ({{{1|1}}} = 89) | 89 ([[Al-Fajr (sura)|Al-Fajr]]) |
+{{#ifexpr: ({{{1|1}}} = 90) | 90 ([[Al-Balad]]) |
+{{#ifexpr: ({{{1|1}}} = 91) | 91 ([[Ash-Shams]]) |
+{{#ifexpr: ({{{1|1}}} = 92) | 92 ([[Al-Lail]]) |
+{{#ifexpr: ({{{1|1}}} = 93) | 93 ([[Ad-Dhuha]]) |
+{{#ifexpr: ({{{1|1}}} = 94) | 94 ([[Al-Inshirah]]) |
+{{#ifexpr: ({{{1|1}}} = 95) | 95 ([[At-Tin]]) |
+{{#ifexpr: ({{{1|1}}} = 96) | 96 ([[Al-Alaq]]) |
+{{#ifexpr: ({{{1|1}}} = 97) | 97 ([[Al-Qadr]]) |
+{{#ifexpr: ({{{1|1}}} = 98) | 98 ([[Al-Bayyina]]) |
+{{#ifexpr: ({{{1|1}}} = 99) | 99 ([[Az-Zalzala]]) |
+{{#ifexpr: ({{{1|1}}} = 100) | 100 ([[Al-Adiyat]]) |
+{{#ifexpr: ({{{1|1}}} = 101) | 101 ([[Al-Qaria]]) |
+{{#ifexpr: ({{{1|1}}} = 102) | 102 ([[At-Takathur]]) |
+{{#ifexpr: ({{{1|1}}} = 103) | 103 ([[Al-Asr]]) |
+{{#ifexpr: ({{{1|1}}} = 104) | 104 ([[Al-Humaza]]) |
+{{#ifexpr: ({{{1|1}}} = 105) | 105 ([[Al-Fil]]) |
+{{#ifexpr: ({{{1|1}}} = 106) | 106 ([[Quraysh (sura)|Quraysh]]) |
+{{#ifexpr: ({{{1|1}}} = 107) | 107 ([[Al-Ma'un]]) |
+{{#ifexpr: ({{{1|1}}} = 108) | 108 ([[Al-Kawthar]]) |
+{{#ifexpr: ({{{1|1}}} = 109) | 109 ([[Al-Kafirun]]) |
+{{#ifexpr: ({{{1|1}}} = 110) | 110 ([[An-Nasr]]) |
+{{#ifexpr: ({{{1|1}}} = 111) | 111 ([[Al-Masadd]]) |
+{{#ifexpr: ({{{1|1}}} = 112) | 112 ([[Al-Ikhlas]]) |
+{{#ifexpr: ({{{1|1}}} = 113) | 113 ([[Al-Falaq]]) |
+{{#ifexpr: ({{{1|1}}} = 114) | 114 ([[An-Nas]]) |
+error }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }}, [[ayat|verse]] [http://www.usc.edu/dept/MSA/quran/{{three digit|{{{1|1}}}}}.qmt.html#{{three digit|{{{1|1}}}}}.{{three digit|{{{2|1}}}}} {{{2|1}}}]''':'''{{cquote| {{{3|Default text}}}&mdash; <small>[[Qur'an translations|translated]] by {{#ifexpr: ({{{4|0}}} = 0) | Unknown |
+{{#ifexpr: ({{{4|0}}} = 1) | [[Salman the Persian]] |
+{{#ifexpr: ({{{4|0}}} = 101) | [[Marmaduke Pickthall]] |
+{{#ifexpr: ({{{4|0}}} = 102) | [[Abdullah Yusuf Ali]] |
+{{#ifexpr: ({{{4|0}}} = 601) | [[Muhammad Muhsin Khan]] |
+{{#ifexpr: ({{{4|0}}} = 701) | [[Mohammed Habib Shakir|M. H. Shakir]] |
+{{#ifexpr: ({{{4|0}}} = 901) | [[Maulana Muhammad Ali]] |
+{{#ifexpr: ({{{4|0}}} = 902) | [[Rashad Khalifa]] |
+{{#ifexpr: ({{{4|0}}} = 1001) | [[Theodor Bibliander]] |
+{{#ifexpr: ({{{4|0}}} = 1002) | [[Robert of Ketton]] |
+{{#ifexpr: ({{{4|0}}} = 1003) | [[Andre du Ryer]] |
+{{#ifexpr: ({{{4|0}}} = 1004) | [[Alexander Ross (writer)|Alexander Ross]] |
+{{#ifexpr: ({{{4|0}}} = 1005) | [[Abraham Hinckelmann]] |
+{{#ifexpr: ({{{4|0}}} = 1006) | [[George Sale]] |
+{{#ifexpr: ({{{4|0}}} = 1007) | [[John Medows Rodwell]] |
+{{#ifexpr: ({{{4|0}}} = 1008) | [[Arthur John Arberry]] |
+error }} }} }} }} }} }} }} }} }} }} }} }} }} }} }} }}</small>
+{{#if:{{{trans|}}}|
+----
+[[Transliteration]]: {{{trans}}}| }}
+{{#if:{{{arab|}}}|
+----
+[[Arabic language|Arabic]]: {{{arab}}}| }} }}</font></div>
+