Page MenuHomePhabricator

No OneTemporary

File Metadata

Created
Wed, Oct 16, 9:10 AM
This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/tests/TestUtils.js b/tests/TestUtils.js
index 82323ba0b..b7ee06dda 100644
--- a/tests/TestUtils.js
+++ b/tests/TestUtils.js
@@ -1,1159 +1,1159 @@
/**
* @module
*/
'use strict';
require('../core-upgrade.js');
var colors = require('colors');
var yargs = require('yargs');
var Diff = require('../lib/utils/Diff.js').Diff;
var DU = require('../lib/utils/DOMUtils.js').DOMUtils;
var Util = require('../lib/utils/Util.js').Util;
var TestUtils = {};
/**
* Specialized normalization of the wiki parser output, mostly to ignore a few
* known-ok differences. If parsoidOnly is true-ish, then we allow more
* markup through (like property and typeof attributes), for better
* checking of parsoid-only test cases.
*
* @param {string} out
* @param {boolean} [parsoidOnly=false]
* @return {string}
*/
TestUtils.normalizeOut = function(out, parsoidOnly) {
if (typeof (out) === 'string') {
out = DU.parseHTML(out).body;
}
var stripTypeof = parsoidOnly ?
/(?:^|mw:DisplaySpace\s+)mw:Placeholder$/ :
/^mw:(?:(?:DisplaySpace\s+mw:)?Placeholder|Nowiki|Transclusion|Entity)$/;
var body = this.normalizeIEW(out, stripTypeof, parsoidOnly);
out = DU.toXML(body, { innerXML: true });
// NOTE that we use a slightly restricted regexp for "attribute"
// which works for the output of DOM serialization. For example,
// we know that attribute values will be surrounded with double quotes,
// not unquoted or quoted with single quotes. The serialization
// algorithm is given by:
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments
if (!/[^<]*(<\w+(\s+[^\0-\cZ\s"'>\/=]+(="[^"]*")?)*\/?>[^<]*)*/.test(out)) {
throw new Error("normalizeOut input is not in standard serialized form");
}
if (parsoidOnly) {
// unnecessary attributes, we don't need to check these
// style is in there because we should only check classes.
- out = out.replace(/ (data-parsoid|prefix|about|rev|datatype|inlist|vocab|content|style)="[^\"]*"/g, '');
+ out = out.replace(/ (data-parsoid|prefix|about|rev|datatype|inlist|vocab|content|style)=\\?"[^\"]*\\?"/g, '');
// single-quoted variant
- out = out.replace(/ (data-parsoid|prefix|about|rev|datatype|inlist|vocab|content|style)='[^\']*'/g, '');
+ out = out.replace(/ (data-parsoid|prefix|about|rev|datatype|inlist|vocab|content|style)=\\?'[^\']*\\?'/g, '');
// strip self-closed <nowiki /> because we frequently test WTS
// <nowiki> insertion by providing an html/parsoid section with the
// <meta> tags stripped out, allowing the html2wt test to verify that
// the <nowiki> is correctly added during WTS, while still allowing
// the html2html and wt2html versions of the test to pass as a
// sanity check. If <meta>s were not stripped, these tests would all
// have to be modified and split up. Not worth it at this time.
// (see commit 689b22431ad690302420d049b10e689de6b7d426)
out = out
.replace(/<span typeof="mw:Nowiki"><\/span>/g, '');
return out;
}
// Normalize headings by stripping out Parsoid-added ids so that we don't
// have to add these ids to every parser test that uses headings.
// We will test the id generation scheme separately via mocha tests.
out = out.replace(/(<h[1-6].*?) id="[^"]*"([^>]*>)/g, '$1$2');
// strip meta/link elements
out = out
.replace(/<\/?(?:meta|link)(?: [^\0-\cZ\s"'>\/=]+(?:=(?:"[^"]*"|'[^']*'))?)*\/?>/g, '');
// Ignore troublesome attributes.
// Strip JSON attributes like data-mw and data-parsoid early so that
// comment stripping in normalizeNewlines does not match unbalanced
// comments in wikitext source.
out = out.replace(/ (data-mw|data-parsoid|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|class)="[^\"]*"/g, '');
// single-quoted variant
out = out.replace(/ (data-mw|data-parsoid|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content|class)='[^\']*'/g, '');
// strip typeof last
out = out.replace(/ typeof="[^\"]*"/g, '');
return out
// replace mwt ids
.replace(/ id="mw((t\d+)|([\w-]{2,}))"/g, '')
.replace(/<span[^>]+about="[^"]*"[^>]*>/g, '')
.replace(/(\s)<span>\s*<\/span>\s*/g, '$1')
.replace(/<span>\s*<\/span>/g, '')
.replace(/(href=")(?:\.?\.\/)+/g, '$1')
// replace unnecessary URL escaping
.replace(/ href="[^"]*"/g, Util.decodeURI)
// strip thumbnail size prefixes
.replace(/(src="[^"]*?)\/thumb(\/[0-9a-f]\/[0-9a-f]{2}\/[^\/]+)\/[0-9]+px-[^"\/]+(?=")/g, '$1$2');
};
/**
* Normalize newlines in IEW to spaces instead.
*
* @param {Node} body
* The document `<body>` node to normalize.
* @param {RegExp} [stripSpanTypeof]
* @param {boolean} [parsoidOnly=false]
* @return {Node}
*/
TestUtils.normalizeIEW = function(body, stripSpanTypeof, parsoidOnly) {
var newlineAround = function(node) {
return node && /^(BODY|CAPTION|DIV|DD|DT|LI|P|TABLE|TR|TD|TH|TBODY|DL|OL|UL|H[1-6])$/.test(node.nodeName);
};
var unwrapSpan; // forward declare
var cleanSpans = function(node) {
var child, next;
if (!stripSpanTypeof) { return; }
for (child = node.firstChild; child; child = next) {
next = child.nextSibling;
if (child.nodeName === 'SPAN' &&
stripSpanTypeof.test(child.getAttribute('typeof') || '')) {
unwrapSpan(node, child);
}
}
};
unwrapSpan = function(parent, node) {
var child, next, placeholder;
// first recurse to unwrap any spans in the immediate children.
cleanSpans(node);
// now unwrap this span.
placeholder = node.ownerDocument.createTextNode('XXX');
parent.replaceChild(placeholder, node);
for (child = node.firstChild; child; child = next) {
next = child.nextSibling;
parent.insertBefore(child, placeholder);
}
parent.removeChild(placeholder);
};
var visit = function(node, stripLeadingWS, stripTrailingWS, inPRE) {
var child, next, prev;
if (node.nodeName === 'PRE') {
// Preserve newlines in <pre> tags
inPRE = true;
}
if (DU.isText(node)) {
if (!inPRE) {
node.data = node.data.replace(/\s+/g, ' ');
}
if (stripLeadingWS) {
node.data = node.data.replace(/^\s+/, '');
}
if (stripTrailingWS) {
node.data = node.data.replace(/\s+$/, '');
}
}
// unwrap certain SPAN nodes
cleanSpans(node);
// now remove comment nodes
if (!parsoidOnly) {
for (child = node.firstChild; child; child = next) {
next = child.nextSibling;
if (DU.isComment(child)) {
node.removeChild(child);
}
}
}
// reassemble text nodes split by a comment or span, if necessary
node.normalize();
// now recurse.
if (node.nodeName === 'PRE') {
// hack, since PHP adds a newline before </pre>
stripLeadingWS = false;
stripTrailingWS = true;
} else if (node.nodeName === 'SPAN' &&
/^mw[:]/.test(node.getAttribute('typeof') || '')) {
// SPAN is transparent; pass the strip parameters down to kids
} else {
stripLeadingWS = stripTrailingWS = newlineAround(node);
}
child = node.firstChild;
// Skip over the empty mw:FallbackId <span> and strip leading WS
// on the other side of it.
if (/^H[1-6]$/.test(node.nodeName) &&
child && child.nodeName === 'SPAN' &&
child.getAttribute('typeof') === 'mw:FallbackId') {
child = child.nextSibling;
}
for (; child; child = next) {
next = child.nextSibling;
visit(child,
stripLeadingWS,
stripTrailingWS && !child.nextSibling,
inPRE);
stripLeadingWS = false;
}
if (inPRE) { return node; }
// now add newlines around appropriate nodes.
for (child = node.firstChild; child; child = next) {
prev = child.previousSibling;
next = child.nextSibling;
if (newlineAround(child)) {
if (prev && DU.isText(prev)) {
prev.data = prev.data.replace(/\s*$/, '\n');
} else {
prev = node.ownerDocument.createTextNode('\n');
node.insertBefore(prev, child);
}
if (next && DU.isText(next)) {
next.data = next.data.replace(/^\s*/, '\n');
} else {
next = node.ownerDocument.createTextNode('\n');
node.insertBefore(next, child.nextSibling);
}
}
}
return node;
};
// clone body first, since we're going to destructively mutate it.
return visit(body.cloneNode(true), true, true, false);
};
/**
* Strip some php output we aren't generating.
*/
TestUtils.normalizePhpOutput = function(html) {
return html
// do not expect section editing for now
.replace(/<span[^>]+class="mw-headline"[^>]*>(.*?)<\/span> *(<span class="mw-editsection"><span class="mw-editsection-bracket">\[<\/span>.*?<span class="mw-editsection-bracket">\]<\/span><\/span>)?/g, '$1')
.replace(/<a[^>]+class="mw-headline-anchor"[^>]*>§<\/a>/g, '');
};
/**
* Normalize the expected parser output by parsing it using a HTML5 parser and
* re-serializing it to HTML. Ideally, the parser would normalize inter-tag
* whitespace for us. For now, we fake that by simply stripping all newlines.
*
* @param {string} source
* @return {string}
*/
TestUtils.normalizeHTML = function(source) {
try {
var body = this.normalizeIEW(DU.parseHTML(source).body);
var html = DU.toXML(body, { innerXML: true })
// a few things we ignore for now..
// .replace(/\/wiki\/Main_Page/g, 'Main Page')
// do not expect a toc for now
.replace(/<div[^>]+?id="toc"[^>]*>\s*<div id="toctitle"[^>]*>[\s\S]+?<\/div>[\s\S]+?<\/div>\s*/g, '');
return this.normalizePhpOutput(html)
// remove empty span tags
.replace(/(\s)<span>\s*<\/span>\s*/g, '$1')
.replace(/<span>\s*<\/span>/g, '')
// general class and titles, typically on links
.replace(/ (class|rel|about|typeof)="[^"]*"/g, '')
// strip red link markup, we do not check if a page exists yet
.replace(/\/index.php\?title=([^']+?)&amp;action=edit&amp;redlink=1/g, '/wiki/$1')
// strip red link title info
.replace(/ \((?:page does not exist|encara no existeix|bet ele jaratılmag'an|lonkásá ezalí tɛ̂)\)/g, '') // eslint-disable-line
// the expected html has some extra space in tags, strip it
.replace(/<a +href/g, '<a href')
.replace(/href="\/wiki\//g, 'href="')
.replace(/" +>/g, '">')
// parsoid always add a page name to lonely fragments
.replace(/href="#/g, 'href="Main Page#')
// replace unnecessary URL escaping
.replace(/ href="[^"]*"/g, Util.decodeURI)
// strip empty spans
.replace(/(\s)<span>\s*<\/span>\s*/g, '$1')
.replace(/<span>\s*<\/span>/g, '');
} catch (e) {
console.log("normalizeHTML failed on" +
source + " with the following error: " + e);
console.trace();
return source;
}
};
/**
* Colorize given number if <> 0.
*
* @param {number} count
* @param {string} color
* @return {string} Colorized count
*/
var colorizeCount = function(count, color) {
// We need a string to use colors methods
var s = count.toString();
if (count === 0 || !s[color]) {
return s;
}
return s[color] + '';
};
/**
* @param {Array} modesRan
* @param {Object} stats
* @param {number} stats.failedTests Number of failed tests due to differences in output.
* @param {number} stats.passedTests Number of tests passed without any special consideration.
* @param {number} stats.passedTestsWhitelisted Number of tests passed by whitelisting.
* @param {Object} stats.modes All of the stats (failedTests, passedTests, and passedTestsWhitelisted) per-mode.
* @param {string} file
* @param {number} loggedErrorCount
* @param {RegExp|null} testFilter
* @param {boolean} blacklistChanged
* @return {number} The number of failures.
*/
var reportSummary = function(modesRan, stats, file, loggedErrorCount, testFilter, blacklistChanged) {
var curStr, mode, thisMode;
var failTotalTests = stats.failedTests;
var happiness = (
stats.passedTestsUnexpected === 0 && stats.failedTestsUnexpected === 0
);
var filename = (file === null) ? "ALL TESTS" : file;
if (file === null) { console.log(); }
console.log("==========================================================");
console.log("SUMMARY:", happiness ? filename.green : filename.red);
if (console.time && console.timeEnd && file !== null) {
console.timeEnd('Execution time');
}
if (failTotalTests !== 0) {
for (var i = 0; i < modesRan.length; i++) {
mode = modesRan[i];
curStr = mode + ': ';
thisMode = stats.modes[mode];
curStr += colorizeCount(thisMode.passedTests + thisMode.passedTestsWhitelisted, 'green') + ' passed (';
curStr += colorizeCount(thisMode.passedTestsUnexpected, 'red') + ' unexpected, ';
curStr += colorizeCount(thisMode.passedTestsWhitelisted, 'yellow') + ' whitelisted) / ';
curStr += colorizeCount(thisMode.failedTests, 'red') + ' failed (';
curStr += colorizeCount(thisMode.failedTestsUnexpected, 'red') + ' unexpected)';
console.log(curStr);
}
curStr = 'TOTAL' + ': ';
curStr += colorizeCount(stats.passedTests + stats.passedTestsWhitelisted, 'green') + ' passed (';
curStr += colorizeCount(stats.passedTestsUnexpected, 'red') + ' unexpected, ';
curStr += colorizeCount(stats.passedTestsWhitelisted, 'yellow') + ' whitelisted) / ';
curStr += colorizeCount(stats.failedTests, 'red') + ' failed (';
curStr += colorizeCount(stats.failedTestsUnexpected, 'red') + ' unexpected)';
console.log(curStr);
if (file === null) {
console.log(colorizeCount(stats.passedTests + stats.passedTestsWhitelisted, 'green') +
' total passed tests (expected ' +
(stats.passedTests + stats.passedTestsWhitelisted - stats.passedTestsUnexpected + stats.failedTestsUnexpected) +
'), ' +
colorizeCount(failTotalTests , 'red') + ' total failures (expected ' +
(stats.failedTests - stats.failedTestsUnexpected + stats.passedTestsUnexpected) +
')');
}
} else {
if (testFilter !== null) {
console.log("Passed " + (stats.passedTests + stats.passedTestsWhitelisted) +
" of " + stats.passedTests + " tests matching " + testFilter +
"... " + "ALL TESTS PASSED!".green);
} else {
// Should not happen if it does: Champagne!
console.log("Passed " + stats.passedTests + " of " + stats.passedTests +
" tests... " + "ALL TESTS PASSED!".green);
}
}
// If we logged error messages, complain about it.
var logMsg = 'No errors logged.'.green;
if (loggedErrorCount > 0) {
logMsg = (loggedErrorCount + " errors logged.").red;
}
if (file === null) {
if (loggedErrorCount > 0) {
logMsg = ('' + loggedErrorCount).red;
} else {
logMsg = ('' + loggedErrorCount).green;
}
logMsg += ' errors logged.';
}
console.log(logMsg);
var failures = (
stats.passedTestsUnexpected +
stats.failedTestsUnexpected +
loggedErrorCount
);
// If the blacklist changed, complain about it.
if (blacklistChanged) {
console.log("Blacklist changed!".red);
}
if (file === null) {
if (failures === 0) {
console.log('--> ' + 'NO UNEXPECTED RESULTS'.green + ' <--');
if (blacklistChanged) {
console.log("Perhaps some tests were deleted or renamed.");
console.log("Use `bin/parserTests.js --rewrite-blacklist` to update blacklist.");
}
} else {
console.log(('--> ' + failures + ' UNEXPECTED RESULTS. <--').red);
}
}
return failures;
};
var prettyPrintIOptions = function(iopts) {
if (!iopts) { return ''; }
var ppValue = function(v) {
if (Array.isArray(v)) {
return v.map(ppValue).join(',');
}
if (typeof v !== 'string') {
return JSON.stringify(v);
}
if (/^\[\[[^\]]*\]\]$/.test(v) || /^[-\w]+$/.test(v)) {
return v;
}
return JSON.stringify(v);
};
return Object.keys(iopts).map(function(k) {
if (iopts[k] === '') { return k; }
return k + '=' + ppValue(iopts[k]);
}).join(' ');
};
var printWhitelistEntry = function(title, raw) {
console.log('WHITELIST ENTRY:'.cyan + '');
console.log('testWhiteList[' +
JSON.stringify(title) + '] = ' +
JSON.stringify(raw) + ';\n');
};
/**
* @param {Object} stats
* @param {Object} item
* @param {Object} options
* @param {string} mode
* @param {string} title
* @param {Object} actual
* @param {Object} expected
* @param {boolean} expectFail Whether this test was expected to fail (on blacklist).
* @param {boolean} failureOnly Whether we should print only a failure message, or go on to print the diff.
* @param {Object} bl BlackList.
* @return {boolean} True if the failure was expected.
*/
var printFailure = function(stats, item, options, mode, title, actual, expected, expectFail, failureOnly, bl) {
stats.failedTests++;
stats.modes[mode].failedTests++;
var fail = {
title: title,
raw: actual ? actual.raw : null,
expected: expected ? expected.raw : null,
actualNormalized: actual ? actual.normal : null,
};
stats.modes[mode].failList.push(fail);
var extTitle = (title + (mode ? (' (' + mode + ')') : ''))
.replace('\n', ' ');
var blacklisted = false;
if (Util.booleanOption(options.blacklist) && expectFail) {
// compare with remembered output
if (bl[title][mode] !== actual.raw) {
blacklisted = true;
} else {
if (!Util.booleanOption(options.quiet)) {
console.log('EXPECTED FAIL'.red + ': ' + extTitle.yellow);
}
return true;
}
}
stats.failedTestsUnexpected++;
stats.modes[mode].failedTestsUnexpected++;
fail.unexpected = true;
if (!failureOnly) {
console.log('=====================================================');
}
console.log('UNEXPECTED FAIL'.red.inverse + ': ' + extTitle.yellow);
if (blacklisted) {
console.log('Blacklisted, but the output changed!'.red);
}
if (mode === 'selser') {
if (item.hasOwnProperty('wt2wtPassed') && item.wt2wtPassed) {
console.log('Even worse, the non-selser wt2wt test passed!'.red);
} else if (actual && item.hasOwnProperty('wt2wtResult') &&
item.wt2wtResult !== actual.raw) {
console.log('Even worse, the non-selser wt2wt test had a different result!'.red);
}
}
if (!failureOnly) {
console.log(item.comments.join('\n'));
if (options) {
console.log('OPTIONS'.cyan + ':');
console.log(prettyPrintIOptions(item.options) + '\n');
}
console.log('INPUT'.cyan + ':');
console.log(actual.input + '\n');
console.log(options.getActualExpected(actual, expected, options.getDiff));
if (Util.booleanOption(options.printwhitelist)) {
printWhitelistEntry(title, actual.raw);
}
}
return false;
};
/**
* @param {Object} stats
* @param {Object} item
* @param {Object} options
* @param {string} mode
* @param {string} title
* @param {boolean} expectSuccess Whether this success was expected (or was this test blacklisted?).
* @param {boolean} isWhitelist Whether this success was due to a whitelisting.
* @return {boolean} True if the success was expected.
*/
var printSuccess = function(stats, item, options, mode, title, expectSuccess, isWhitelist) {
var quiet = Util.booleanOption(options.quiet);
if (isWhitelist) {
stats.passedTestsWhitelisted++;
stats.modes[mode].passedTestsWhitelisted++;
} else {
stats.passedTests++;
stats.modes[mode].passedTests++;
}
var extTitle = (title + (mode ? (' (' + mode + ')') : ''))
.replace('\n', ' ');
if (Util.booleanOption(options.blacklist) && !expectSuccess) {
stats.passedTestsUnexpected++;
stats.modes[mode].passedTestsUnexpected++;
console.log('UNEXPECTED PASS'.green.inverse +
(isWhitelist ? ' (whitelist)' : '') +
':' + extTitle.yellow);
return false;
}
if (!quiet) {
var outStr = 'EXPECTED PASS';
if (isWhitelist) {
outStr += ' (whitelist)';
}
outStr = outStr.green + ': ' + extTitle.yellow;
console.log(outStr);
if (mode === 'selser' && item.hasOwnProperty('wt2wtPassed') &&
!item.wt2wtPassed) {
console.log('Even better, the non-selser wt2wt test failed!'.red);
}
}
return true;
};
/**
* Print the actual and expected outputs.
*
* @param {Object} actual
* @param {string} actual.raw
* @param {string} actual.normal
* @param {Object} expected
* @param {string} expected.raw
* @param {string} expected.normal
* @param {Function} getDiff Returns a string showing the diff(s) for the test.
* @param {Object} getDiff.actual
* @param {Object} getDiff.expected
* @return {string}
*/
var getActualExpected = function(actual, expected, getDiff) {
let mkVisible =
s => s.replace(/\n/g, '\u21b5\n'.white).replace(/\xA0/g, '\u2423'.white);
if (colors.mode === 'none') {
mkVisible = s => s;
}
var returnStr = '';
returnStr += 'RAW EXPECTED'.cyan + ':\n';
returnStr += expected.raw + '\n';
returnStr += 'RAW RENDERED'.cyan + ':\n';
returnStr += actual.raw + '\n';
returnStr += 'NORMALIZED EXPECTED'.magenta + ':\n';
returnStr += mkVisible(expected.normal) + '\n';
returnStr += 'NORMALIZED RENDERED'.magenta + ':\n';
returnStr += mkVisible(actual.normal) + '\n';
returnStr += 'DIFF'.cyan + ':\n';
returnStr += getDiff(actual, expected);
return returnStr;
};
/**
* @param {Object} actual
* @param {string} actual.normal
* @param {Object} expected
* @param {string} expected.normal
* @return {string} Colorized diff
*/
var doDiff = function(actual, expected) {
// safe to always request color diff, because we set color mode='none'
// if colors are turned off.
var e = expected.normal.replace(/\xA0/g, '\u2423');
var a = actual.normal.replace(/\xA0/g, '\u2423');
return Diff.colorDiff(e, a, {
context: 2,
noColor: (colors.mode === 'none'),
});
};
/**
* @param {Function} reportFailure
* @param {Function} reportSuccess
* @param {Object} bl BlackList.
* @param {Object} wl WhiteList.
* @param {Object} stats
* @param {Object} item
* @param {Object} options
* @param {string} mode
* @param {Object} expected
* @param {Object} actual
* @param {Function} pre
* @param {Function} post
* @return {boolean} True if the result was as expected.
*/
function printResult(reportFailure, reportSuccess, bl, wl, stats, item, options, mode, expected, actual, pre, post) {
var title = item.title; // Title may be modified here, so pass it on.
var quick = Util.booleanOption(options.quick);
var parsoidOnly =
('html/parsoid' in item) || (item.options.parsoid !== undefined);
if (mode === 'selser') {
title += ' ' + (item.changes ? JSON.stringify(item.changes) : 'manual');
}
var whitelist = false;
var tb = bl[title];
var expectFail = (tb && tb.hasOwnProperty(mode));
var fail = (expected.normal !== actual.normal);
// Return whether the test was as expected, independent of pass/fail
var asExpected;
if (fail &&
Util.booleanOption(options.whitelist) &&
title in wl &&
TestUtils.normalizeOut(DU.parseHTML(wl[title]).body, parsoidOnly) === actual.normal
) {
whitelist = true;
fail = false;
}
if (mode === 'wt2wt') {
item.wt2wtPassed = !fail;
item.wt2wtResult = actual.raw;
}
// don't report selser fails when nothing was changed or it's a dup
if (mode === 'selser' && (item.changes === 0 || item.duplicateChange)) {
return true;
}
if (typeof pre === 'function') {
pre(stats, mode, title, item.time);
}
if (fail) {
asExpected = reportFailure(stats, item, options, mode, title, actual, expected, expectFail, quick, bl);
} else {
asExpected = reportSuccess(stats, item, options, mode, title, !expectFail, whitelist);
}
if (typeof post === 'function') {
post(stats, mode);
}
return asExpected;
}
var _reportOnce = false;
/**
* Simple function for reporting the start of the tests.
*
* This method can be reimplemented in the options of the ParserTests object.
*/
var reportStartOfTests = function() {
if (!_reportOnce) {
_reportOnce = true;
console.log('ParserTests running with node', process.version);
console.log('Initialization complete. Now launching tests.');
}
};
/**
* Get the actual and expected outputs encoded for XML output.
*
* @inheritdoc getActualExpected
*
* @return {string} The XML representation of the actual and expected outputs.
*/
var getActualExpectedXML = function(actual, expected, getDiff) {
var returnStr = '';
returnStr += 'RAW EXPECTED:\n';
returnStr += DU.encodeXml(expected.raw) + '\n\n';
returnStr += 'RAW RENDERED:\n';
returnStr += DU.encodeXml(actual.raw) + '\n\n';
returnStr += 'NORMALIZED EXPECTED:\n';
returnStr += DU.encodeXml(expected.normal) + '\n\n';
returnStr += 'NORMALIZED RENDERED:\n';
returnStr += DU.encodeXml(actual.normal) + '\n\n';
returnStr += 'DIFF:\n';
returnStr += DU.encodeXml(getDiff(actual, expected, false));
return returnStr;
};
/**
* Report the start of the tests output.
*
* @inheritdoc reportStart
*/
var reportStartXML = function() {};
/**
* Report the end of the tests output.
*
* @inheritdoc reportSummary
*/
var reportSummaryXML = function(modesRan, stats, file, loggedErrorCount, testFilter, blacklistChanged) {
if (file === null) {
/* Summary for all tests; not included in XML format output. */
return;
}
console.log('<testsuites file="' + file + '">');
for (var i = 0; i < modesRan.length; i++) {
var mode = modesRan[i];
console.log('<testsuite name="parserTests-' + mode + '">');
console.log(stats.modes[mode].result);
console.log('</testsuite>');
}
console.log('</testsuites>');
};
/**
* Print a failure message for a test in XML.
*
* @inheritdoc printFailure
*/
var reportFailureXML = function(stats, item, options, mode, title, actual, expected, expectFail, failureOnly, bl) {
stats.failedTests++;
stats.modes[mode].failedTests++;
var failEle = '';
var blacklisted = false;
if (Util.booleanOption(options.blacklist) && expectFail) {
// compare with remembered output
blacklisted = (bl[title][mode] === actual.raw);
}
if (!blacklisted) {
failEle += '<failure type="parserTestsDifferenceInOutputFailure">\n';
failEle += getActualExpectedXML(actual, expected, options.getDiff);
failEle += '\n</failure>';
stats.failedTestsUnexpected++;
stats.modes[mode].failedTestsUnexpected++;
stats.modes[mode].result += failEle;
}
};
/**
* Print a success method for a test in XML.
*
* @inheritdoc printSuccess
*/
var reportSuccessXML = function(stats, item, options, mode, title, expectSuccess, isWhitelist) {
if (isWhitelist) {
stats.passedTestsWhitelisted++;
stats.modes[mode].passedTestsWhitelisted++;
} else {
stats.passedTests++;
stats.modes[mode].passedTests++;
}
};
/**
* Print the result of a test in XML.
*
* @inheritdoc printResult
*/
var reportResultXML = function() {
function pre(stats, mode, title, time) {
var testcaseEle;
testcaseEle = '<testcase name="' + DU.encodeXml(title) + '" ';
testcaseEle += 'assertions="1" ';
var timeTotal;
if (time && time.end && time.start) {
timeTotal = time.end - time.start;
if (!isNaN(timeTotal)) {
testcaseEle += 'time="' + ((time.end - time.start) / 1000.0) + '"';
}
}
testcaseEle += '>';
stats.modes[mode].result += testcaseEle;
}
function post(stats, mode) {
stats.modes[mode].result += '</testcase>';
}
var args = Array.prototype.slice.call(arguments);
args = [ reportFailureXML, reportSuccessXML ].concat(args, pre, post);
printResult.apply(this, args);
// In xml, test all cases always
return true;
};
/**
* Get the options from the command line.
*
* @return {Object}
*/
var getOpts = function() {
var standardOpts = Util.addStandardOptions({
'wt2html': {
description: 'Wikitext -> HTML(DOM)',
'default': false,
'boolean': true,
},
'html2wt': {
description: 'HTML(DOM) -> Wikitext',
'default': false,
'boolean': true,
},
'wt2wt': {
description: 'Roundtrip testing: Wikitext -> DOM(HTML) -> Wikitext',
'default': false,
'boolean': true,
},
'html2html': {
description: 'Roundtrip testing: HTML(DOM) -> Wikitext -> HTML(DOM)',
'default': false,
'boolean': true,
},
'selser': {
description: 'Roundtrip testing: Wikitext -> DOM(HTML) -> Wikitext (with selective serialization). ' +
'Set to "noauto" to just run the tests with manual selser changes.',
'default': false,
'boolean': false,
},
'changetree': {
description: 'Changes to apply to parsed HTML to generate new HTML to be serialized (useful with selser)',
'default': null,
'boolean': false,
},
'use_source': {
description: 'Use original source in wt2wt tests',
'boolean': true,
'default': true,
},
'numchanges': {
description: 'Make multiple different changes to the DOM, run a selser test for each one.',
'default': 20,
'boolean': false,
},
'cache': {
description: 'Get tests cases from cache file',
'boolean': true,
'default': false,
},
'filter': {
description: 'Only run tests whose descriptions match given string',
},
'regex': {
description: 'Only run tests whose descriptions match given regex',
alias: ['regexp', 're'],
},
'run-disabled': {
description: 'Run disabled tests',
'default': false,
'boolean': true,
},
'run-php': {
description: 'Run php-only tests',
'default': false,
'boolean': true,
},
'maxtests': {
description: 'Maximum number of tests to run',
'boolean': false,
},
'quick': {
description: 'Suppress diff output of failed tests',
'boolean': true,
'default': false,
},
'quiet': {
description: 'Suppress notification of passed tests (shows only failed tests)',
'boolean': true,
'default': false,
},
'whitelist': {
description: 'Compare against manually verified parser output from whitelist',
'default': true,
'boolean': true,
},
'printwhitelist': {
description: 'Print out a whitelist entry for failing tests. Default false.',
'default': false,
'boolean': true,
},
'blacklist': {
description: 'Compare against expected failures from blacklist',
'default': true,
'boolean': true,
},
'rewrite-blacklist': {
description: 'Update parserTests-blacklist.js with failing tests.',
'default': false,
'boolean': true,
},
'exit-zero': {
description: "Don't exit with nonzero status if failures are found.",
'default': false,
'boolean': true,
},
xml: {
description: 'Print output in JUnit XML format.',
'default': false,
'boolean': true,
},
'exit-unexpected': {
description: 'Exit after the first unexpected result.',
'default': false,
'boolean': true,
},
'update-tests': {
description: 'Update parserTests.txt with results from wt2html fails.',
},
'update-unexpected': {
description: 'Update parserTests.txt with results from wt2html unexpected fails.',
'default': false,
'boolean': true,
},
}, {
// override defaults for standard options
fetchTemplates: false,
usePHPPreProcessor: false,
fetchConfig: false,
});
return yargs.usage(
'Usage: $0 [options] [tests-file]',
standardOpts
).check(function(argv, aliases) {
if (argv.filter === true) {
throw "--filter needs an argument";
}
if (argv.regex === true) {
throw "--regex needs an argument";
}
return true;
}).strict();
};
TestUtils.prepareOptions = function() {
var popts = getOpts();
var options = popts.argv;
if (options.help) {
popts.showHelp();
console.log("Additional dump options specific to parserTests script:");
console.log("* dom:post-changes : Dumps DOM after applying selser changetree\n");
console.log("Examples");
console.log("$ node parserTests --selser --filter '...' --dump dom:post-changes");
console.log("$ node parserTests --selser --filter '...' --changetree '...' --dump dom:post-changes\n");
process.exit(0);
}
Util.setColorFlags(options);
if (!(options.wt2wt || options.wt2html || options.html2wt || options.html2html || options.selser)) {
options.wt2wt = true;
options.wt2html = true;
options.html2html = true;
options.html2wt = true;
if (Util.booleanOption(options['rewrite-blacklist'])) {
// turn on all modes by default for --rewrite-blacklist
options.selser = true;
// sanity checking (T53448 asks to be able to use --filter here)
if (options.filter || options.regex || options.maxtests || options['exit-unexpected']) {
console.log("\nERROR> can't combine --rewrite-blacklist with --filter, --maxtests or --exit-unexpected");
process.exit(1);
}
}
}
if (options.xml) {
options.reportResult = reportResultXML;
options.reportStart = reportStartXML;
options.reportSummary = reportSummaryXML;
options.reportFailure = reportFailureXML;
colors.mode = 'none';
}
if (typeof options.reportFailure !== 'function') {
// default failure reporting is standard out,
// see printFailure for documentation of the default.
options.reportFailure = printFailure;
}
if (typeof options.reportSuccess !== 'function') {
// default success reporting is standard out,
// see printSuccess for documentation of the default.
options.reportSuccess = printSuccess;
}
if (typeof options.reportStart !== 'function') {
// default summary reporting is standard out,
// see reportStart for documentation of the default.
options.reportStart = reportStartOfTests;
}
if (typeof options.reportSummary !== 'function') {
// default summary reporting is standard out,
// see reportSummary for documentation of the default.
options.reportSummary = reportSummary;
}
if (typeof options.reportResult !== 'function') {
// default result reporting is standard out,
// see printResult for documentation of the default.
options.reportResult = printResult.bind(null, options.reportFailure, options.reportSuccess);
}
if (typeof options.getDiff !== 'function') {
// this is the default for diff-getting, but it can be overridden
// see doDiff for documentation of the default.
options.getDiff = doDiff;
}
if (typeof options.getActualExpected !== 'function') {
// this is the default for getting the actual and expected
// outputs, but it can be overridden
// see getActualExpected for documentation of the default.
options.getActualExpected = getActualExpected;
}
options.modes = [];
if (options.wt2html) {
options.modes.push('wt2html');
}
if (options.wt2wt) {
options.modes.push('wt2wt');
}
if (options.html2html) {
options.modes.push('html2html');
}
if (options.html2wt) {
options.modes.push('html2wt');
}
if (options.selser) {
options.modes.push('selser');
}
return options;
};
// Hard-code some interwiki prefixes, as is done
// in parserTest.inc:setupInterwikis()
TestUtils.iwl = {
local: {
url: 'http://doesnt.matter.org/$1',
localinterwiki: '',
},
wikipedia: {
url: 'http://en.wikipedia.org/wiki/$1',
},
meatball: {
// this has been updated in the live wikis, but the parser tests
// expect the old value (as set in parserTest.inc:setupInterwikis())
url: 'http://www.usemod.com/cgi-bin/mb.pl?$1',
},
memoryalpha: {
url: 'http://www.memory-alpha.org/en/index.php/$1',
},
zh: {
url: 'http://zh.wikipedia.org/wiki/$1',
language: '\u4e2d\u6587',
local: '',
},
es: {
url: 'http://es.wikipedia.org/wiki/$1',
language: 'espa\u00f1ol',
local: '',
},
fr: {
url: 'http://fr.wikipedia.org/wiki/$1',
language: 'fran\u00e7ais',
local: '',
},
ru: {
url: 'http://ru.wikipedia.org/wiki/$1',
language: '\u0440\u0443\u0441\u0441\u043a\u0438\u0439',
local: '',
},
mi: {
url: 'http://mi.wikipedia.org/wiki/$1',
// better for testing if one of the
// localinterwiki prefixes is also a
// language
language: 'Test',
local: '',
localinterwiki: '',
},
mul: {
url: 'http://wikisource.org/wiki/$1',
extralanglink: '',
linktext: 'Multilingual',
sitename: 'WikiSource',
local: '',
},
// not in PHP setupInterwikis(), but needed
en: {
url: 'http://en.wikipedia.org/wiki/$1',
language: 'English',
local: '',
protorel: '',
},
};
TestUtils.addNamespace = function(wikiConf, name) {
var nsid = name.id;
var old = wikiConf.siteInfo.namespaces[nsid];
if (old) { // Id may already be defined; if so, clear it.
if (old === name) { return; } // ParserTests does a lot redundantly.
wikiConf.namespaceIds.delete(Util.normalizeNamespaceName(old['*']));
wikiConf.canonicalNamespaces[Util.normalizeNamespaceName(old.canonical ? old.canonical : old['*'])] = undefined;
}
wikiConf.namespaceNames[nsid] = name['*'];
wikiConf.namespaceIds.set(Util.normalizeNamespaceName(name['*']), Number(nsid));
wikiConf.canonicalNamespaces[Util.normalizeNamespaceName(name.canonical ? name.canonical : name['*'])] = Number(nsid);
wikiConf.namespacesWithSubpages[nsid] = true;
wikiConf.siteInfo.namespaces[nsid] = name;
};
if (typeof module === "object") {
module.exports.TestUtils = TestUtils;
}
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index d09a0877f..272117f54 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -1,1864 +1,1863 @@
/* A map of tests which we know Parsoid currently fails.
*
* New patches which fix previously-broken tests should also patch this
* file to document which tests are now expected to succeed.
*
* This helps clean up 'npm test' output, documents known bugs, and helps
* Jenkins make sense of the parserTest output.
*
* NOTE that the selser blacklist depends on tests/selser.changes.json
* If the selser change list is modified, this blacklist should be refreshed.
*
* This blacklist can be automagically updated by running
* parserTests.js --rewrite-blacklist
* You might want to do this after you fix some bug that makes more tests
* pass. It is still your responsibility to carefully review the blacklist
* diff to ensure there are no unexpected new failures (lines added).
*/
/*
* This should map test titles to an array of test types (wt2html, wt2wt,
* html2html, html2wt, selser) which are known to fail.
* For easier maintenance, we group each test type together, and use a
* helper function to create the array if needed then append the test type.
*/
'use strict';
var testBlackList = {};
var add = function(mode, title, raw) { // eslint-disable-line
if (typeof (testBlackList[title]) !== 'object') {
testBlackList[title] = {};
}
testBlackList[title][mode] = raw;
};
// ### DO NOT REMOVE THIS LINE ### (start of automatically-generated section)
// Blacklist for wt2html
add("wt2html", "Extra newlines between heading and content are swallowed", "<h1 id=\"b\" data-parsoid='{\"dsr\":[0,3,1,1]}'>b</h1>\n\n<p data-parsoid='{\"dsr\":[5,5,0,0]}'><br data-parsoid='{\"dsr\":[5,5,0,0]}'/></p>\n\n<p data-parsoid='{\"dsr\":[7,12,0,0]}'><a rel=\"mw:WikiLink\" href=\"./A\" title=\"A\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./A\"},\"sa\":{\"href\":\"a\"},\"dsr\":[7,12,2,2]}'>a</a></p>");
add("wt2html", "Non-word characters don't terminate tag names (T19663, T42670, T54022)", "&lt;blockquote|>a\n\n<p data-parsoid='{\"dsr\":[29,57,0,0]}'>&lt;b→> doesn't terminate &lt;/b→></p>\n\n<p data-parsoid='{\"dsr\":[59,87,0,0]}'>&lt;bä> doesn't terminate &lt;/bä></p>\n\n<p data-parsoid='{\"dsr\":[89,119,0,0]}'>&lt;boo> doesn't terminate &lt;/boo></p>\n\n<p data-parsoid='{\"dsr\":[121,155,0,0]}'>&lt;s.foo> doesn't terminate &lt;/s.foo></p>\n\n<p data-parsoid='{\"dsr\":[157,167,0,0]}'>&lt;sub-ID#1></p>");
add("wt2html", "Non-word characters don't terminate tag names", "&lt;blockquote|>a\n\n<p data-parsoid='{\"dsr\":[29,57,0,0]}'>&lt;b→> doesn't terminate &lt;/b→></p>\n\n<p data-parsoid='{\"dsr\":[59,87,0,0]}'>&lt;bä> doesn't terminate &lt;/bä></p>\n\n<p data-parsoid='{\"dsr\":[89,119,0,0]}'>&lt;boo> doesn't terminate &lt;/boo></p>\n\n<p data-parsoid='{\"dsr\":[121,155,0,0]}'>&lt;s.foo> doesn't terminate &lt;/s.foo></p>\n\n<p data-parsoid='{\"dsr\":[157,167,0,0]}'>&lt;sub-ID#1></p>");
add("wt2html", "Comment on its own line post-expand", "<p data-parsoid='{\"dsr\":[0,20,0,0]}'>a\n<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[2,11,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"blank\",\"href\":\"./Template:Blank\"},\"params\":{},\"i\":0}}]}'></span><!---->\nb</p>");
add("wt2html", "Comment on its own line post-expand with non-significant whitespace", "<p data-parsoid='{\"dsr\":[0,23,0,0]}'>a\n <span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[3,12,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"blank\",\"href\":\"./Template:Blank\"},\"params\":{},\"i\":0}}]}'></span> <!----> \nb</p>");
add("wt2html", "Block tag on one line (<blockquote>)", "<p data-parsoid='{\"dsr\":[0,2,0,0]}'>a </p><blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[2,30,12,13]}'>foo</blockquote>\n\n<p data-parsoid='{\"dsr\":[32,33,0,0]}'>b</p>");
add("wt2html", "Block tag on both lines (<blockquote>)", "<p data-parsoid='{\"dsr\":[0,2,0,0]}'>a </p><blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[2,30,12,13]}'>foo</blockquote>\n\n<p data-parsoid='{\"dsr\":[32,34,0,0]}'>b </p><blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[34,62,12,13]}'>foo</blockquote>");
add("wt2html", "T54763: Preformatted in <blockquote>", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,74,12,13]}'>\n<p data-parsoid='{\"dsr\":[13,18,0,0]}'> Blah</p>\n<table data-parsoid='{\"dsr\":[19,60,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[22,58,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[22,57,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[22,57,1,0]}'>\n<pre data-parsoid='{\"dsr\":[24,57,1,0]}'>indented cell (no pre-wrapping!)</pre></td></tr>\n</tbody></table>\n</blockquote>");
add("wt2html", "T17491: <ins>/<del> in blockquote (2)", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,64,12,13]}'>Foo <del data-parsoid='{\"stx\":\"html\",\"dsr\":[16,30,5,6]}'>bar</del> <ins data-parsoid='{\"stx\":\"html\",\"dsr\":[31,45,5,6]}'>baz</ins> quux\n</blockquote>");
add("wt2html", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content", "<pre about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,11,1,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\" \"}},\"i\":0}},\"a\"]}'>a</pre>\n\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[13,25,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n \"}},\"i\":0}},\"a\"]}'>\n</span><pre about=\"#mwt2\">a</pre>\n\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[27,39,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n b\"}},\"i\":0}}]}'>\n</span><pre about=\"#mwt3\">b</pre>\n\n<p about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[41,54,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\\n \"}},\"i\":0}},\"b\"]}'>a</p><span about=\"#mwt4\">\n</span><pre about=\"#mwt4\">b</pre>\n\n<p about=\"#mwt5\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[56,67,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\\n\"}},\"i\":0}}]}'>a</p><span about=\"#mwt5\">\n</span><pre data-parsoid='{\"dsr\":[67,69,1,0]}'>b</pre>");
add("wt2html", "Templates: Don't strip whitespace from positional-param values", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,11,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a \"}},\"i\":0}}]}'>a </p>\n\n<p about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[13,33,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"{{echo|b}} \"}},\"i\":0}}]}'>b </p>\n\n<pre about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[35,48,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\" c \\n\"}},\"i\":0}}]}'>c </pre><span about=\"#mwt4\">\n</span>\n\n<pre about=\"#mwt5\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[50,71,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\" {{echo|d}}\\n\"}},\"i\":0}}]}'>d</pre><span about=\"#mwt5\">\n</span>\n\n<span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[73,85,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n e\"}},\"i\":0}}]}'>\n</span><pre about=\"#mwt7\">e</pre>\n\n<span about=\"#mwt8\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[87,99,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n*f\"}},\"i\":0}}]}'>\n</span><ul about=\"#mwt8\"><li>f</li></ul>\n\n<span about=\"#mwt9\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[101,113,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n \"}},\"i\":0}},\"g\"]}'>\n</span><pre about=\"#mwt9\">g</pre>");
add("wt2html", "Templates: Other wikitext in parameter names (T69657)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,18,0,0],\"pi\":[[{\"k\":\"&apos;&apos;1&apos;&apos;\",\"named\":true}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"&apos;&apos;1&apos;&apos;\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>");
add("wt2html", "6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content", "<pre data-parsoid='{\"dsr\":[0,26,1,0]}'>a\n\n <!-- continue -->\nb</pre>\n\n<pre data-parsoid='{\"dsr\":[28,30,1,0]}'>c</pre>\n \n<p data-parsoid='{\"dsr\":[33,34,0,0]}'>d</p>");
add("wt2html", "Definition lists: ignore colons inside tags", "<dl data-parsoid='{\"dsr\":[0,38,0,0]}'><dt data-parsoid='{\"dsr\":[0,38,1,0]}'>one <b data-parsoid='{\"stx\":\"html\",\"dsr\":[5,34,3,4]}'>two<span typeof=\"mw:DisplaySpace mw:Placeholder\" data-parsoid='{\"src\":\" \",\"isDisplayHack\":true,\"dsr\":[11,12,null,0]}'> </span>: tag <i data-parsoid='{\"stx\":\"html\",\"dsr\":[18,29,3,4]}'>fun:</i>:</b>:def</dt></dl>");
add("wt2html", "Definition Lists: Hacky use to indent tables (with content following table)", "<dl data-parsoid='{\"dsr\":[0,61,0,0]}'><dd data-parsoid='{\"dsr\":[0,61,1,0]}'><table data-parsoid='{\"dsr\":[1,16,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[4,14,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[4,13,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[4,8,1,0]}'>foo</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[9,13,1,0]}'>bar</td></tr>\n</tbody></table> <!--c1--><p data-parsoid='{\"dsr\":[26,61,0,0]}'> this text should be part of the dl</p></dd></dl>");
add("wt2html", "T4702: Mismatched <i>, <b> and <a> tags are invalid", "<p data-parsoid='{\"dsr\":[0,204,0,0]}'><i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,29,2,0]}'><a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com\" data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text<i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[26,28,2,0]}'></i></a></i>\n<a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com\" data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'><b data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[50,57,3,0]}'>text</b></a><b data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[58,61,3,0]}'></b>\n<i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[62,106,2,0]}'>Something <a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com\" data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in italic<i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[103,105,2,0]}'></i></a></i>\n<i data-parsoid='{\"dsr\":[107,164,2,2]}'>Something <a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com\" data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed<b data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[144,160,3,0]}'><i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[147,160,2,0]}'>, even bold</i></b></a>'</i>\n<b data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[165,204,3,0]}'><i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[168,204,2,0]}'>Now <a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com\" data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both<b data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[198,203,3,0]}'><i data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[201,203,2,0]}'></i></b></a></i></b></p>");
add("wt2html", "External link containing double-single-quotes in text embedded in italics (T6598 sanity check)", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'><i data-parsoid='{\"dsr\":[0,60,2,2]}'>Some <a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://example.com/\" data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty <i data-parsoid='{\"dsr\":[35,46,2,2]}'>italics</i> and stuff</a>!</i></p>");
add("wt2html", "Self-link to numeric title", "<p data-parsoid='{\"dsr\":[0,5,0,0]}'><a rel=\"mw:WikiLink\" href=\"./0\" title=\"0\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./0\"},\"sa\":{\"href\":\"0\"},\"dsr\":[0,5,2,2]}'>0</a></p>");
add("wt2html", "Interlanguage link with spacing", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link rel=\"mw:PageProp/Language\" href=\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\"},\"sa\":{\"href\":\" zh : Chinese \"},\"dsr\":[15,43,null,null]}'/>");
add("wt2html", "Escaping of interlanguage links (T129218, T156308)", "<p data-parsoid='{\"dsr\":[0,51,0,0]}'>Blah blah blah\n<a rel=\"mw:WikiLink/Interwiki\" href=\"http://es.wikipedia.org/wiki/Spanish\" title=\"es:Spanish\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Spanish\"},\"sa\":{\"href\":\":es:Spanish\"},\"isIW\":true,\"dsr\":[15,30,2,2]}'>es:Spanish</a>\n<a rel=\"mw:WikiLink\" href=\"./Zh_:_Chinese\" title=\"Zh : Chinese\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Zh_:_Chinese\"},\"sa\":{\"href\":\" : zh : Chinese \"},\"dsr\":[31,51,2,2]}'> : zh : Chinese </a></p>");
add("wt2html", "Space and question mark encoding in interlanguage links (T95473)", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link rel=\"mw:PageProp/Language\" href=\"http://es.wikipedia.org/wiki/Foo%20bar?\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Foo%20bar?\"},\"sa\":{\"href\":\"es:Foo bar?\"},\"dsr\":[15,30,null,null]}'/>");
add("wt2html", "2. Lists with start-of-line-transparent tokens before bullets: Template close", "<ul about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,18,0,0],\"firstWikitextNode\":\"UL\",\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[\"*foo \",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"bar\\n\"}},\"i\":0}}]}'><li>foo bar</li></ul><span about=\"#mwt1\">\n</span><p data-parsoid='{\"dsr\":[18,22,0,0]}'>*baz</p>");
add("wt2html", "Magic Word: {{CURRENTMONTH1}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"CURRENTMONTH1\",\"function\":\"currentmonth1\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_currentmonth1 missing in Parsoid.</p>");
add("wt2html", "Magic Words LOCAL (UTC)", "<ul data-parsoid='{\"dsr\":[0,238,0,0]}'><li data-parsoid='{\"dsr\":[0,15,1,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[1,15,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTH\",\"function\":\"localmonth\"},\"params\":{},\"i\":0}}]}'>01</span></li>\n<li data-parsoid='{\"dsr\":[16,32,1,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,32,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTH1\",\"function\":\"localmonth1\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_localmonth1 missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[33,52,1,0]}'><span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[34,52,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHNAME\",\"function\":\"localmonthname\"},\"params\":{},\"i\":0}}]}'>January</span></li>\n<li data-parsoid='{\"dsr\":[53,75,1,0]}'><span about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[54,75,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHNAMEGEN\",\"function\":\"localmonthnamegen\"},\"params\":{},\"i\":0}}]}'>January</span></li>\n<li data-parsoid='{\"dsr\":[76,97,1,0]}'><span about=\"#mwt5\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[77,97,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALMONTHABBREV\",\"function\":\"localmonthabbrev\"},\"params\":{},\"i\":0}}]}'>Jan</span></li>\n<li data-parsoid='{\"dsr\":[98,111,1,0]}'><span about=\"#mwt6\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[99,111,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAY\",\"function\":\"localday\"},\"params\":{},\"i\":0}}]}'>1</span></li>\n<li data-parsoid='{\"dsr\":[112,126,1,0]}'><span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[113,126,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAY2\",\"function\":\"localday2\"},\"params\":{},\"i\":0}}]}'>01</span></li>\n<li data-parsoid='{\"dsr\":[127,144,1,0]}'><span about=\"#mwt8\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[128,144,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDAYNAME\",\"function\":\"localdayname\"},\"params\":{},\"i\":0}}]}'>Thursday</span></li>\n<li data-parsoid='{\"dsr\":[145,159,1,0]}'><span about=\"#mwt9\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[146,159,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALYEAR\",\"function\":\"localyear\"},\"params\":{},\"i\":0}}]}'>1970</span></li>\n<li data-parsoid='{\"dsr\":[160,174,1,0]}'><span about=\"#mwt10\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[161,174,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALTIME\",\"function\":\"localtime\"},\"params\":{},\"i\":0}}]}'>00:02</span></li>\n<li data-parsoid='{\"dsr\":[175,189,1,0]}'><span about=\"#mwt11\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[176,189,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALHOUR\",\"function\":\"localhour\"},\"params\":{},\"i\":0}}]}'>00</span></li>\n<li data-parsoid='{\"dsr\":[190,204,1,0]}'><span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[191,204,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALWEEK\",\"function\":\"localweek\"},\"params\":{},\"i\":0}}]}'>1</span></li>\n<li data-parsoid='{\"dsr\":[205,218,1,0]}'><span about=\"#mwt13\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[206,218,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALDOW\",\"function\":\"localdow\"},\"params\":{},\"i\":0}}]}'>4</span></li>\n<li data-parsoid='{\"dsr\":[219,238,1,0]}'><span about=\"#mwt14\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[220,238,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"LOCALTIMESTAMP\",\"function\":\"localtimestamp\"},\"params\":{},\"i\":0}}]}'>19700101000203</span></li></ul>");
add("wt2html", "Magic Word: {{FULLPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"FULLPAGENAMEE\",\"function\":\"fullpagenamee\"},\"params\":{},\"i\":0}}]}'>User:Ævar Arnfjörð Bjarmason</p>");
add("wt2html", "Magic Word: {{TALKSPACE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACE\",\"function\":\"talkspace\"},\"params\":{},\"i\":0}}]}'>Talk</p>");
add("wt2html", "Magic Word: {{TALKSPACE}}, same namespace", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACE\",\"function\":\"talkspace\"},\"params\":{},\"i\":0}}]}'>Talk</p>");
add("wt2html", "Magic Word: {{TALKSPACEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACEE\",\"function\":\"talkspacee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_talkspacee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{SUBJECTSPACE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACE\",\"function\":\"subjectspace\"},\"params\":{},\"i\":0}}]}'>Main</p>");
add("wt2html", "Magic Word: {{SUBJECTSPACE}}, same namespace", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACE\",\"function\":\"subjectspace\"},\"params\":{},\"i\":0}}]}'>Main</p>");
add("wt2html", "Magic Word: {{SUBJECTSPACE}}, main namespace", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACE\",\"function\":\"subjectspace\"},\"params\":{},\"i\":0}}]}'>Main</p>");
add("wt2html", "Magic Word: {{SUBJECTSPACEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACEE\",\"function\":\"subjectspacee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectspacee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{NAMESPACE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACE\",\"function\":\"namespace\"},\"params\":{},\"i\":0}}]}'>Main</p>");
add("wt2html", "Magic Word: {{NAMESPACEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACEE\",\"function\":\"namespacee\"},\"params\":{},\"i\":0}}]}'>Main</p>");
add("wt2html", "Magic Word: {{NAMESPACENUMBER}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,19,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACENUMBER\",\"function\":\"namespacenumber\"},\"params\":{},\"i\":0}}]}'>0</p>");
add("wt2html", "Magic Word: {{SUBPAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,15,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAME\",\"function\":\"subpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subpagename missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{SUBPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAMEE\",\"function\":\"subpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subpagenamee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{ROOTPAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAME\",\"function\":\"rootpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_rootpagename missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{ROOTPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAMEE\",\"function\":\"rootpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_rootpagenamee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{BASEPAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAME\",\"function\":\"basepagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_basepagename missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{BASEPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAMEE\",\"function\":\"basepagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_basepagenamee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{TALKPAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAME\",\"function\":\"talkpagename\"},\"params\":{},\"i\":0}}]}'>User:Ævar Arnfjörð Bjarmason</p>");
add("wt2html", "Magic Word: {{TALKPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAMEE\",\"function\":\"talkpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_talkpagenamee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{SUBJECTPAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,19,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAME\",\"function\":\"subjectpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectpagename missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{SUBJECTPAGENAMEE}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,20,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAMEE\",\"function\":\"subjectpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectpagenamee missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{NUMBEROFFILES}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,17,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NUMBEROFFILES\",\"function\":\"numberoffiles\"},\"params\":{},\"i\":0}}]}'>2</p>");
add("wt2html", "Magic Word: {{PAGENAME}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,12,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>User:Ævar Arnfjörð Bjarmason</p>");
add("wt2html", "Magic Word: {{PAGENAMEE}}", "<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAMEE\",\"function\":\"pagenamee\"},\"params\":{},\"i\":0}}]}'></span>");
add("wt2html", "Magic Word: {{PAGENAMEE}} with metacharacters (T28781)", "<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAMEE\",\"function\":\"pagenamee\"},\"params\":{},\"i\":0}}]}'></span>");
add("wt2html", "Magic Word: {{REVISIONID}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"REVISIONID\",\"function\":\"revisionid\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_revisionid missing in Parsoid.</p>");
add("wt2html", "Magic Word: {{SCRIPTPATH}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SCRIPTPATH\",\"function\":\"scriptpath\"},\"params\":{},\"i\":0}}]}'>/</p>");
add("wt2html", "Magic Word: {{STYLEPATH}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"STYLEPATH\",\"function\":\"stylepath\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_stylepath missing in Parsoid.</p>");
add("wt2html", "Case-sensitive magic words, when cased differently, should just be template transclusions", "<p data-parsoid='{\"dsr\":[0,63,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,16,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"CurrentMonth\",\"href\":\"./Template:CurrentMonth\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:CurrentMonth\"}],\"i\":0}}]}'>{{CurrentMonth}}</span>\n<span about=\"#mwt4\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[17,31,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"currentday\",\"href\":\"./Template:Currentday\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:Currentday\"}],\"i\":0}}]}'>{{currentday}}</span>\n<span about=\"#mwt6\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[32,47,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"cURreNTweEK\",\"href\":\"./Template:CURreNTweEK\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:CURreNTweEK\"}],\"i\":0}}]}'>{{cURreNTweEK}}</span>\n<span about=\"#mwt8\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[48,63,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"currentHour\",\"href\":\"./Template:CurrentHour\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:CurrentHour\"}],\"i\":0}}]}'>{{currentHour}}</span></p>");
add("wt2html", "Namespace 1 {{ns:1}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,8,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:1\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>1</p>");
add("wt2html", "Namespace 1 {{ns:01}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,9,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:01\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>01</p>");
add("wt2html", "Namespace 0 {{ns:0}} (T6783)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,8,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:0\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>0</p>");
add("wt2html", "Namespace 0 {{ns:00}} (T6783)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,9,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:00\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>00</p>");
add("wt2html", "Namespace -1 {{ns:-1}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,9,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:-1\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>-1</p>");
add("wt2html", "Namespace (lang=de) Benutzer Diskussion {{ns:3}}", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,8,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:3\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>3</p>");
add("wt2html", "Nonexistent template", "<p data-parsoid='{\"dsr\":[0,28,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,28,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"thistemplatedoesnotexist\",\"href\":\"./Template:Thistemplatedoesnotexist\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:Thistemplatedoesnotexist\"}],\"i\":0}}]}'>{{thistemplatedoesnotexist}}</span></p>");
add("wt2html", "Template with invalid target containing tags", "<p data-parsoid='{\"dsr\":[0,54,0,0]}'>{{a<b data-parsoid='{\"stx\":\"html\",\"dsr\":[3,11,3,4]}'>b</b>|<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,24,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>|<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[25,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\"}},\"i\":0}}]}'>a</span>=<span about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[36,46,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b\"}},\"i\":0}}]}'>b</span>|a =b}}</p>");
add("wt2html", "Template with invalid target containing unclosed tag", "<p data-parsoid='{\"dsr\":[0,49,0,0]}'>{{a<b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[3,49,3,0]}'>|<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[7,19,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>|<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[20,30,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\"}},\"i\":0}}]}'>a</span>=<span about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[31,41,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b\"}},\"i\":0}}]}'>b</span>|a =b}}</b></p>");
add("wt2html", "Template with invalid target containing wikilink", "<p data-parsoid='{\"dsr\":[0,17,0,0]}'>{{<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>}}</p>");
add("wt2html", "Template with complex arguments", "<p data-parsoid='{\"dsr\":[0,106,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Template:Complextemplate\" title=\"Template:Complextemplate\" about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Template:Complextemplate\"},\"sa\":{\"href\":\"Template:complextemplate\"},\"dsr\":[0,106,null,null],\"pi\":[[{\"k\":\"param\",\"named\":true,\"spc\":[\"\\n \",\" \",\"\",\"\"]},{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"complextemplate\",\"href\":\"./Template:Complextemplate\"},\"params\":{\"1\":{\"wt\":\"[[Template:complextemplate|link]]\"},\"param\":{\"wt\":\"{{ templateasargtest |\\n templ = simple }}\"}},\"i\":0}}]}'>link</a><span about=\"#mwt1\"> This is a test template with parameter (test)</span></p>");
add("wt2html", "Template infinite loop", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,9,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"loop1\",\"href\":\"./Template:Loop1\"},\"params\":{},\"i\":0}}]}'>Error: Expansion loop detected at <a>Template:Loop1</a></p>");
add("wt2html", "int keyword", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,45,0,0],\"pi\":[[{\"k\":\"1\"},{\"k\":\"2\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"int:youhavenewmessages\",\"function\":\"int\"},\"params\":{\"1\":{\"wt\":\"lots of money\"},\"2\":{\"wt\":\"not!\"}},\"i\":0}}]}'>Parser function implementation for pf_int missing in Parsoid.</p>");
add("wt2html", "int keyword - non-existing message", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,11,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"int:var\",\"function\":\"int\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_int missing in Parsoid.</p>");
add("wt2html", "Self-closed noinclude, includeonly, onlyinclude tags", "<meta typeof=\"mw:Includes/NoInclude\" data-parsoid='{\"src\":\"&lt;noinclude />\",\"dsr\":[0,13,null,null]}'/>\n<meta typeof=\"mw:Includes/IncludeOnly\" data-parsoid='{\"src\":\"&lt;includeonly />\",\"dsr\":[14,29,null,null]}'/>\n<meta typeof=\"mw:Includes/OnlyInclude\" data-parsoid='{\"src\":\"&lt;onlyinclude />\",\"dsr\":[30,45,null,null]}'/>");
add("wt2html", "T8563: Section extraction for section shown by <includeonly>", "<meta typeof=\"mw:Includes/IncludeOnly\" data-parsoid='{\"src\":\"&lt;includeonly>\\n==Includeonly section==\\n&lt;/includeonly>\",\"dsr\":[0,52,null,null]}'/><meta typeof=\"mw:Includes/IncludeOnly/End\" data-parsoid='{\"src\":\"\",\"dsr\":[52,52,null,null]}'/>\n<h2 id=\"Section_T-2\" data-parsoid='{\"dsr\":[53,68,2,2]}'>Section T-2</h2>");
add("wt2html", "T8563: Section extraction for section suppressed by <includeonly>", "<meta typeof=\"mw:Includes/IncludeOnly\" data-parsoid='{\"src\":\"&lt;includeonly>\\n==Includeonly section==\\n&lt;/includeonly>\",\"dsr\":[0,52,null,null]}'/><meta typeof=\"mw:Includes/IncludeOnly/End\" data-parsoid='{\"src\":\"\",\"dsr\":[52,52,null,null]}'/>\n<h2 id=\"Section_1\" data-parsoid='{\"dsr\":[53,66,2,2]}'>Section 1</h2>");
add("wt2html", "2. includeonly in html attr value", "<p data-parsoid='{\"dsr\":[0,155,0,0]}'><span id=\"v1\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"id\":\"v1\"},\"sa\":{\"id\":\"&lt;noinclude>v1&lt;/noinclude>&lt;includeonly>v2&lt;/includeonly>\"},\"dsr\":[0,76,66,7]}' data-mw='{\"attribs\":[[{\"txt\":\"id\"},{\"html\":\"&lt;meta typeof=\\\"mw:Includes/NoInclude\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;noinclude>\\\",\\\"dsr\\\":[10,21,null,null]}&apos;/>v1&lt;meta typeof=\\\"mw:Includes/NoInclude/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;/noinclude>\\\",\\\"dsr\\\":[23,35,null,null]}&apos;/>&lt;meta typeof=\\\"mw:Includes/IncludeOnly\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;includeonly>v2&amp;lt;/includeonly>\\\",\\\"dsr\\\":[35,64,null,null]}&apos;/>&lt;meta typeof=\\\"mw:Includes/IncludeOnly/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"\\\",\\\"dsr\\\":[64,64,null,null]}&apos;/>\"}]]}'>bar</span>\n<span id='\"v1\"' about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"id\":\"\\\"v1\\\"\"},\"sa\":{\"id\":\"&lt;noinclude>\\\"v1\\\"&lt;/noinclude>&lt;includeonly>\\\"v2\\\"&lt;/includeonly>\"},\"dsr\":[77,155,68,7]}' data-mw='{\"attribs\":[[{\"txt\":\"id\"},{\"html\":\"&lt;meta typeof=\\\"mw:Includes/NoInclude\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;noinclude>\\\",\\\"dsr\\\":[86,97,null,null]}&apos;/>\\\"v1\\\"&lt;meta typeof=\\\"mw:Includes/NoInclude/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;/noinclude>\\\",\\\"dsr\\\":[101,113,null,null]}&apos;/>&lt;meta typeof=\\\"mw:Includes/IncludeOnly\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;includeonly>\\\\\\\"v2\\\\\\\"&amp;lt;/includeonly>\\\",\\\"dsr\\\":[113,144,null,null]}&apos;/>&lt;meta typeof=\\\"mw:Includes/IncludeOnly/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"\\\",\\\"dsr\\\":[144,144,null,null]}&apos;/>\"}]]}'>bar</span></p>");
add("wt2html", "4. includeonly in table attributes", "<table data-parsoid='{\"dsr\":[0,77,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,75,0,0]}'><tr about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"startTagSrc\":\"|-\",\"a\":{\"&lt;noinclude>\\n|-\\n|a\\n&lt;/noinclude>\":null},\"sa\":{\"&lt;noinclude>\\n|-\\n|a\\n&lt;/noinclude>\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[3,36,33,0]}' data-mw='{\"attribs\":[[{\"txt\":\"a\",\"html\":\"&lt;meta typeof=\\\"mw:Includes/NoInclude\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;noinclude>\\\",\\\"dsr\\\":[6,17,null,null]}&apos;/>\\n|-\\n|a\\n&lt;meta typeof=\\\"mw:Includes/NoInclude/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;/noinclude>\\\",\\\"dsr\\\":[24,36,null,null]}&apos;/>\"},{\"html\":\"\"}]]}'></tr>\n<tr about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"startTagSrc\":\"|-\",\"a\":{\"&lt;includeonly>\\n|-\\n|b\\n&lt;/includeonly>\":null},\"sa\":{\"&lt;includeonly>\\n|-\\n|b\\n&lt;/includeonly>\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[37,74,37,0]}' data-mw='{\"attribs\":[[{\"txt\":\"\",\"html\":\"&lt;meta typeof=\\\"mw:Includes/IncludeOnly\\\" data-parsoid=&apos;{\\\"src\\\":\\\"&amp;lt;includeonly>\\\\n|-\\\\n|b\\\\n&amp;lt;/includeonly>\\\",\\\"dsr\\\":[40,74,null,null]}&apos;/>&lt;meta typeof=\\\"mw:Includes/IncludeOnly/End\\\" data-parsoid=&apos;{\\\"src\\\":\\\"\\\",\\\"dsr\\\":[74,74,null,null]}&apos;/>\"},{\"html\":\"\"}]]}'></tr>\n</tbody></table>");
add("wt2html", "Templates: 2. Inside a block tag", "<div data-parsoid='{\"stx\":\"html\",\"dsr\":[0,23,5,6]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[5,17,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span></div>\n<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[24,61,12,13]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[36,48,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"Foo\"}},\"i\":0}}]}'>Foo</span></blockquote>");
add("wt2html", "Templates: HTML Tag: 2. Generation of HTML attr. value", "<div style=\"'color:red;'\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"&apos;color:red;&apos;\"},\"sa\":{\"style\":\"{{echo|&apos;color:red;&apos;}}\"},\"dsr\":[0,42,33,6]}' data-mw='{\"attribs\":[[{\"txt\":\"style\"},{\"html\":\"&lt;span about=\\\"#mwt1\\\" typeof=\\\"mw:Transclusion\\\" data-parsoid=&apos;{\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]],\\\"dsr\\\":[11,32,null,null]}&apos; data-mw=&apos;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"&amp;apos;color:red;&amp;apos;\\\"}},\\\"i\\\":0}}]}&apos;>&apos;color:red;&apos;&lt;/span>\"}]]}'>foo</div>");
add("wt2html", "Templates: HTML Tag: 3. Generation of HTML attr key and value", "<div style=\"'color:red;'\" about=\"#mwt3\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"&apos;color:red;&apos;\"},\"sa\":{\"style\":\"{{echo|&apos;color:red;&apos;}}\"},\"dsr\":[0,51,42,6]}' data-mw='{\"attribs\":[[{\"txt\":\"style\",\"html\":\"&lt;span about=\\\"#mwt2\\\" typeof=\\\"mw:Transclusion\\\" data-parsoid=&apos;{\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]],\\\"dsr\\\":[5,19,null,null]}&apos; data-mw=&apos;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"style\\\"}},\\\"i\\\":0}}]}&apos;>style&lt;/span>\"},{\"html\":\"&lt;span about=\\\"#mwt1\\\" typeof=\\\"mw:Transclusion\\\" data-parsoid=&apos;{\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]],\\\"dsr\\\":[20,41,null,null]}&apos; data-mw=&apos;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"&amp;apos;color:red;&amp;apos;\\\"}},\\\"i\\\":0}}]}&apos;>&apos;color:red;&apos;&lt;/span>\"}]]}'>foo</div>");
add("wt2html", "Templates: Wiki Tables: 4. Templated tags, no content", "<table about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,25,null,null],\"pi\":[[],[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"tbl-start\",\"href\":\"./Template:Tbl-start\"},\"params\":{},\"i\":0}},\"\\n\",{\"template\":{\"target\":{\"wt\":\"tbl-end\",\"href\":\"./Template:Tbl-end\"},\"params\":{},\"i\":1}}]}'>\n</table>");
add("wt2html", "Templates: Lists: Multi-line list-items via templates", "<ul data-parsoid='{\"dsr\":[0,71,0,0]}'><li data-parsoid='{\"dsr\":[0,35,1,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[1,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a {{nonexistent|\\nunused}}\"}},\"i\":0}}]}'>a {{nonexistent|\nunused}}</span></li>\n<li data-parsoid='{\"dsr\":[36,71,1,0]}'><span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[37,71,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b {{nonexistent|\\nunused}}\"}},\"i\":0}}]}'>b {{nonexistent|\nunused}}</span></li></ul>");
add("wt2html", "Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)", "<p data-parsoid='{\"dsr\":[0,40,0,0]}'><i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,40,null,null],\"pi\":[[{\"k\":\"1\"}],[{\"k\":\"1\"}],[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;a\"}},\"i\":0}},{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b&apos;&apos;c&apos;&apos;d\"}},\"i\":1}},{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;e\"}},\"i\":2}}]}'>ab</i><span about=\"#mwt1\">c</span><i about=\"#mwt1\">d</i><span about=\"#mwt1\">e</span></p>");
add("wt2html", "Templates: Ugly templates: 4. newline-only template parameter inconsistency", "<span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,10,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"\\n\"}},\"i\":0}}]}'>\n</span>");
add("wt2html", "subst: does not work during normal parse", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SubstTest\",\"href\":\"./Template:SubstTest\"},\"params\":{},\"i\":0}}]}'>{{&lt;includeonly>subst:&lt;/includeonly>Includes}}</p>");
add("wt2html", "message transform: magic variables", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,12,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SITENAME\",\"function\":\"sitename\"},\"params\":{},\"i\":0}}]}'>MediaWiki</p>");
add("wt2html", "message transform: should not transform wiki markup", "<p data-parsoid='{\"dsr\":[0,8,0,0]}'><i data-parsoid='{\"dsr\":[0,8,2,2]}'>test</i></p>");
add("wt2html", "message transform: <noinclude> in transcluded template (T6926)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,12,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Includes\",\"href\":\"./Template:Includes\"},\"params\":{},\"i\":0}}]}'>Foobar</p>");
add("wt2html", "message transform: <onlyinclude> in transcluded template (T6926)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Includes2\",\"href\":\"./Template:Includes2\"},\"params\":{},\"i\":0}}]}'>Foo<meta typeof=\"mw:Includes/OnlyInclude/End\"/></p>");
add("wt2html", "{{#special:}} page name, known", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,26,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:Recentchanges\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</p>");
add("wt2html", "{{#special:}} page name with subpage, known", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,32,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:Recentchanges/param\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</p>");
add("wt2html", "{{#special:}} page name, unknown", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,31,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:foobar nonexistent\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</p>");
add("wt2html", "{{#speciale:}} page name, known", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,27,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#speciale:Recentchanges\",\"function\":\"speciale\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_speciale missing in Parsoid.</p>");
add("wt2html", "{{#speciale:}} page name with subpage, known", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,33,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#speciale:Recentchanges/param\",\"function\":\"speciale\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_speciale missing in Parsoid.</p>");
add("wt2html", "{{#speciale:}} page name, unknown", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,32,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#speciale:foobar nonexistent\",\"function\":\"speciale\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_speciale missing in Parsoid.</p>");
add("wt2html", "SVG thumbnails with invalid language code", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"caption\"},{\"ck\":\"lang\",\"ak\":\"lang=invalid:language:code\"}],\"dsr\":[0,60,2,2]}'><a href=\"./File:Foobar.svg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.svg\"},\"sa\":{\"href\":\"File:Foobar.svg\"},\"dsr\":[2,null,null,null]}'><img resource=\"./File:Foobar.svg\" src=\"//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png\" lang=\"invalid:language:code\" data-file-width=\"240\" data-file-height=\"180\" data-file-type=\"drawing\" height=\"165\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.svg\",\"lang\":\"invalid:language:code\",\"height\":\"165\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.svg\",\"lang\":\"lang=invalid:language:code\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,58,null,null]}'>caption</figcaption></figure>");
add("wt2html", "T2561: {{/Subpage}}", "<p data-parsoid='{\"dsr\":[0,12,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,12,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"/Subpage\",\"href\":\"./Page/Subpage\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Page/Subpage\"}],\"i\":0}}]}'>{{/Subpage}}</span></p>");
add("wt2html", "PAGESINCATEGORY invalid title fatal (r33546 fix)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,27,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGESINCATEGORY:&lt;bogus>\",\"function\":\"pagesincategory\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_pagesincategory missing in Parsoid.</p>");
add("wt2html", "Section headings with TOC", "<h2 id=\"Headline_1\" data-parsoid='{\"dsr\":[0,14,2,2]}'>Headline 1</h2>\n<h3 id=\"Subheadline_1\" data-parsoid='{\"dsr\":[15,34,3,3]}'>Subheadline 1</h3>\n<h5 id=\"Skipping_a_level\" data-parsoid='{\"dsr\":[35,61,5,5]}'>Skipping a level</h5>\n<h6 id=\"Skipping_a_level_2\" data-parsoid='{\"dsr\":[62,90,6,6]}'>Skipping a level</h6>\n\n<h2 id=\"Headline_2\" data-parsoid='{\"dsr\":[92,106,2,2]}'>Headline 2</h2>\n<p data-parsoid='{\"dsr\":[107,116,0,0]}'>Some text</p>\n<h3 id=\"Another_headline\" data-parsoid='{\"dsr\":[117,139,3,3]}'>Another headline</h3>");
add("wt2html", "TOC regression (T11764)", "<h2 id=\"title_1\" data-parsoid='{\"dsr\":[0,11,2,2]}'>title 1</h2>\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[12,27,3,3]}'>title 1.1</h3>\n<h4 id=\"title_1.1.1\" data-parsoid='{\"dsr\":[28,47,4,4]}'>title 1.1.1</h4>\n<h3 id=\"title_1.2\" data-parsoid='{\"dsr\":[48,63,3,3]}'>title 1.2</h3>\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[64,75,2,2]}'>title 2</h2>\n<h3 id=\"title_2.1\" data-parsoid='{\"dsr\":[76,91,3,3]}'>title 2.1</h3>");
add("wt2html", "TOC with wgMaxTocLevel=3 (T8204)", "<h2 id=\"title_1\" data-parsoid='{\"dsr\":[0,11,2,2]}'>title 1</h2>\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[12,27,3,3]}'>title 1.1</h3>\n<h4 id=\"title_1.1.1\" data-parsoid='{\"dsr\":[28,47,4,4]}'>title 1.1.1</h4>\n<h3 id=\"title_1.2\" data-parsoid='{\"dsr\":[48,63,3,3]}'>title 1.2</h3>\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[64,75,2,2]}'>title 2</h2>\n<h3 id=\"title_2.1\" data-parsoid='{\"dsr\":[76,91,3,3]}'>title 2.1</h3>");
add("wt2html", "TOC with wgMaxTocLevel=3 and two level four headings (T8204)", "<h2 id=\"Section_1\" data-parsoid='{\"dsr\":[0,13,2,2]}'>Section 1</h2>\n<h3 id=\"Section_1.1\" data-parsoid='{\"dsr\":[14,31,3,3]}'>Section 1.1</h3>\n<h4 id=\"Section_1.1.1\" data-parsoid='{\"dsr\":[32,53,4,4]}'>Section 1.1.1</h4>\n<h4 id=\"Section_1.1.1.1\" data-parsoid='{\"dsr\":[54,77,4,4]}'>Section 1.1.1.1</h4>\n<h2 id=\"Section_2\" data-parsoid='{\"dsr\":[78,91,2,2]}'>Section 2</h2>");
add("wt2html", "TOC regression (T14077)", "<meta property=\"mw:PageProp/toc\" data-parsoid='{\"src\":\"__TOC__\",\"magicSrc\":\"__TOC__\",\"dsr\":[0,7,null,null]}'/>\n<h2 id=\"title_1\" data-parsoid='{\"dsr\":[8,19,2,2]}'>title 1</h2>\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[20,35,3,3]}'>title 1.1</h3>\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[36,47,2,2]}'>title 2</h2>");
add("wt2html", "(T21451) Links should refer to the normalized form.", "<p data-parsoid='{\"dsr\":[0,64,0,0]}'><a rel=\"mw:WikiLink\" href=\"./אַ\" title=\"אַ\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./אַ\"},\"sa\":{\"href\":\"&amp;#xFB2E;\"},\"dsr\":[0,12,2,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./אַ\" title=\"אַ\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./אַ\"},\"sa\":{\"href\":\"&amp;#x5d0;&amp;#x5b7;\"},\"dsr\":[13,31,2,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./אַ\" title=\"אַ\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./אַ\"},\"sa\":{\"href\":\"&amp;#x5d0;ַ\"},\"dsr\":[32,44,2,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./אַ\" title=\"אַ\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./אַ\"},\"sa\":{\"href\":\"א&amp;#x5b7;\"},\"dsr\":[45,57,2,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./אַ\" title=\"אַ\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./אַ\"},\"sa\":{\"href\":\"אַ\"},\"dsr\":[58,64,2,2]}'>אַ</a></p>");
add("wt2html", "T4304: HTML attribute safety (unsafe breakout parameter; 2309)", "<div style=\"float: right; >alert(document.cookie)\" about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"float: right; >alert(document.cookie)\"},\"sa\":{\"style\":\"float: right; {{{1}}}\"},\"dsr\":[0,55,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"div style\",\"href\":\"./Template:Div_style\"},\"params\":{\"1\":{\"wt\":\"\\\">&lt;script>alert(document.cookie)&lt;/script>\"}},\"i\":0}}]}'>Magic div</div>");
add("wt2html", "T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)", "<div style=\"float: right; >alert(document.cookie)\" about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"float: right; >alert(document.cookie)\"},\"sa\":{\"style\":\"float: right; {{{1}}}\"},\"dsr\":[0,56,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"div style\",\"href\":\"./Template:Div_style\"},\"params\":{\"1\":{\"wt\":\"\\\" >&lt;script>alert(document.cookie)&lt;/script>\"}},\"i\":0}}]}'>Magic div</div>");
add("wt2html", "CSS line continuation 2", "<div style=\"/* insecure input */\" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"/* insecure input */\"},\"sa\":{\"style\":\"background-image: u\\\\&amp;#13;rl(test.jpg); \"},\"dsr\":[0,59,53,6]}'></div>");
add("wt2html", "Sanitizer: Closing of closed but not open table tags", "Table not started");
add("wt2html", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata", "<div itemscope=\"\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,308,15,6]}'>\n\t<p data-parsoid='{\"dsr\":[17,301,0,0]}'>&lt;meta itemprop=\"hello\" content=\"world\">\n\t&lt;meta http-equiv=\"refresh\" content=\"5\">\n\t&lt;meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t&lt;link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t&lt;link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t&lt;link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></p>\n</div>");
add("wt2html", "Inline HTML vs wiki block nesting", "<p data-parsoid='{\"dsr\":[0,17,0,0]}'><b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,17,3,0]}'>Bold paragraph</b></p><b data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[17,37,0,0]}'>\n\n<p data-parsoid='{\"dsr\":[19,37,0,0]}'>New wiki paragraph</p></b>");
add("wt2html", "Special page transclusion", "<p data-parsoid='{\"dsr\":[0,30,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,30,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:Prefixindex/Xyzzyx\",\"href\":\"./Special:PrefixIndex/Xyzzyx\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Special:PrefixIndex/Xyzzyx\"}],\"i\":0}}]}'>{{Special:Prefixindex/Xyzzyx}}</span></p>");
add("wt2html", "Special page transclusion twice (T7021)", "<p data-parsoid='{\"dsr\":[0,61,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,30,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:Prefixindex/Xyzzyx\",\"href\":\"./Special:PrefixIndex/Xyzzyx\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Special:PrefixIndex/Xyzzyx\"}],\"i\":0}}]}'>{{Special:Prefixindex/Xyzzyx}}</span>\n<span about=\"#mwt4\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,61,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:Prefixindex/Xyzzyx\",\"href\":\"./Special:PrefixIndex/Xyzzyx\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Special:PrefixIndex/Xyzzyx\"}],\"i\":0}}]}'>{{Special:Prefixindex/Xyzzyx}}</span></p>");
add("wt2html", "Transclusion of default MediaWiki message", "<p data-parsoid='{\"dsr\":[0,22,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"MediaWiki:Mainpage\",\"href\":\"./MediaWiki:Mainpage\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for MediaWiki:Mainpage\"}],\"i\":0}}]}'>{{MediaWiki:Mainpage}}</span></p>");
add("wt2html", "Transclusion of nonexistent MediaWiki message", "<p data-parsoid='{\"dsr\":[0,25,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,25,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"MediaWiki:Mainpagexxx\",\"href\":\"./MediaWiki:Mainpagexxx\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for MediaWiki:Mainpagexxx\"}],\"i\":0}}]}'>{{MediaWiki:Mainpagexxx}}</span></p>");
add("wt2html", "Transclusion of MediaWiki message with underscore", "<p data-parsoid='{\"dsr\":[0,27,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,27,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"MediaWiki:history_short\",\"href\":\"./MediaWiki:History_short\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for MediaWiki:History_short\"}],\"i\":0}}]}'>{{MediaWiki:history_short}}</span></p>");
add("wt2html", "Transclusion of MediaWiki message with space", "<p data-parsoid='{\"dsr\":[0,27,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,27,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"MediaWiki:history short\",\"href\":\"./MediaWiki:History_short\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for MediaWiki:History_short\"}],\"i\":0}}]}'>{{MediaWiki:history short}}</span></p>");
add("wt2html", "Special:Search page linking.", "<p data-parsoid='{\"dsr\":[0,18,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,18,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:search\",\"href\":\"./Special:Search\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Special:Search\"}],\"i\":0}}]}'>{{Special:search}}</span></p>");
add("wt2html", "Say the magic word", "<ul data-parsoid='{\"dsr\":[0,522,0,0]}'><li data-parsoid='{\"dsr\":[0,13,1,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[1,13,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></li>\n<li data-parsoid='{\"dsr\":[14,28,1,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[15,28,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAMEE\",\"function\":\"pagenamee\"},\"params\":{},\"i\":0}}]}'></span></li>\n<li data-parsoid='{\"dsr\":[29,46,1,0]}'><span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[30,46,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"FULLPAGENAME\",\"function\":\"fullpagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></li>\n<li data-parsoid='{\"dsr\":[47,65,1,0]}'><span about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[48,65,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"FULLPAGENAMEE\",\"function\":\"fullpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser test</span></li>\n<li data-parsoid='{\"dsr\":[66,83,1,0]}'><span about=\"#mwt5\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[67,83,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAME\",\"function\":\"basepagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_basepagename missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[84,102,1,0]}'><span about=\"#mwt6\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[85,102,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAMEE\",\"function\":\"basepagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_basepagenamee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[103,119,1,0]}'><span about=\"#mwt7\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[104,119,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAME\",\"function\":\"subpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subpagename missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[120,137,1,0]}'><span about=\"#mwt8\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[121,137,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAMEE\",\"function\":\"subpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subpagenamee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[138,155,1,0]}'><span about=\"#mwt9\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[139,155,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAME\",\"function\":\"rootpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_rootpagename missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[156,174,1,0]}'><span about=\"#mwt10\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[157,174,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAMEE\",\"function\":\"rootpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_rootpagenamee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[175,192,1,0]}'><span about=\"#mwt11\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[176,192,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAME\",\"function\":\"talkpagename\"},\"params\":{},\"i\":0}}]}'>Parser test</span></li>\n<li data-parsoid='{\"dsr\":[193,211,1,0]}'><span about=\"#mwt12\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[194,211,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAMEE\",\"function\":\"talkpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_talkpagenamee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[212,232,1,0]}'><span about=\"#mwt13\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[213,232,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAME\",\"function\":\"subjectpagename\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectpagename missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[233,254,1,0]}'><span about=\"#mwt14\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[234,254,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAMEE\",\"function\":\"subjectpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectpagenamee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[255,270,1,0]}'><span about=\"#mwt15\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[256,270,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACEE\",\"function\":\"namespacee\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li data-parsoid='{\"dsr\":[271,285,1,0]}'><span about=\"#mwt16\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[272,285,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACE\",\"function\":\"namespace\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li data-parsoid='{\"dsr\":[286,306,1,0]}'><span about=\"#mwt17\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[287,306,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACENUMBER\",\"function\":\"namespacenumber\"},\"params\":{},\"i\":0}}]}'>0</span></li>\n<li data-parsoid='{\"dsr\":[307,321,1,0]}'><span about=\"#mwt18\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[308,321,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACE\",\"function\":\"talkspace\"},\"params\":{},\"i\":0}}]}'>Talk</span></li>\n<li data-parsoid='{\"dsr\":[322,337,1,0]}'><span about=\"#mwt19\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[323,337,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACEE\",\"function\":\"talkspacee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_talkspacee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[338,355,1,0]}'><span about=\"#mwt20\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[339,355,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACE\",\"function\":\"subjectspace\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li data-parsoid='{\"dsr\":[356,374,1,0]}'><span about=\"#mwt21\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[357,374,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACEE\",\"function\":\"subjectspacee\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_subjectspacee missing in Parsoid.</span></li>\n<li data-parsoid='{\"dsr\":[375,522,1,0]}'><span about=\"#mwt30\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"},{\"k\":\"2\"},{\"k\":\"3\"},{\"k\":\"4\"},{\"k\":\"5\"},{\"k\":\"6\"},{\"k\":\"7\"}]],\"dsr\":[376,522,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Dynamic\",\"href\":\"./Template:Dynamic\"},\"params\":{\"1\":{\"wt\":\"{{NUMBEROFUSERS}}\"},\"2\":{\"wt\":\"{{NUMBEROFPAGES}}\"},\"3\":{\"wt\":\"{{CURRENTVERSION}}\"},\"4\":{\"wt\":\"{{CONTENTLANGUAGE}}\"},\"5\":{\"wt\":\"{{DIRECTIONMARK}}\"},\"6\":{\"wt\":\"{{CURRENTTIMESTAMP}}\"},\"7\":{\"wt\":\"{{NUMBEROFARTICLES}}\"}},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:Dynamic\"}],\"i\":0}}]}'>{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}</span></li></ul>");
add("wt2html", "Illegal character references (T106578)", "<dl data-parsoid='{\"dsr\":[0,167,0,0]}'><dt data-parsoid='{\"dsr\":[0,6,1,0]}'> Null</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[6,13,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#00;\",\"srcContent\":\"�\",\"dsr\":[8,13,null,null]}'>�</span></dd>\n<dt data-parsoid='{\"dsr\":[14,18,1,0]}'> FF</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[18,25,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#xC;\",\"srcContent\":\"\\f\",\"dsr\":[20,25,null,null]}'>\f</span></dd>\n<dt data-parsoid='{\"dsr\":[26,30,1,0]}'> CR</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[30,37,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#xD;\",\"srcContent\":\"\\r\",\"dsr\":[32,37,null,null]}'>\r</span></dd>\n<dt data-parsoid='{\"dsr\":[38,53,1,0]}'> Control (low)</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[53,59,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#8;\",\"srcContent\":\"\\b\",\"dsr\":[55,59,null,null]}'>\b</span></dd>\n<dt data-parsoid='{\"dsr\":[60,76,1,0]}'> Control (high)</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[76,91,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#x7F;\",\"srcContent\":\"\",\"dsr\":[78,84,null,null]}'></span> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#x9F;\",\"srcContent\":\"Ÿ\",\"dsr\":[85,91,null,null]}'>Ÿ</span></dd>\n<dt data-parsoid='{\"dsr\":[92,103,1,0]}'> Surrogate</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[103,121,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#xD83D;\",\"srcContent\":\"�\",\"dsr\":[105,113,null,null]}'>�</span><span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#xDCA9;\",\"srcContent\":\"�\",\"dsr\":[113,121,null,null]}'>�</span></dd>\n<dt data-parsoid='{\"dsr\":[122,156,1,0]}'> This is an okay astral character</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[156,167,1,0]}'> <span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;#x1F4A9;\",\"srcContent\":\"💩\",\"dsr\":[158,167,null,null]}'>💩</span></dd></dl>");
add("wt2html", "Parents of subpages, one level up, not named", "<p data-parsoid='{\"dsr\":[0,7,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Subpage_test/L1/L2\" title=\"Subpage test/L1/L2\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Subpage_test/L1/L2\"},\"sa\":{\"href\":\"../\"},\"dsr\":[0,7,2,2]}'>Subpage_test/L1/L2</a></p>");
add("wt2html", "Parents of subpages, two levels up, with lots of extra trailing slashes.", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Subpage_test/L1\" title=\"Subpage test/L1\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Subpage_test/L1\"},\"sa\":{\"href\":\"../../////\"},\"dsr\":[0,14,2,2]}'>Subpage_test/L1</a></p>");
add("wt2html", "RAW magic word", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,14,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"RAW:QUERTY\",\"href\":\"./Template:RAW:QUERTY\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:RAW:QUERTY\"}],\"i\":0}}]}'>{{RAW:QUERTY}}</span></p>");
add("wt2html", "Out-of-order TOC heading levels", "<h2 id=\"2\" data-parsoid='{\"dsr\":[0,5,2,2]}'>2</h2>\n<h6 id=\"6\" data-parsoid='{\"dsr\":[6,19,6,6]}'>6</h6>\n<h3 id=\"3\" data-parsoid='{\"dsr\":[20,27,3,3]}'>3</h3>\n<h1 id=\"1\" data-parsoid='{\"dsr\":[28,31,1,1]}'>1</h1>\n<h5 id=\"5\" data-parsoid='{\"dsr\":[32,43,5,5]}'>5</h5>\n<h2 id=\"2_2\" data-parsoid='{\"dsr\":[44,49,2,2]}'>2</h2>");
add("wt2html", "T2529: Uncovered bullet in parser function result", "<ul data-parsoid='{\"dsr\":[0,23,0,0]}'><li data-parsoid='{\"dsr\":[0,23,1,0]}'>Foo <span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[5,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"lc:{{bullet}} \",\"function\":\"lc\"},\"params\":{},\"i\":0}}]}'> bar</span></li></ul>");
add("wt2html", "T7678: Double-parsed template invocation", "<p about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,42,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"lc:{{paramtest {{!}} param = hello }} \",\"function\":\"lc\"},\"params\":{},\"i\":0}}]}'>this is a test template with parameter hello</p>");
add("wt2html", "Nesting tags, paragraphs on lines which begin with <div>", "<div data-parsoid='{\"stx\":\"html\",\"dsr\":[0,11,5,6]}'></div><p data-parsoid='{\"dsr\":[11,20,0,0]}'><strong data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[11,20,8,0]}'>A</strong></p>\n<p data-parsoid='{\"dsr\":[21,31,0,0]}'><strong data-parsoid='{\"stx\":\"html\",\"autoInsertedStart\":true,\"dsr\":[21,31,0,9]}'>B</strong></p>");
add("wt2html", "T8200: paragraphs inside blockquotes (no extra line breaks)", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,43,12,13]}'>Line one\n\nLine two</blockquote>");
add("wt2html", "T8200: paragraphs inside blockquotes (extra line break on open)", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,44,12,13]}'>\n<p data-parsoid='{\"dsr\":[13,21,0,0]}'>Line one</p>\n\nLine two</blockquote>");
add("wt2html", "T8200: paragraphs inside blockquotes (extra line break on close)", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,44,12,13]}'>Line one\n\n<p data-parsoid='{\"dsr\":[22,30,0,0]}'>Line two</p>\n</blockquote>");
add("wt2html", "formatdate parser function", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,26,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:2009-03-24\",\"function\":\"formatdate\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_formatdate missing in Parsoid.</p>");
add("wt2html", "formatdate parser function, with default format", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,30,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:2009-03-24\",\"function\":\"formatdate\"},\"params\":{\"1\":{\"wt\":\"mdy\"}},\"i\":0}}]}'>Parser function implementation for pf_formatdate missing in Parsoid.</p>");
add("wt2html", "Spacing of numbers in formatted dates", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,26,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:January 15\",\"function\":\"formatdate\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_formatdate missing in Parsoid.</p>");
add("wt2html", "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", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,30,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#formatdate:2009-03-24\",\"function\":\"formatdate\"},\"params\":{\"1\":{\"wt\":\"dmy\"}},\"i\":0}}]}'>Parser function implementation for pf_formatdate missing in Parsoid.</p>");
add("wt2html", "Bad images - basic functionality", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><figure-inline class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[0,16,null,null]}' data-mw='{\"errors\":[{\"key\":\"apierror-filedoesnotexist\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{\"href\":\"File:Bad.jpg\"}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></figure-inline></p>");
add("wt2html", "Bad images - T18039: text after bad image disappears", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'>Foo bar\n<figure-inline class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[8,24,null,null]}' data-mw='{\"errors\":[{\"key\":\"apierror-filedoesnotexist\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{\"href\":\"File:Bad.jpg\"}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></figure-inline>\nBar foo</p>");
add("wt2html", "T33098 Template which includes system messages which includes the template", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,13,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Identical\",\"href\":\"./Template:Identical\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_int missing in Parsoid.\nParser function implementation for pf_int missing in Parsoid.</p>");
add("wt2html", "T33490 Turkish: ucfirst 'ix'", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ucfirst:ix\",\"function\":\"ucfirst\"},\"params\":{},\"i\":0}}]}'>Ix</p>");
add("wt2html", "T33490 Turkish: ucfırst (with a dotless i)", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,16,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ucfırst:blah\",\"href\":\"./Şablon:Ucfırst:blah\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Şablon:Ucfırst:blah\"}],\"i\":0}}]}'>{{ucfırst:blah}}</span></p>");
add("wt2html", "T33490 ucfırst (with a dotless i) with English language", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,16,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ucfırst:blah\",\"href\":\"./Template:Ucfırst:blah\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page / template fetching disabled, and no cache for Template:Ucfırst:blah\"}],\"i\":0}}]}'>{{ucfırst:blah}}</span></p>");
add("wt2html", "T34057: Title needed when expanding <h> nodes.", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,14,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"int:T34057\",\"function\":\"int\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_int missing in Parsoid.</p>");
add("wt2html", "Check noCommafy in formatNum", "<p data-parsoid='{\"dsr\":[0,53,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:123456.78\",\"function\":\"formatnum\"},\"params\":{},\"i\":0}}]}'>123456.78</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,53,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:123456.78\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"NOSEP\"}},\"i\":0}}]}'>123456.78</span></p>");
add("wt2html", "Wrong option for formatNum (T58199)", "<p data-parsoid='{\"dsr\":[0,126,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,29,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1,234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"Random\"}},\"i\":0}}]}'>1,234.56</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[30,63,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1,234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"EVERYTHING\"}},\"i\":0}}]}'>1,234.56</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[64,126,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"formatnum:1234.56\",\"function\":\"formatnum\"},\"params\":{\"1\":{\"wt\":\"any argument that has the string &apos;NOSEP&apos;\"}},\"i\":0}}]}'>1234.56</span></p>");
add("wt2html", "Strip marker in grammar", "<p about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,35,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"grammar:elative\",\"function\":\"grammar\"},\"params\":{\"1\":{\"wt\":\"foo&lt;nowiki/>bar\"}},\"i\":0}}]}'>Parser function implementation for pf_grammar missing in Parsoid.</p>");
add("wt2html", "Language parser function", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#language:ar\",\"function\":\"language\"},\"params\":{},\"i\":0}}]}'>ar</p>");
add("wt2html", "Special parser function", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:RandomPage\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[24,45,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:BaDtItLe\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[46,65,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:Foobar\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser function implementation for pf_special missing in Parsoid.</span></p>");
add("wt2html", "1. SOL-sensitive wikitext tokens as template-args", "<p data-parsoid='{\"dsr\":[0,35,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,11,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"*a\"}},\"i\":0}}]}'>*a</span>\n<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,23,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"#a\"}},\"i\":0}}]}'>#a</span>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,35,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\":a\"}},\"i\":0}}]}'>:a</span></p>");
add("wt2html", "Empty table rows go away", "<table data-parsoid='{\"dsr\":[0,37,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,35,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,16,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,9,1,0]}'>Hello</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[10,16,1,0]}'>there</td></tr>\n<tr class=\"foo\" data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[17,31,14,0]}'></tr>\n<tr class=\"mw-empty-elt\" data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[32,34,2,0]}'></tr>\n</tbody></table>");
// Blacklist for wt2wt
add("wt2wt", "Quote balancing context should be restricted to td/th cells on the same wikitext line", "{|\n!''a''!!''b''\n|''a''||''b''\n|}");
add("wt2wt", "Non-word characters don't terminate tag names (T19663, T42670, T54022)", "<blockquote|>a\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>");
add("wt2wt", "Non-word characters don't terminate tag names", "<blockquote|>a\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>");
add("wt2wt", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content", "{{echo| }}a\n\n{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\n\n{{echo|a\n}}\n b\n");
add("wt2wt", "Templates: Handle comments in the target", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{echo|foo}}");
add("wt2wt", "4. Indent-Pre and extension tags", "<nowiki> </nowiki>a <tag />");
add("wt2wt", "Definition lists: self-closed tag", ";one<br />two :two-line fun");
add("wt2wt", "Definition lists: ignore colons inside tags", ";one <b>two : tag <i>fun:</i>:</b><nowiki>:def</nowiki>");
add("wt2wt", "Definition lists: excess closed tags", ";onetwo :bad tag fun");
add("wt2wt", "Definition Lists: Hacky use to indent tables", "::{|\n|foo\n|bar\n|}\n\nthis text\nshould be left alone");
add("wt2wt", "Definition Lists: Hacky use to indent tables, with comments (T65979)", "<!-- foo -->\n::{|\n|foo\n|bar\n|}<!-- bar -->\n\nthis text\nshould be left alone");
add("wt2wt", "Definition Lists: colons occurring in tags", ";a:b\n;'''a:b'''\n;<i>a:b</i>\n;<span>a:b</span>\n;<div>a:b</div>\n;<div>a\n:b\n;{{echo|a:b}}\n;{{echo|''a:b''}}\n;;;''a:b''\n");
add("wt2wt", "T2289: \">\"-token in bracketed URL", "[http://www.example.com/ <hello> stuff]");
add("wt2wt", "T2289: literal \">\"-token in bracketed URL", "[http://www.example.com/ <b>html</b> stuff]");
add("wt2wt", "T2289: literal double quote in bracketed URL", "[http://www.example.com/ \"hello\" stuff]");
add("wt2wt", "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)", "[http://www.example.com test]");
add("wt2wt", "T4702: Mismatched <i>, <b> and <a> tags are invalid", "''[http://example.com text''<nowiki/>'']''\n[http://example.com '''text''']'''<nowiki/>'''\n''Something [http://example.com in italic''<nowiki/>'']''\n''Something [http://example.com mixed''''', even bold''''']'''\n'''''Now [http://example.com both'''''<nowiki/>''''']'''''");
add("wt2wt", "External link containing double-single-quotes with no space separating the url from text in italics", "[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]].");
add("wt2wt", "Unclosed and unmatched quotes", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n'''Bold text..'''\n\n..spanning two paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left open'''\n\n''Italic tag left open''\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n'''This year'<nowiki/>'''s election ''should'' beat '''last year''''s.\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\nPlain ''italic'''s plain");
add("wt2wt", "A table with captions with non-default spaced attributes and a table row", "{|\n|+ style=\"color: red;\" |caption2\n|+ style=\"color: red;\" |caption3\n|-\n|foo\n|}");
add("wt2wt", "Table td-cell syntax variations", "{|\n| foo bar |baz\n|foo bar foo||baz\n| style=\"color:red;\" |baz\n|style='color:red;'||baz\n|}");
add("wt2wt", "Accept \"| !\" at start of line in tables (ignore !-attribute)", "{|\n|-\n| !style=\"color:red\" |bar\n|}");
add("wt2wt", "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 +/- ", "{|\n|-\n| style=\"color:red;\" |+1\n| style=\"color:blue;\" |-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}");
add("wt2wt", "Table rowspan", "{| border=\"1\"\n|Cell 1, row 1\n| rowspan=\"2\" |Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("wt2wt", "Nested table", "{| border=\"1\"\n| &alpha;\n|\n{| bgcolor=\"#ABCDEF\" border=\"2\"\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("wt2wt", "Invalid attributes in table cell (T3830)", "{|\n| Cell: |broken\n|}");
add("wt2wt", "Build table with {{!}}", "{{{!}} class=\"wikitable\"\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\"{{!}}second data\n{{!}}}");
add("wt2wt", "Build table with pipe as data", "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |<nowiki>data with | </nowiki>|| style=\"color:red;\" | second data with |\n|-\n||<nowiki>data with | </nowiki>|||second data with |\n|}");
add("wt2wt", "Piped link with multiple pipe characters in link text", "[[Main Page|<nowiki>|The|Main|Page|</nowiki>]]");
add("wt2wt", "<nowiki> inside a link", "[[Main<nowiki> Page</nowiki><nowiki>]] </nowiki>[[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("wt2wt", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved", "[[Foo| bar]]\n\n[[Foo| ''bar'']]\n\n[http://wp.org foo]\n\n[http://wp.org ''foo'']");
add("wt2wt", "Handling html with a div self-closing tag", "<div title=\"\" />\n<div title=\"\" />\n<div title=\"\" />\n<div title=\"bar\" />\n<div title=\"bar\" />\n<div title=\"bar/\">");
add("wt2wt", "Handling html with a br self-closing tag", "<br title=\"\" />\n<br title=\"\" />\n<br title=\"\" />\n<br title=\"bar\" />\n<br title=\"bar\" />\n<br title=\"bar/\">");
add("wt2wt", "Horizontal ruler (should it add that extra space?)", "<hr />\n<hr />\nfoo <hr> bar");
add("wt2wt", "Mixed list", "*Mixed list\n*#with numbers\n**and bullets\n*#and numbers\n*bullets again\n**bullet level 2\n***bullet level 3\n***#Number on level 4\n**bullet level 2\n**#Number on level 3\n**#Number on level 3\n*#number level 2\n*Level 1\n***Level 3\n\n#**Level 3, but ordered\n");
add("wt2wt", "Nested lists 3 (first element empty)", "\n**bar\n");
add("wt2wt", "Nested lists 6 (both elements empty)", "\n**\n");
add("wt2wt", "List interrupted by empty line or heading", "*foo\n\n**bar\n\n==A heading==\n\n*Another list item");
add("wt2wt", "Unbalanced closing non-block tags don't break a list", "<span>\n\n*a<span>\n*b");
add("wt2wt", "Template with invalid target containing tags", "<nowiki>{{a</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}<nowiki>|a =b}}</nowiki>");
add("wt2wt", "Template with invalid target containing unclosed tag", "<nowiki>{{a</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}<nowiki>|a =b}}</nowiki>");
add("wt2wt", "Template with invalid target containing wikilink", "<nowiki>{{</nowiki>[[Main Page]]<nowiki>}}</nowiki>");
add("wt2wt", "Template with just whitespace in it, T70421", "{{echo|{{ }<nowiki>}</nowiki>}}");
add("wt2wt", "Template with argument in separate line", "{{templateasargtest |\n templ = simple }}");
add("wt2wt", "T2553: link with two variables in a piped link", "{|\n|[[{{{1}}}<nowiki>|</nowiki>{{{2}}}]]\n|}");
add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n|testing [[one|two]]<nowiki> |three</nowiki>||four\n| testing one two |three||four\n|testing=\"[[one|two]]<nowiki>\" |three</nowiki>||four\n|}");
add("wt2wt", "2. includeonly in html attr value", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=\"<noinclude>&quot;v1&quot;</noinclude><includeonly>&quot;v2&quot;</includeonly>\">bar</span>");
add("wt2wt", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR", "{{echo|}}\n{| width=\"100%\"\n|foo\n|}");
add("wt2wt", "Templates: HTML Tag: 2. Generation of HTML attr. value", "<div style=\"{{echo|'color:red;'}}\">foo</div>");
add("wt2wt", "Templates: HTML Tag: 3. Generation of HTML attr key and value", "<div {{echo|style}}=\"{{echo|'color:red;'}}\">foo</div>");
add("wt2wt", "Templates: HTML Tag: 9. Multiple template-generated attributes", "<div {{echo|1=id=\"v1\" title=\"foo\"}} title=\"foo\">bar</div>");
add("wt2wt", "Templates: HTML Tables: 5. Proper fostering of categories from inside", "[[Category:foo1]]\n<table><tr><td>foo</td></tr></table>\n<!--Two categories (T52330)-->\n[[Category:bar1]]\n[[Category:bar2]]\n<table><tr><td>foo</td></tr></table>");
add("wt2wt", "Allow empty links in image captions (T62753)", "[[File:Foobar.jpg|thumb|Caption [[Link1]]\n<nowiki>[[]]</nowiki>\n[[Link2]]\n]]");
add("wt2wt", "Image with multiple attributes from the same template", "[[File:Foobar.jpg|right|Caption text]]");
add("wt2wt", "Image with multiple widths -- use last", "[[File:Foobar.jpg|300px|caption]]");
add("wt2wt", "Render invalid page names as plain text (T53090)", "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n<nowiki>[[foo~~~bar]]</nowiki>\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\n[[{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}]]\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("wt2wt", "div with single-quoted attribute", "<div id=\"rock\">HTML rocks</div>");
add("wt2wt", "div with unquoted attribute", "<div id=\"rock\">HTML rocks</div>");
add("wt2wt", "div with illegal double attributes", "<div id=\"b\">HTML rocks</div>");
add("wt2wt", "HTML multiple attributes correction", "<p class=\"awesome\">Awesome!</p>");
add("wt2wt", "Table multiple attributes correction", "{|\n! class=\"awesome\" + |status\n|}");
add("wt2wt", "DIV IN UPPERCASE", "<DIV id=\"x\">HTML ROCKS</DIV>");
add("wt2wt", "Media link with nasty text", "[[Media:Foobar.jpg|Safe Link]]<div style=\"display:none\">[[Media:Foobar.jpg|\" onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>");
add("wt2wt", "Empty attribute crash test single-quotes (T4067)", "<font color=\"\">foo</font>");
add("wt2wt", "Attribute test: unquoted but illegal value (hash)", "<font color=\"#x\">foo</font>");
add("wt2wt", "T4095: link with pipe and three closing brackets, version 2", "[[Main Page|<nowiki>[http://example.com/]</nowiki>]]");
add("wt2wt", "Table attribute legitimate extension", "{|\n! style=\"<nowiki>color:blue</nowiki>\" + |status\n|}");
add("wt2wt", "Table attribute safety", "{|\n! style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\" + |status\n|}");
add("wt2wt", "Parser hook: nested tags", "<tag><tag></tag><nowiki></tag></nowiki>");
add("wt2wt", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata", "<div itemscope=\"\">\n\t<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
add("wt2wt", "Fuzz testing: Parser13", "{| \n| http: / a |\n|}");
add("wt2wt", "Fuzz testing: Parser16", "{|\n!https://||||||\n|}");
add("wt2wt", "Fuzz testing: Parser21", "{|\n!irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|\n|}");
add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}");
add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph");
add("wt2wt", "Mixing markup for italics and bold", "'<nowiki/>''bold'<nowiki/>'''''bold''bolditalics'''''");
add("wt2wt", "Illegal character references (T106578)", "; Null: &#00;\n; FF: &#xC;\n; CR: &#x0A;\n; Control (low): &#8;\n; Control (high): &#x7F; &#x9F;\n; Surrogate: &#xD83D;&#xDCA9;\n; This is an okay astral character: &#x1F4A9;");
add("wt2wt", "Don't fall for the self-closing div", "<div>hello world</div>");
add("wt2wt", "Parsing of overlapping (improperly nested) inline html tags", "<span><s>x</span>");
add("wt2wt", "T2529: Uncovered bullet in a deeply nested list", "*******Foo \n{{bullet}}");
add("wt2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n=heading=\n");
add("wt2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n==heading==\n");
add("wt2wt", "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links", "[http://www.example.org/ ideograms]");
add("wt2wt", "Ignore pipe between table row attributes", "{|\n|quux\n|- id=\"foo\" style=\"color: red\" |\n|bar\n|}");
add("wt2wt", "2. Bad treebuilder fixup of formatting elt is cleaned up", "'''foo'''[[File:Foobar.jpg|thumb|'''caption''']]'''bar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("wt2wt", "3. Bad treebuilder fixup of formatting elt is cleaned up", "<small>'''foo'''[[File:Foobar.jpg|thumb|'''caption''']]'''bar'''</small>");
add("wt2wt", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out", "{|\n|<small>foo\n\nbar\n|}\n\n{|\n|<small>foo<small>\n|}");
add("wt2wt", "Empty TD followed by TD with tpl-generated attribute", "{|\n|-\n|\n| {{echo|style='color:red'}} |foo\n|}");
add("wt2wt", "Improperly nested inline or quotes tags with whitespace in between", "<span> <s>x</span> </s>\n''' ''x'''''<nowiki/>'' ''");
add("wt2wt", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)", "<nowiki> </nowiki><nowiki>||</nowiki> <nowiki>||</nowiki>\n<table>\n<tr><td> a\n</table>");
add("wt2wt", "8. Encapsulate foster-parented transclusion content", "{{echo|a\n}}\n{|{{echo|style='color:red'}}\n|-\n|b\n|}\n");
add("wt2wt", "T73074: More fostering fun", "[[Category:Two]]\n<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("wt2wt", "Image: upright option is ignored on inline and frame images (parsoid)", "[[File:Foobar.jpg|500x500px|caption]]");
// Blacklist for html2html
add("html2html", "Extra newlines followed by heading", "<p data-parsoid='{\"dsr\":[0,1,0,0]}'>a</p>\n\n<p data-parsoid='{\"dsr\":[3,3,0,0]}'><br data-parsoid='{\"dsr\":[3,3,0,0]}'/></p>\n\n<h1 id=\"b\" data-parsoid='{\"dsr\":[5,10,1,1]}'> b </h1>\n<p data-parsoid='{\"dsr\":[11,55,0,0]}'>[/index.php?title=A&amp;action=edit&amp;redlink=1 a]</p>\n\n<p data-parsoid='{\"dsr\":[57,57,0,0]}'><br data-parsoid='{\"dsr\":[57,57,0,0]}'/></p>\n\n<h1 id=\"b_2\" data-parsoid='{\"dsr\":[59,64,1,1]}'> b </h1>\n");
add("html2html", "Extra newlines between heading and content are swallowed", "<h1 id=\"b\" data-parsoid='{\"dsr\":[0,5,1,1]}'> b </h1>\n<p data-parsoid='{\"dsr\":[6,50,0,0]}'>[/index.php?title=A&amp;action=edit&amp;redlink=1 a]</p>\n");
add("html2html", "Italics and possessives (1)", "<p data-parsoid='{\"dsr\":[0,115,0,0]}'>obtained by <i data-parsoid='{\"dsr\":[12,91,2,2]}'>[/index.php?title=Lunar_Prospector&amp;action=edit&amp;redlink=1 Lunar Prospector]'</i>s gamma-ray spectrometer</p>\n");
add("html2html", "Italics and possessives (3)", "<p data-parsoid='{\"dsr\":[0,421,0,0]}'>The first monolingual dictionary written in a Romance language was <i data-parsoid='{\"dsr\":[67,93,2,2]}'>Sebastián Covarrubias'</i> <i data-parsoid='{\"dsr\":[94,139,2,2]}'>Tesoro de la lengua castellana o española</i>, published in 1611 in Madrid. In 1612 the first edition of the <i data-parsoid='{\"dsr\":[203,310,2,2]}'>Vocabolario dell'[/index.php?title=Accademia_della_Crusca&amp;action=edit&amp;redlink=1 Accademia della Crusca]</i>, for Italian, was published. In 1690 in Rotterdam was published, posthumously, the <i data-parsoid='{\"dsr\":[394,420,2,2]}'>Dictionnaire Universel</i>.</p>\n");
add("html2html", "Preformatted text", "<pre data-parsoid='{\"dsr\":[0,96,1,0]}'>This is some\nPreformatted text\nWith <i data-parsoid='{\"dsr\":[39,49,2,2]}'>italic</i>\nAnd <b data-parsoid='{\"dsr\":[55,65,3,3]}'>bold</b>\nAnd a <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[73,96,17,2]}'>link</a></pre>\n");
add("html2html", "T54763: Preformatted in <blockquote>", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,75,12,13]}'>\n<p data-parsoid='{\"dsr\":[13,18,0,0]}'> Blah</p>\n\n<table data-parsoid='{\"dsr\":[20,61,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[23,59,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[23,58,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[23,58,1,0]}'>\n<pre data-parsoid='{\"dsr\":[25,58,1,0]}'>indented cell (no pre-wrapping!)</pre></td></tr>\n</tbody></table>\n</blockquote>\n");
add("html2html", "T17491: <ins>/<del> in blockquote (2)", "<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[0,68,12,13]}'>\n<p data-parsoid='{\"dsr\":[13,47,0,0]}'>Foo \n<del data-parsoid='{\"stx\":\"html\",\"dsr\":[18,32,5,6]}'>bar</del> <ins data-parsoid='{\"stx\":\"html\",\"dsr\":[33,47,5,6]}'>baz</ins></p>\n\n<p data-parsoid='{\"dsr\":[49,54,0,0]}'> quux</p>\n</blockquote>");
add("html2html", "<pre> with attributes (T5202)", "<pre data-parsoid='{\"dsr\":[0,24,1,0]}'>Bluescreen of WikiDeath</pre>\n");
add("html2html", "<pre> with width attribute (T5202)", "<pre data-parsoid='{\"dsr\":[0,22,1,0]}'>Narrow screen goodies</pre>\n");
add("html2html", "<pre> with forbidden attribute (T5202)", "<pre data-parsoid='{\"dsr\":[0,22,1,0]}'>Narrow screen goodies</pre>\n");
add("html2html", "<pre> with forbidden attribute values (T5202)", "<pre data-parsoid='{\"dsr\":[0,22,1,0]}'>Narrow screen goodies</pre>\n");
add("html2html", "<nowiki> inside <pre> (T15238)", "<pre data-parsoid='{\"dsr\":[0,15,1,0]}'><span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[1,5,null,null]}'>&lt;</span>nowiki<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[11,15,null,null]}'>></span></pre>\n\n <p data-parsoid='{\"dsr\":[18,18,0,0]}'><br data-parsoid='{\"dsr\":[18,18,0,0]}'/></p>\n\n<pre data-parsoid='{\"dsr\":[20,53,1,0]}'><span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[21,25,null,null]}'>&lt;</span>nowiki<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[31,35,null,null]}'>></span>Foo<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[38,42,null,null]}'>&lt;</span>/nowiki<span typeof=\"mw:Entity\" data-parsoid='{\"src\":\"&amp;gt;\",\"srcContent\":\">\",\"dsr\":[49,53,null,null]}'>></span></pre>\n");
add("html2html", "Templates: Handle comments in the target", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,39,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\\n&lt;!-- should be ignored -->\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>\n\n<p about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[41,136,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\\n&lt;!-- should be ignored and spaces on next line should not trip us up (T147742) -->\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>\n\n<p about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[138,176,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo&lt;!-- should be ignored -->\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>\n\n<p about=\"#mwt4\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[178,216,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo&lt;!-- should be ignored -->\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>\n\n<p about=\"#mwt5\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[218,230,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>");
add("html2html", "Templates: Other wikitext in parameter names (T69657)", "<p about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,18,0,0],\"pi\":[[{\"k\":\"&apos;&apos;1&apos;&apos;\",\"named\":true}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"&apos;&apos;1&apos;&apos;\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</p>");
add("html2html", "2g. Indented table markup mixed with indented pre content (proposed in T8200)", " <table data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[1,57,2,0]}'> \n <tbody data-parsoid='{\"dsr\":[6,57,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[6,56,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[6,56,1,0]}'>\n<pre data-parsoid='{\"dsr\":[8,56,1,0]}'>Text that should be rendered preformatted \n|}</pre></td></tr>\n</tbody></table>");
add("html2html", "3c. Indent-Pre and block tags (pre-content on separate line)", "\n<p data-parsoid='{\"dsr\":[1,22,0,0]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[1,19,8,9]}'> </span>foo</p>\n\n<div data-parsoid='{\"stx\":\"html\",\"dsr\":[24,42,5,6]}'>\n<pre data-parsoid='{\"dsr\":[30,34,1,0]}'>foo</pre>\n\n</div>\n<center data-parsoid='{\"stx\":\"html\",\"dsr\":[43,67,8,9]}'>\n<pre data-parsoid='{\"dsr\":[52,56,1,0]}'>foo</pre>\n\n</center>\n<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[68,100,12,13]}'>\n<p data-parsoid='{\"dsr\":[81,85,0,0]}'> foo</p>\n\n</blockquote>\n<blockquote data-parsoid='{\"stx\":\"html\",\"dsr\":[101,133,12,13]}'>\n<p data-parsoid='{\"dsr\":[114,118,0,0]}'> foo</p>\n\n</blockquote>\n<table data-parsoid='{\"dsr\":[134,146,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[137,144,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[137,143,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[137,143,1,0]}'>\n<pre data-parsoid='{\"dsr\":[139,143,1,0]}'>foo</pre></td></tr>\n</tbody></table>\n\n<ul data-parsoid='{\"dsr\":[148,154,0,0]}'><li data-parsoid='{\"dsr\":[148,154,1,0]}'> foo</li></ul>\n");
add("html2html", "5a. White-space in indent-pre", "<pre data-parsoid='{\"dsr\":[0,15,1,0]}'>a<br data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[2,10,6,0]}'/>\n\n\nb</pre>\n");
add("html2html", "Definition list with wikilink containing colon", "<dl data-parsoid='{\"dsr\":[0,95,0,0]}'><dt data-parsoid='{\"dsr\":[0,24,1,0]}'> [/index.php?title=Help</dt><dd data-parsoid='{\"stx\":\"row\",\"dsr\":[24,60,1,0]}'>FAQ&amp;action=edit&amp;redlink=1 Help:FAQ]</dd>\n<dd data-parsoid='{\"dsr\":[61,95,1,0]}'> The least-read page on Wikipedia</dd></dl>\n");
add("html2html", "Definition lists: colon in HTML attribute", "<dl data-parsoid='{\"dsr\":[0,12,0,0]}'><dt data-parsoid='{\"dsr\":[0,12,1,0]}'> <b data-parsoid='{\"dsr\":[2,12,3,3]}'>bold</b></dt></dl>\n");
add("html2html", "Definition Lists: Hacky use to indent tables (with content following table)", "<dl data-parsoid='{\"dsr\":[0,63,0,0]}'><dd data-parsoid='{\"dsr\":[0,63,1,0]}'> <table data-parsoid='{\"dsr\":[2,17,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[5,15,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[5,14,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[5,9,1,0]}'>foo</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[10,14,1,0]}'>bar</td></tr>\n</tbody></table> <!--c1--><p data-parsoid='{\"dsr\":[27,63,0,0]}'> this text should be part of the dl</p></dd></dl>");
add("html2html", "Build table with wikilink", "<table class=\"wikitable\" data-parsoid='{\"dsr\":[0,204,20,2]}'>\n<tbody data-parsoid='{\"dsr\":[21,202,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[21,43,0,0]}'><th data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[21,28,1,0]}'>header</th>\n<th data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[29,43,1,0]}'>second header</th></tr>\n<tr style=\"color:red;\" data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[44,140,21,0]}'>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[66,99,1,0]}'>data <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[72,99,17,2]}'>linktext</a></td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[100,140,1,0]}'>second data <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[113,140,17,2]}'>linktext</a></td></tr>\n<tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[141,201,2,0]}'>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[144,149,1,0]}'>data</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[150,201,1,0]}'>second data <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[163,201,17,2]}'>link|text with pipe</a></td></tr>\n</tbody></table>\n");
add("html2html", "Fostered content in tables: Plain text", "<p data-parsoid='{\"dsr\":[0,1,0,0]}'>a</p>\n<table data-parsoid='{\"dsr\":[2,10,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[5,8,0,0]}'><tr class=\"mw-empty-elt\" data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[5,7,2,0]}'></tr>\n</tbody></table>");
add("html2html", "Fostered content in tables: Lists", "<ul data-parsoid='{\"dsr\":[0,3,0,0]}'><li data-parsoid='{\"dsr\":[0,3,1,0]}'> a</li></ul>\n\n<table data-parsoid='{\"dsr\":[5,13,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[8,11,0,0]}'><tr class=\"mw-empty-elt\" data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[8,10,2,0]}'></tr>\n</tbody></table>");
add("html2html", "Plain link, capitalized", "<p data-parsoid='{\"dsr\":[0,28,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,28,17,2]}'>Main Page</a></p>\n");
add("html2html", "Plain link, uncapitalized", "<p data-parsoid='{\"dsr\":[0,28,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,28,17,2]}'>main Page</a></p>\n");
add("html2html", "Piped link", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,32,17,2]}'>The Main Page</a></p>\n");
add("html2html", "Piped link with comment in link text", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,32,17,2]}'>The Main Page</a></p>\n");
add("html2html", "Piped link with multiple pipe characters in link text", "<p data-parsoid='{\"dsr\":[0,46,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[0,46,12,2]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,44,8,9]}'>|The|Main|Page|</span></a></p>");
add("html2html", "Broken link", "<p data-parsoid='{\"dsr\":[0,72,0,0]}'>[/index.php?title=Zigzagzogzagzig&amp;action=edit&amp;redlink=1 Zigzagzogzagzig]</p>\n");
add("html2html", "Broken link with fragment", "<p data-parsoid='{\"dsr\":[0,76,0,0]}'>[/index.php?title=Zigzagzogzagzig&amp;action=edit&amp;redlink=1 Zigzagzogzagzig#zug]</p>\n");
add("html2html", "Special page link with fragment", "<p data-parsoid='{\"dsr\":[0,54,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:Version#anchor\" title=\"Wiki/Special:Version\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:Version#anchor\"},\"sa\":{\"href\":\"wiki/Special:Version#anchor\"},\"dsr\":[0,54,30,2]}'>Special:Version#anchor</a></p>\n");
add("html2html", "Nonexistent special page link with fragment", "<p data-parsoid='{\"dsr\":[0,97,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:ThisNameWillHopefullyNeverBeUsed\" title=\"Wiki/Special:ThisNameWillHopefullyNeverBeUsed\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:ThisNameWillHopefullyNeverBeUsed\"},\"sa\":{\"href\":\"wiki/Special:ThisNameWillHopefullyNeverBeUsed\"},\"dsr\":[0,97,48,2]}'>Special:ThisNameWillHopefullyNeverBeUsed#anchor</a></p>\n");
add("html2html", "Link with prefix", "<p data-parsoid='{\"dsr\":[0,162,0,0]}'>xxx<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[3,31,17,2]}'>main Page</a>, xxx<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[36,64,17,2]}'>Main Page</a>, Xxx<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[69,97,17,2]}'>main Page</a> XXX<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[101,129,17,2]}'>main Page</a>, XXX<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[134,162,17,2]}'>Main Page</a></p>\n");
add("html2html", "Link with suffix", "<p data-parsoid='{\"dsr\":[0,97,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,31,17,2]}'>Main Pagexxx</a>, <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[33,61,17,2]}'>Main Page</a>XXX, <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[66,94,17,2]}'>Main Page</a>!!!</p>\n");
add("html2html", "T45661: Piped links with identical prefixes", "<p data-parsoid='{\"dsr\":[0,55,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Prefixed_article\" title=\"Wiki/Prefixed article\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Prefixed_article\"},\"sa\":{\"href\":\"wiki/Prefixed article\"},\"dsr\":[0,55,24,2]}'>prefixed articles with spaces</a></p>\n\n<p data-parsoid='{\"dsr\":[57,104,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Prefixed_article\" title=\"Wiki/Prefixed article\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Prefixed_article\"},\"sa\":{\"href\":\"wiki/Prefixed article\"},\"dsr\":[57,104,24,2]}'>prefixed articlesaoeu</a></p>\n\n<p data-parsoid='{\"dsr\":[106,139,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[106,139,17,2]}'>Main Page test</a></p>\n");
add("html2html", "Link with 4 brackets", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'>[[<a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[2,30,17,2]}'>Main Page</a>]]</p>\n");
add("html2html", "Link with multiple pipes", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,32,17,2]}'>The|Main|Page</a></p>\n");
add("html2html", "Link to namespaces", "<p data-parsoid='{\"dsr\":[0,156,0,0]}'>[/index.php?title=Talk:Parser_testing&amp;action=edit&amp;redlink=1 Talk:Parser testing], [/index.php?title=Meta:Disclaimers&amp;action=edit&amp;redlink=1 Meta:Disclaimers]</p>\n");
add("html2html", "Link with space in namespace", "<p data-parsoid='{\"dsr\":[0,76,0,0]}'>[/index.php?title=User_talk:Foo_bar&amp;action=edit&amp;redlink=1 User talk:Foo bar]</p>\n");
add("html2html", "Namespace takes precedence over interwiki link (T53680)", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/MemoryAlpha:AlphaTest\" title=\"Wiki/MemoryAlpha:AlphaTest\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/MemoryAlpha:AlphaTest\"},\"sa\":{\"href\":\"wiki/MemoryAlpha:AlphaTest\"},\"dsr\":[0,52,29,2]}'>MemoryAlpha:AlphaTest</a></p>\n");
add("html2html", "Piped link to namespace", "<p data-parsoid='{\"dsr\":[0,73,0,0]}'>[/index.php?title=Meta:Disclaimers&amp;action=edit&amp;redlink=1 The disclaimers]</p>\n");
add("html2html", "Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)", "<p data-parsoid='{\"dsr\":[0,84,0,0]}'><i data-parsoid='{\"dsr\":[0,61,2,2]}'>Some [/index.php?title=Link&amp;action=edit&amp;redlink=1 pretty </i>italics<i data-parsoid='{\"dsr\":[68,84,2,2]}'> and stuff]!</i></p>\n");
add("html2html", "Plain link to page with question mark in title", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/A%3Fb\" title=\"Wiki/A?b\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/A%3Fb\"},\"sa\":{\"href\":\"wiki/A?b\"},\"dsr\":[0,16,11,2]}'>A?b</a></p>\n\n<p data-parsoid='{\"dsr\":[18,34,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/A%3Fb\" title=\"Wiki/A?b\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/A%3Fb\"},\"sa\":{\"href\":\"wiki/A?b\"},\"dsr\":[18,34,11,2]}'>Baz</a></p>\n");
add("html2html", "Self-link to section should not be bold", "<p data-parsoid='{\"dsr\":[0,44,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page#section\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page#section\"},\"sa\":{\"href\":\"wiki/Main Page#section\"},\"dsr\":[0,44,25,2]}'>Main Page#section</a></p>\n");
add("html2html", "Self-link to numeric title", "<p data-parsoid='{\"dsr\":[0,1,0,0]}'>0</p>\n");
add("html2html", "Link to numeric-equivalent title", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/00\" title=\"Wiki/00\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/00\"},\"sa\":{\"href\":\"wiki/00\"},\"dsr\":[0,14,10,2]}'>00</a></p>\n");
add("html2html", "<nowiki> inside a link", "<p data-parsoid='{\"dsr\":[0,84,0,0]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,30,8,9]}'>[[Main Page]]</span> <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[31,83,17,2]}'>the main page [it's not very good</a>]</p>\n");
add("html2html", "Non-breaking spaces in title", "<p data-parsoid='{\"dsr\":[0,34,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,34,17,2]}'>  Main   Page  </a></p>\n");
add("html2html", "Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)", "<p data-parsoid='{\"dsr\":[0,34,0,0]}'><b data-parsoid='{\"dsr\":[0,34,3,3]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[3,31,17,2]}'>Main Page</a></b></p>\n");
add("html2html", "Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><i data-parsoid='{\"dsr\":[0,32,2,2]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[2,30,17,2]}'>Main Page</a></i></p>\n");
add("html2html", "Internal link with en linktrail: no apostrophes (T29473)", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'>[/index.php?title=Something&amp;action=edit&amp;redlink=1 Something]'nice</p>\n");
add("html2html", "Internal link with ca linktrail with apostrophes (T29473)", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'>[/index.php?title=Something&amp;action=edit&amp;redlink=1 Something'nice]</p>\n");
add("html2html", "Internal link with kaa linktrail with apostrophes (T29473)", "<p data-parsoid='{\"dsr\":[0,65,0,0]}'>[/index.php?title=Something&amp;action=edit&amp;redlink=1 Something'nice]</p>\n");
add("html2html", "Internal link with is link prefix", "<p data-parsoid='{\"dsr\":[0,45,0,0]}'>Aðrir <a rel=\"mw:WikiLink\" href=\"./Wiki/Söfnuður\" title=\"Wiki/Söfnuður\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Söfnuður\"},\"sa\":{\"href\":\"wiki/Söfnuður\"},\"dsr\":[6,42,16,2]}'>mótmælendasöfnuðir</a> og</p>\n");
add("html2html", "Internal link with is link trail and link prefix", "<p data-parsoid='{\"dsr\":[0,181,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Mótmælendatrú\" title=\"Wiki/Mótmælendatrú\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Mótmælendatrú\"},\"sa\":{\"href\":\"wiki/Mótmælendatrú\"},\"dsr\":[0,28,21,2]}'>xxxar</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/Mótmælendatrú\" title=\"Wiki/Mótmælendatrú\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Mótmælendatrú\"},\"sa\":{\"href\":\"wiki/Mótmælendatrú\"},\"dsr\":[29,67,21,2]}'>mótmælendatrúar</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/Söfnuður\" title=\"Wiki/Söfnuður\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Söfnuður\"},\"sa\":{\"href\":\"wiki/Söfnuður\"},\"dsr\":[68,104,16,2]}'>mótmælendasöfnuður</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/Söfnuður\" title=\"Wiki/Söfnuður\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Söfnuður\"},\"sa\":{\"href\":\"wiki/Söfnuður\"},\"dsr\":[105,141,16,2]}'>mótmælendasöfnuðir</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/Söfnuður\" title=\"Wiki/Söfnuður\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Söfnuður\"},\"sa\":{\"href\":\"wiki/Söfnuður\"},\"dsr\":[142,181,16,2]}'>mótmælendasöfnuðirxxx</a></p>\n");
add("html2html", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved", "<p data-parsoid='{\"dsr\":[0,18,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,18,11,2]}'> bar</a></p>\n\n<p data-parsoid='{\"dsr\":[20,42,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[20,42,11,2]}'> <i data-parsoid='{\"dsr\":[33,40,2,2]}'>bar</i></a></p>\n\n<p data-parsoid='{\"dsr\":[44,63,0,0]}'><a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://wp.org\" data-parsoid='{\"targetOff\":59,\"contentOffsets\":[59,62],\"dsr\":[44,63,15,1]}'>foo</a></p>\n\n<p data-parsoid='{\"dsr\":[65,88,0,0]}'><a rel=\"mw:ExtLink\" class=\"external text\" href=\"http://wp.org\" data-parsoid='{\"targetOff\":80,\"contentOffsets\":[80,87],\"dsr\":[65,88,15,1]}'><i data-parsoid='{\"dsr\":[80,87,2,2]}'>foo</i></a></p>\n");
add("html2html", "Space and question mark encoding in interlanguage links (T95473)", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link rel=\"mw:PageProp/Language\" href=\"http://es.wikipedia.org/wiki/Foo_bar?\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Foo_bar?\"},\"sa\":{\"href\":\"es:Foo_bar?\"},\"dsr\":[15,30,null,null]}'/>");
add("html2html", "Parsoid-specific test: Wikilinks with &nbsp; should RT properly", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'>[/index.php?title=WW_II&amp;action=edit&amp;redlink=1 WW II]</p>\n");
add("html2html", "<br> to <br />", "<p data-parsoid='{\"dsr\":[0,5,0,0]}'>1\n2\n3</p>\n");
add("html2html", "Incorrecly removing closing slashes from correctly formed XHTML", "\n");
add("html2html", "Failing to transform badly formed HTML into correct XHTML", "\n\n<p data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[2,2,0,0]}'><br data-parsoid='{\"dsr\":[2,2,0,0]}'/></p>\n");
add("html2html", "Handling html with a br self-closing tag", "\n\n<p data-parsoid='{\"dsr\":[2,2,0,0]}'><br data-parsoid='{\"dsr\":[2,2,0,0]}'/></p>\n\n\n<p data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[5,5,0,0]}'><br data-parsoid='{\"dsr\":[5,5,0,0]}'/></p>\n");
add("html2html", "2. List embedded in a formatting tag in a misnested way", "<p data-parsoid='{\"dsr\":[0,23,0,0]}'><small data-parsoid='{\"stx\":\"html\",\"dsr\":[0,15,7,8]}'></small>\n<small data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[16,23,7,0]}'></small></p><small data-parsoid='{\"stx\":\"html\",\"autoInsertedStart\":true,\"dsr\":[23,36,0,8]}'>\n<ul data-parsoid='{\"dsr\":[24,27,0,0]}'><li data-parsoid='{\"dsr\":[24,27,1,0]}'> a</li></ul>\n</small>\n<ul data-parsoid='{\"dsr\":[37,55,0,0]}'><li data-parsoid='{\"dsr\":[37,55,1,0]}'> <small data-parsoid='{\"stx\":\"html\",\"dsr\":[39,55,7,8]}'>b</small></li></ul>\n");
add("html2html", "Case-sensitive magic words, when cased differently, should just be template transclusions", "<p data-parsoid='{\"dsr\":[0,331,0,0]}'>[/index.php?title=Template:CurrentMonth&amp;action=edit&amp;redlink=1 Template:CurrentMonth]\n[/index.php?title=Template:Currentday&amp;action=edit&amp;redlink=1 Template:Currentday]\n[/index.php?title=Template:CURreNTweEK&amp;action=edit&amp;redlink=1 Template:CURreNTweEK]\n[/index.php?title=Template:CurrentHour&amp;action=edit&amp;redlink=1 Template:CurrentHour]</p>\n");
add("html2html", "Nonexistent template", "<p data-parsoid='{\"dsr\":[0,108,0,0]}'>[/index.php?title=Template:Thistemplatedoesnotexist&amp;action=edit&amp;redlink=1 Template:Thistemplatedoesnotexist]</p>\n");
add("html2html", "Template with invalid target containing wikilink", "<p data-parsoid='{\"dsr\":[0,17,0,0]}'>{{<a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>}}</p>");
add("html2html", "Template with just whitespace in it, T70421", "<p data-parsoid='{\"dsr\":[1,31,0,0]}'>{{echo|{{}<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[11,29,8,9]}'>}</span>}}</p>");
add("html2html", "Template unnamed parameter", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,32,17,2]}'>the main page</a></p>\n");
add("html2html", "Templates with templated name", "<p data-parsoid='{\"dsr\":[0,45,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,21,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"{{echo|echo}}\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>\n{<span about=\"#mwt3\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[23,44,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"echo\"},\"params\":{\"1\":{\"wt\":\"inner list\"}},\"i\":0}}]}'>inner list</span>}</p>");
add("html2html", "Templates with invalid templated targets", "<p about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,21,0,0],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\\n{{echo|foo}}\"},\"params\":{},\"i\":0}}]}'>{{echo\nfoo}}</p>");
add("html2html", "Template with complex arguments", "<p data-parsoid='{\"dsr\":[0,84,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Template:Complextemplate\" title=\"Wiki/Template:Complextemplate\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Template:Complextemplate\"},\"sa\":{\"href\":\"wiki/Template:Complextemplate\"},\"dsr\":[0,38,32,2]}'>link</a> This is a test template with parameter (test)</p>\n");
add("html2html", "T2553: link with two variables in a piped link", "<table data-parsoid='{\"dsr\":[0,43,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,41,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,40,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,40,1,0]}'>[[<span about=\"#mwt7\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[6,13,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"1\"},\"params\":{},\"i\":0}}]}'>{{{1}}}</span><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[13,31,8,9]}'>|</span><span about=\"#mwt8\" typeof=\"mw:Param\" data-parsoid='{\"pi\":[[]],\"dsr\":[31,38,null,null]}' data-mw='{\"parts\":[{\"templatearg\":{\"target\":{\"wt\":\"2\"},\"params\":{},\"i\":0}}]}'>{{{2}}}</span>]]</td></tr>\n</tbody></table>");
add("html2html", "Abort table cell attribute parsing on wikilink", "<table data-parsoid='{\"dsr\":[0,140,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,138,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,137,0,0]}'><td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,47,1,0]}'>testing <a rel=\"mw:WikiLink\" href=\"./One\" title=\"One\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./One\"},\"sa\":{\"href\":\"one\"},\"dsr\":[12,23,6,2]}'>two</a><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[23,47,8,9]}'> |three</span></td><td data-parsoid='{\"stx\":\"row\",\"autoInsertedEnd\":true,\"dsr\":[47,53,2,0]}'>four</td>\n<td data-parsoid='{\"a\":{\"testing\":null,\"one\":null,\"two\":null},\"sa\":{\"testing\":\"\",\"one\":\"\",\"two\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[54,78,19,0]}'>three</td><td data-parsoid='{\"stx\":\"row\",\"autoInsertedEnd\":true,\"dsr\":[78,84,2,0]}'>four</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[85,131,1,0]}'>testing=\"<a rel=\"mw:WikiLink\" href=\"./One\" title=\"One\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./One\"},\"sa\":{\"href\":\"one\"},\"dsr\":[95,106,6,2]}'>two</a><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[106,131,8,9]}'>\" |three</span></td><td data-parsoid='{\"stx\":\"row\",\"autoInsertedEnd\":true,\"dsr\":[131,137,2,0]}'>four</td></tr>\n</tbody></table>");
add("html2html", "Template parameter as link source", "<p data-parsoid='{\"dsr\":[0,23,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,23,17,2]}'>link</a></p>\n");
add("html2html", "Template as link source", "<p data-parsoid='{\"dsr\":[0,28,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,28,17,2]}'>Main Page</a></p>\n\n<p data-parsoid='{\"dsr\":[30,58,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[30,58,17,2]}'>Main Page</a></p>\n\n<p data-parsoid='{\"dsr\":[60,92,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[60,88,17,2]}'>Main Page</a>Page</p>\n");
add("html2html", "Template infinite loop", "<p data-parsoid='{\"dsr\":[0,89,0,0]}'><span class=\"error\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,89,20,7]}'>Template loop detected: <a rel=\"mw:WikiLink\" href=\"./Wiki/Template:Loop1\" title=\"Wiki/Template:Loop1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Template:Loop1\"},\"sa\":{\"href\":\"wiki/Template:Loop1\"},\"dsr\":[44,82,22,2]}'>Template:Loop1</a></span></p>\n");
add("html2html", "Self-closed noinclude, includeonly, onlyinclude tags", "\n");
add("html2html", "T8563: Section extraction for section shown by <includeonly>", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,32,8,9]}'>==Section T-2==</span></p>");
add("html2html", "T8563: Section extraction for section suppressed by <includeonly>", "<p data-parsoid='{\"dsr\":[0,30,0,0]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,30,8,9]}'>==Section 1==</span></p>");
add("html2html", "Templates: Links: 1. Simple example", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,16,11,2]}'>bar</a></p>\n");
add("html2html", "Templates: Links: 2. Generation of link href", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,16,11,2]}'>bar</a></p>\n");
add("html2html", "Templates: Links: 3. Generation of part of a link href", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,16,11,2]}'>bar</a></p>\n\n<p data-parsoid='{\"dsr\":[18,72,0,0]}'>[/index.php?title=Foobar&amp;action=edit&amp;redlink=1 Foobar]</p>\n\n<p data-parsoid='{\"dsr\":[74,134,0,0]}'>[/index.php?title=Foobarbaz&amp;action=edit&amp;redlink=1 Foobarbaz]</p>\n\n<p data-parsoid='{\"dsr\":[136,187,0,0]}'>[/index.php?title=Foobar&amp;action=edit&amp;redlink=1 bar]</p>\n\n<p data-parsoid='{\"dsr\":[189,243,0,0]}'>[/index.php?title=Foobar&amp;action=edit&amp;redlink=1 Foobar]</p>\n\n<p data-parsoid='{\"dsr\":[245,296,0,0]}'>[/index.php?title=Foobar&amp;action=edit&amp;redlink=1 bar]</p>\n");
add("html2html", "Templates: Links: 4. Multiple templates generating link href", "<p data-parsoid='{\"dsr\":[0,54,0,0]}'>[/index.php?title=Foobar&amp;action=edit&amp;redlink=1 Foobar]</p>\n");
add("html2html", "Templates: Links: 5. Generation of link text", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,16,11,2]}'>bar</a></p>\n");
add("html2html", "Templates: Links: 5. Nested templates (only outermost template should be marked)", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[0,16,11,2]}'>bar</a></p>\n");
add("html2html", "Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered", "<p data-parsoid='{\"dsr\":[0,63,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,22,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"{{{!}}\\n{{!}}-\"}},\"i\":0}}]}'>{|\n|-</span>\n<meta typeof=\"mw:Includes/OnlyInclude\" data-parsoid='{\"src\":\"&lt;onlyinclude>\",\"dsr\":[23,36,null,null]}'/>\n|foo\n<meta typeof=\"mw:Includes/OnlyInclude/End\" data-parsoid='{\"src\":\"&lt;/onlyinclude>\",\"dsr\":[42,56,null,null]}'/>\n<span about=\"#mwt3\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[57,62,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"!\",\"function\":\"!\"},\"params\":{},\"i\":0}}]}'>|</span>}</p>\n");
add("html2html", "Templates: Lists: Multi-line list-items via templates", "<ul data-parsoid='{\"dsr\":[0,173,0,0]}'><li data-parsoid='{\"dsr\":[0,86,1,0]}'> a [/index.php?title=Template:Nonexistent&amp;action=edit&amp;redlink=1 Template:Nonexistent]</li>\n<li data-parsoid='{\"dsr\":[87,173,1,0]}'> b [/index.php?title=Template:Nonexistent&amp;action=edit&amp;redlink=1 Template:Nonexistent]</li></ul>\n");
add("html2html", "Templates: Ugly templates: 4. newline-only template parameter inconsistency", "\n");
add("html2html", "message transform: magic variables", "<p data-parsoid='{\"dsr\":[0,9,0,0]}'>MediaWiki</p>");
add("html2html", "message transform: should not transform wiki markup", "<p data-parsoid='{\"dsr\":[0,25,0,0]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,25,8,9]}'>''test''</span></p>");
add("html2html", "message transform: <noinclude> in transcluded template (T6926)", "<p data-parsoid='{\"dsr\":[0,6,0,0]}'>Foobar</p>");
add("html2html", "message transform: <onlyinclude> in transcluded template (T6926)", "<p data-parsoid='{\"dsr\":[0,3,0,0]}'>Foo</p>");
add("html2html", "{{#special:}} page name, known", "<p data-parsoid='{\"dsr\":[0,21,0,0]}'>Special:RecentChanges</p>");
add("html2html", "{{#special:}} page name with subpage, known", "<p data-parsoid='{\"dsr\":[0,27,0,0]}'>Special:RecentChanges/param</p>");
add("html2html", "{{#special:}} page name, unknown", "<p data-parsoid='{\"dsr\":[0,26,0,0]}'>Special:Foobar nonexistent</p>");
add("html2html", "{{#speciale:}} page name, known", "<p data-parsoid='{\"dsr\":[0,21,0,0]}'>Special:RecentChanges</p>");
add("html2html", "{{#speciale:}} page name with subpage, known", "<p data-parsoid='{\"dsr\":[0,27,0,0]}'>Special:RecentChanges/param</p>");
add("html2html", "{{#speciale:}} page name, unknown", "<p data-parsoid='{\"dsr\":[0,26,0,0]}'>Special:Foobar_nonexistent</p>");
add("html2html", "Allow empty links in image captions (T62753)", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"Caption [[Link1]]\\n&lt;nowiki>[[]]&lt;/nowiki>\\n[[Link2]]\\n\"}],\"dsr\":[0,76,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><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,74,null,null]}'>Caption <a rel=\"mw:WikiLink\" href=\"./Link1\" title=\"Link1\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link1\"},\"sa\":{\"href\":\"Link1\"},\"dsr\":[32,41,2,2]}'>Link1</a>\n<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[42,63,8,9]}'>[[]]</span>\n<a rel=\"mw:WikiLink\" href=\"./Link2\" title=\"Link2\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link2\"},\"sa\":{\"href\":\"Link2\"},\"dsr\":[64,73,2,2]}'>Link2</a>\n</figcaption></figure>");
add("html2html", "Image with multiple attributes from the same template", "<figure class=\"mw-default-size mw-halign-right\" typeof=\"mw:Image\" data-parsoid='{\"optList\":[{\"ck\":\"right\",\"ak\":\"right\"},{\"ck\":\"caption\",\"ak\":\"Caption text\"}],\"dsr\":[0,38,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><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><figcaption data-parsoid='{\"dsr\":[null,36,null,null]}'>Caption text</figcaption></figure>\n");
add("html2html", "Image with link tails", "<p data-parsoid='{\"dsr\":[0,29,0,0]}'>123<figure-inline class=\"mw-default-size\" typeof=\"mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[3,22,null,null]}'><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>456\n123</p>\n<figure class=\"mw-default-size mw-halign-right\" typeof=\"mw:Image\" data-parsoid='{\"optList\":[{\"ck\":\"right\",\"ak\":\"right\"}],\"dsr\":[30,55,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[32,53,null,null]}'><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>\n<p data-parsoid='{\"dsr\":[56,63,0,0]}'>456\n123</p>\n<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"}],\"dsr\":[64,89,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[66,87,null,null]}'><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></figure>\n<p data-parsoid='{\"dsr\":[90,93,0,0]}'>456</p>");
add("html2html", "Link to image page- image page normally doesn't exists, hence edit link\nAdd test with existing image page\n#<p><a href=\"/wiki/File:Test\" title=\"Image:Test\">Image:test</a>", "<p data-parsoid='{\"dsr\":[0,61,0,0]}'>[/index.php?title=File:Test&amp;action=edit&amp;redlink=1 Image:test]</p>\n");
add("html2html", "T20784 Link to non-existent image page with caption should use caption as link text", "<p data-parsoid='{\"dsr\":[0,58,0,0]}'>[/index.php?title=File:Test&amp;action=edit&amp;redlink=1 caption]</p>\n");
add("html2html", "SVG thumbnails with invalid language code", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"lang\",\"ak\":\"lang=invalid:language:code\"}],\"dsr\":[0,52,2,2]}'><a href=\"./File:Foobar.svg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.svg\"},\"sa\":{\"href\":\"File:Foobar.svg\"},\"dsr\":[2,50,null,null]}'><img resource=\"./File:Foobar.svg\" src=\"//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png\" lang=\"invalid:language:code\" data-file-width=\"240\" data-file-height=\"180\" data-file-type=\"drawing\" height=\"165\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.svg\",\"lang\":\"invalid:language:code\",\"height\":\"165\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Foobar.svg\",\"lang\":\"lang=invalid:language:code\"}}'/></a></figure>\n");
-add("html2html", "T93580: 3. Templated <ref> inside inline images", "<p data-parsoid='{\"dsr\":[0,98,0,0]}'><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>}}\"}],\"dsr\":[0,98,null,null]}' data-mw='{\"caption\":\"Undisplayed caption in inline image with ref: &lt;sup about=\\\"#mwt3\\\" class=\\\"mw-ref\\\" id=\\\"cite_ref-1\\\" rel=\\\"dc:references\\\" typeof=\\\"mw:Transclusion mw:Extension/ref\\\" data-parsoid=&apos;{\\\"dsr\\\":[64,96,null,null],\\\"pi\\\":[[{\\\"k\\\":\\\"1\\\"}]]}&apos; data-mw=&apos;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"echo\\\",\\\"href\\\":\\\"./Template:Echo\\\"},\\\"params\\\":{\\\"1\\\":{\\\"wt\\\":\\\"&amp;lt;ref>{{echo|foo}}&amp;lt;/ref>\\\"}},\\\"i\\\":0}}]}&apos;>&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>\n\n<ol class=\"mw-references references\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid='{\"dsr\":[100,114,2,2]}' 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>");
add("html2html", "Subpage link", "<p data-parsoid='{\"dsr\":[0,38,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Subpage_test/subpage\" title=\"Wiki/Subpage test/subpage\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Subpage_test/subpage\"},\"sa\":{\"href\":\"wiki/Subpage test/subpage\"},\"dsr\":[0,38,28,2]}'>/subpage</a></p>\n");
add("html2html", "Subpage noslash link", "<p data-parsoid='{\"dsr\":[0,37,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Subpage_test/subpage\" title=\"Wiki/Subpage test/subpage\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Subpage_test/subpage\"},\"sa\":{\"href\":\"wiki/Subpage test/subpage\"},\"dsr\":[0,37,28,2]}'>subpage</a></p>\n");
add("html2html", "Render invalid page names as plain text (T53090)", "<p data-parsoid='{\"dsr\":[0,172,0,0]}'>[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[59,89,8,9]}'>[[foo~~~bar]]</span>\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo<a rel=\"mw:ExtLink\" class=\"external autonumber\" href=\"http://example.com\" data-parsoid='{\"targetOff\":166,\"contentOffsets\":[166,166],\"dsr\":[147,167,19,1]}'></a>xyz]]</p>\n\n<p data-parsoid='{\"dsr\":[174,420,0,0]}'>[[<span about=\"#mwt36\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[176,193,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"./../foo\"}},\"i\":0}}]}'>./../foo</span>|bar]]\n[[<span about=\"#mwt37\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[202,216,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo/.\"}},\"i\":0}}]}'>foo/.</span>|bar]]\n[[<span about=\"#mwt38\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[225,240,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo/..\"}},\"i\":0}}]}'>foo/..</span>|bar]]\n[[<span about=\"#mwt39\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[249,268,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo~~~~bar\"}},\"i\":0}}]}'>foo~~~~bar</span>]]\n[[<span about=\"#mwt40\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[273,289,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo>bar\"}},\"i\":0}}]}'>foo>bar</span>]]\n[[<span about=\"#mwt41\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[294,313,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo././bar\"}},\"i\":0}}]}'>foo././bar</span>]]\n[[<span about=\"#mwt42\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[318,334,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo{bar\"}},\"i\":0}}]}'>foo{bar</span>]]\n[[<span about=\"#mwt43\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[339,355,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo}bar\"}},\"i\":0}}]}'>foo}bar</span>]]\n[[<span about=\"#mwt44\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[360,376,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo[bar\"}},\"i\":0}}]}'>foo[bar</span>]]\n[[<span about=\"#mwt45\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[381,397,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo]bar\"}},\"i\":0}}]}'>foo]bar</span>]]\n[[<span about=\"#mwt46\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[402,418,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo&lt;bar\"}},\"i\":0}}]}'>foo&lt;bar</span>]]</p>");
add("html2html", "Disabled subpages", "<p data-parsoid='{\"dsr\":[0,58,0,0]}'>[/index.php?title=/subpage&amp;action=edit&amp;redlink=1 /subpage]</p>\n");
add("html2html", "T2561: {{/Subpage}}", "<p data-parsoid='{\"dsr\":[0,66,0,0]}'>[/index.php?title=Page/Subpage&amp;action=edit&amp;redlink=1 Page/Subpage]</p>\n");
add("html2html", "Link to category", "<p data-parsoid='{\"dsr\":[0,72,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Category:MediaWiki_User's_Guide\" title=\"Wiki/Category:MediaWiki User's Guide\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Category:MediaWiki_User&apos;s_Guide\"},\"sa\":{\"href\":\"wiki/Category:MediaWiki User&apos;s Guide\"},\"dsr\":[0,72,39,2]}'>Category:MediaWiki User's Guide</a></p>\n");
add("html2html", "Section headings with TOC", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,710,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,702,0,0]}'><li data-parsoid='{\"dsr\":[92,505,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Headline_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Headline_1\"},\"sa\":{\"href\":\"#Headline_1\"},\"dsr\":[94,182,14,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[108,140,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[141,180,22,7]}'>Headline 1</span></a>\n<ul data-parsoid='{\"dsr\":[183,505,0,0]}'><li data-parsoid='{\"dsr\":[183,505,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Subheadline_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Subheadline_1\"},\"sa\":{\"href\":\"#Subheadline_1\"},\"dsr\":[186,282,17,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[203,237,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[238,280,22,7]}'>Subheadline 1</span></a>\n<ul data-parsoid='{\"dsr\":[283,505,0,0]}'><li data-parsoid='{\"dsr\":[283,505,3,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Skipping_a_level\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Skipping_a_level\"},\"sa\":{\"href\":\"#Skipping_a_level\"},\"dsr\":[287,391,20,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[307,343,24,7]}'>1.1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[344,389,22,7]}'>Skipping a level</span></a>\n<ul data-parsoid='{\"dsr\":[392,505,0,0]}'><li data-parsoid='{\"dsr\":[392,505,4,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Skipping_a_level_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Skipping_a_level_2\"},\"sa\":{\"href\":\"#Skipping_a_level_2\"},\"dsr\":[397,505,22,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[419,457,24,7]}'>1.1.1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[458,503,22,7]}'>Skipping a level</span></a></li></ul></li></ul></li></ul></li>\n<li data-parsoid='{\"dsr\":[506,702,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Headline_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Headline_2\"},\"sa\":{\"href\":\"#Headline_2\"},\"dsr\":[508,596,14,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[522,554,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[555,594,22,7]}'>Headline 2</span></a>\n<ul data-parsoid='{\"dsr\":[597,702,0,0]}'><li data-parsoid='{\"dsr\":[597,702,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Another_headline\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Another_headline\"},\"sa\":{\"href\":\"#Another_headline\"},\"dsr\":[600,702,20,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[620,654,24,7]}'>2.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[655,700,22,7]}'>Another headline</span></a></li></ul></li></ul>\n\n</div>\n\n<h2 id=\"Headline_1\" data-parsoid='{\"dsr\":[712,728,2,2]}'> Headline 1 </h2>\n\n<h3 id=\"Subheadline_1\" data-parsoid='{\"dsr\":[730,751,3,3]}'> Subheadline 1 </h3>\n\n<h5 id=\"Skipping_a_level\" data-parsoid='{\"dsr\":[753,781,5,5]}'> Skipping a level </h5>\n\n<h6 id=\"Skipping_a_level_2\" data-parsoid='{\"dsr\":[783,813,6,6]}'> Skipping a level </h6>\n\n<h2 id=\"Headline_2\" data-parsoid='{\"dsr\":[815,831,2,2]}'> Headline 2 </h2>\n<p data-parsoid='{\"dsr\":[832,841,0,0]}'>Some text</p>\n\n<h3 id=\"Another_headline\" data-parsoid='{\"dsr\":[843,867,3,3]}'> Another headline </h3>\n");
add("html2html", "TOC regression (T11764)", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,644,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,636,0,0]}'><li data-parsoid='{\"dsr\":[92,459,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1\"},\"sa\":{\"href\":\"#title_1\"},\"dsr\":[94,176,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[105,137,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[138,174,22,7]}'>title 1</span></a>\n<ul data-parsoid='{\"dsr\":[177,459,0,0]}'><li data-parsoid='{\"dsr\":[177,367,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.1\"},\"sa\":{\"href\":\"#title_1.1\"},\"dsr\":[180,268,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[193,227,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[228,266,22,7]}'>title 1.1</span></a>\n<ul data-parsoid='{\"dsr\":[269,367,0,0]}'><li data-parsoid='{\"dsr\":[269,367,3,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.1.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.1.1\"},\"sa\":{\"href\":\"#title_1.1.1\"},\"dsr\":[273,367,15,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[288,324,24,7]}'>1.1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[325,365,22,7]}'>title 1.1.1</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[368,459,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.2\"},\"sa\":{\"href\":\"#title_1.2\"},\"dsr\":[371,459,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[384,418,24,7]}'>1.2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[419,457,22,7]}'>title 1.2</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[460,636,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_2\"},\"sa\":{\"href\":\"#title_2\"},\"dsr\":[462,544,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[473,505,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[506,542,22,7]}'>title 2</span></a>\n<ul data-parsoid='{\"dsr\":[545,636,0,0]}'><li data-parsoid='{\"dsr\":[545,636,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_2.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_2.1\"},\"sa\":{\"href\":\"#title_2.1\"},\"dsr\":[548,636,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[561,595,24,7]}'>2.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[596,634,22,7]}'>title 2.1</span></a></li></ul></li></ul>\n\n</div>\n\n<h2 id=\"title_1\" data-parsoid='{\"dsr\":[646,659,2,2]}'> title 1 </h2>\n\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[661,678,3,3]}'> title 1.1 </h3>\n\n<h4 id=\"title_1.1.1\" data-parsoid='{\"dsr\":[680,701,4,4]}'> title 1.1.1 </h4>\n\n<h3 id=\"title_1.2\" data-parsoid='{\"dsr\":[703,720,3,3]}'> title 1.2 </h3>\n\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[722,735,2,2]}'> title 2 </h2>\n\n<h3 id=\"title_2.1\" data-parsoid='{\"dsr\":[737,754,3,3]}'> title 2.1 </h3>\n");
add("html2html", "TOC with wgMaxTocLevel=3 (T8204)", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,545,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,537,0,0]}'><li data-parsoid='{\"dsr\":[92,360,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1\"},\"sa\":{\"href\":\"#title_1\"},\"dsr\":[94,176,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[105,137,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[138,174,22,7]}'>title 1</span></a>\n<ul data-parsoid='{\"dsr\":[177,360,0,0]}'><li data-parsoid='{\"dsr\":[177,268,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.1\"},\"sa\":{\"href\":\"#title_1.1\"},\"dsr\":[180,268,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[193,227,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[228,266,22,7]}'>title 1.1</span></a></li>\n<li data-parsoid='{\"dsr\":[269,360,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.2\"},\"sa\":{\"href\":\"#title_1.2\"},\"dsr\":[272,360,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[285,319,24,7]}'>1.2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[320,358,22,7]}'>title 1.2</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[361,537,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_2\"},\"sa\":{\"href\":\"#title_2\"},\"dsr\":[363,445,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[374,406,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[407,443,22,7]}'>title 2</span></a>\n<ul data-parsoid='{\"dsr\":[446,537,0,0]}'><li data-parsoid='{\"dsr\":[446,537,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_2.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_2.1\"},\"sa\":{\"href\":\"#title_2.1\"},\"dsr\":[449,537,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[462,496,24,7]}'>2.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[497,535,22,7]}'>title 2.1</span></a></li></ul></li></ul>\n\n</div>\n\n<h2 id=\"title_1\" data-parsoid='{\"dsr\":[547,560,2,2]}'> title 1 </h2>\n\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[562,579,3,3]}'> title 1.1 </h3>\n\n<h4 id=\"title_1.1.1\" data-parsoid='{\"dsr\":[581,602,4,4]}'> title 1.1.1 </h4>\n\n<h3 id=\"title_1.2\" data-parsoid='{\"dsr\":[604,621,3,3]}'> title 1.2 </h3>\n\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[623,636,2,2]}'> title 2 </h2>\n\n<h3 id=\"title_2.1\" data-parsoid='{\"dsr\":[638,655,3,3]}'> title 2.1 </h3>\n");
add("html2html", "TOC with wgMaxTocLevel=3 and two level four headings (T8204)", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,373,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,365,0,0]}'><li data-parsoid='{\"dsr\":[92,276,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Section_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Section_1\"},\"sa\":{\"href\":\"#Section_1\"},\"dsr\":[94,180,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[107,139,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[140,178,22,7]}'>Section 1</span></a>\n<ul data-parsoid='{\"dsr\":[181,276,0,0]}'><li data-parsoid='{\"dsr\":[181,276,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Section_1.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Section_1.1\"},\"sa\":{\"href\":\"#Section_1.1\"},\"dsr\":[184,276,15,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[199,233,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[234,274,22,7]}'>Section 1.1</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[277,365,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Section_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#Section_2\"},\"sa\":{\"href\":\"#Section_2\"},\"dsr\":[279,365,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[292,324,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[325,363,22,7]}'>Section 2</span></a></li></ul>\n\n</div>\n\n<h2 id=\"Section_1\" data-parsoid='{\"dsr\":[375,390,2,2]}'> Section 1 </h2>\n\n<h3 id=\"Section_1.1\" data-parsoid='{\"dsr\":[392,411,3,3]}'> Section 1.1 </h3>\n\n<h4 id=\"Section_1.1.1\" data-parsoid='{\"dsr\":[413,436,4,4]}'> Section 1.1.1 </h4>\n\n<h4 id=\"Section_1.1.1.1\" data-parsoid='{\"dsr\":[438,463,4,4]}'> Section 1.1.1.1 </h4>\n\n<h2 id=\"Section_2\" data-parsoid='{\"dsr\":[465,480,2,2]}'> Section 2 </h2>\n");
add("html2html", "Link inside a section heading", "<h2 id=\"Section_with_a_link_in_it\" data-parsoid='{\"dsr\":[0,50,2,2]}'> Section with a <a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[18,41,17,2]}'>link</a> in it </h2>\n");
add("html2html", "TOC regression (T14077)", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,361,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,353,0,0]}'><li data-parsoid='{\"dsr\":[92,268,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1\"},\"sa\":{\"href\":\"#title_1\"},\"dsr\":[94,176,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[105,137,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[138,174,22,7]}'>title 1</span></a>\n<ul data-parsoid='{\"dsr\":[177,268,0,0]}'><li data-parsoid='{\"dsr\":[177,268,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_1.1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_1.1\"},\"sa\":{\"href\":\"#title_1.1\"},\"dsr\":[180,268,13,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[193,227,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[228,266,22,7]}'>title 1.1</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[269,353,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#title_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#title_2\"},\"sa\":{\"href\":\"#title_2\"},\"dsr\":[271,353,11,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[282,314,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[315,351,22,7]}'>title 2</span></a></li></ul>\n\n</div>\n\n<h2 id=\"title_1\" data-parsoid='{\"dsr\":[363,376,2,2]}'> title 1 </h2>\n\n<h3 id=\"title_1.1\" data-parsoid='{\"dsr\":[378,395,3,3]}'> title 1.1 </h3>\n\n<h2 id=\"title_2\" data-parsoid='{\"dsr\":[397,410,2,2]}'> title 2 </h2>\n");
add("html2html", "Character reference normalization in link text (T3938)", "<p data-parsoid='{\"dsr\":[0,28,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main Page\"},\"dsr\":[0,28,17,2]}'>this&amp;that</a></p>\n");
add("html2html", "(T21451) Links should refer to the normalized form.", "<p data-parsoid='{\"dsr\":[0,73,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/אַ\" title=\"Wiki/אַ\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/אַ\"},\"sa\":{\"href\":\"wiki/אַ\"},\"dsr\":[0,13,10,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/אַ\" title=\"Wiki/אַ\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/אַ\"},\"sa\":{\"href\":\"wiki/אַ\"},\"dsr\":[14,28,10,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/אַ\" title=\"Wiki/אַ\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/אַ\"},\"sa\":{\"href\":\"wiki/אַ\"},\"dsr\":[29,43,10,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/אַ\" title=\"Wiki/אַ\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/אַ\"},\"sa\":{\"href\":\"wiki/אַ\"},\"dsr\":[44,58,10,2]}'>אַ</a>\n<a rel=\"mw:WikiLink\" href=\"./Wiki/אַ\" title=\"Wiki/אַ\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/אַ\"},\"sa\":{\"href\":\"wiki/אַ\"},\"dsr\":[59,73,10,2]}'>אַ</a></p>\n");
add("html2html", "T4095: link with pipe and three closing brackets, version 2", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" title=\"Main Page\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main Page\"},\"dsr\":[0,52,12,2]}'><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[12,50,8,9]}'>[http://example.com/]</span></a></p>");
add("html2html", "Table attribute safety", "<table data-parsoid='{\"dsr\":[0,44,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[3,42,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,41,0,0]}'><th style=\" \" data-parsoid='{\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/* insecure input */\"},\"autoInsertedEnd\":true,\"dsr\":[3,41,32,0]}'>status</th></tr>\n</tbody></table>\n");
add("html2html", "CSS line continuation 1", "<div style=\" \" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/* insecure input */\"},\"dsr\":[0,40,34,6]}'></div>\n");
add("html2html", "CSS line continuation 2", "<div style=\" \" data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/* invalid control char */\"},\"dsr\":[0,46,40,6]}'></div>\n");
add("html2html", "Parser hook: nested tags", "<pre typeof=\"mw:Extension/tag\" about=\"#mwt3\" data-parsoid='{\"dsr\":[0,16,2,2]}' data-mw='{\"name\":\"tag\",\"attrs\":{},\"body\":{\"extsrc\":\"&lt;tag>\"}}'></pre><span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[16,39,8,9]}'>&lt;/tag></span>");
add("html2html", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata", "<div itemscope=\"\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,244,18,6]}'>\n\t<p data-parsoid='{\"dsr\":[20,236,0,0]}'>&lt;meta itemprop=\"hello\" content=\"world\" />\n\t&lt;meta http-equiv=\"refresh\" content=\"5\">\n\t&lt;meta itemprop=\"hello\" content=\"5\" />\n\t<a rel=\"mw:ExtLink\" class=\"external autonumber\" href=\"http://example.org\" data-parsoid='{\"targetOff\":162,\"contentOffsets\":[162,162],\"dsr\":[143,163,19,1]}'></a>\n\t&lt;link rel=\"stylesheet\" href=\"http://example.org\">\n\t<a rel=\"mw:ExtLink\" class=\"external autonumber\" href=\"http://example.org\" data-parsoid='{\"targetOff\":235,\"contentOffsets\":[235,235],\"dsr\":[216,236,19,1]}'></a></p>\n\n</div>\n");
add("html2html", "HTML ordered list item with parameters oddity", "<ol data-parsoid='{\"dsr\":[0,5,0,0]}'><li data-parsoid='{\"dsr\":[0,5,1,0]}'> One</li></ol>\n");
add("html2html", "Special page transclusion", "<ul data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[2,24,14,2]}'>Xyzzyx</a></li></ul>\n");
add("html2html", "Special page transclusion twice (T7021)", "<ul data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[2,24,14,2]}'>Xyzzyx</a></li></ul>\n\n<ul data-parsoid='{\"dsr\":[26,50,0,0]}'><li data-parsoid='{\"dsr\":[26,50,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[28,50,14,2]}'>Xyzzyx</a></li></ul>\n");
add("html2html", "Transclusion of nonexistent MediaWiki message", "<p data-parsoid='{\"dsr\":[0,84,0,0]}'>[/index.php?title=MediaWiki:Mainpagexxx&amp;action=edit&amp;redlink=1 MediaWiki:Mainpagexxx]</p>\n");
add("html2html", "Special:Search page linking.", "<p data-parsoid='{\"dsr\":[0,38,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Wiki/Special:Search\" title=\"Wiki/Special:Search\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:Search\"},\"sa\":{\"href\":\"wiki/Special:Search\"},\"dsr\":[0,38,22,2]}'>Special:Search</a></p>\n");
add("html2html", "Say the magic word", "<ul data-parsoid='{\"dsr\":[0,308,0,0]}'><li data-parsoid='{\"dsr\":[0,13,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[14,27,1,0]}'> Parser_test</li>\n<li data-parsoid='{\"dsr\":[28,41,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[42,55,1,0]}'> Parser_test</li>\n<li data-parsoid='{\"dsr\":[56,69,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[70,83,1,0]}'> Parser_test</li>\n<li data-parsoid='{\"dsr\":[84,97,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[98,111,1,0]}'> Parser_test</li>\n<li data-parsoid='{\"dsr\":[112,125,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[126,139,1,0]}'> Parser_test</li>\n<li data-parsoid='{\"dsr\":[140,158,1,0]}'> Talk:Parser test</li>\n<li data-parsoid='{\"dsr\":[159,177,1,0]}'> Talk:Parser_test</li>\n<li data-parsoid='{\"dsr\":[178,191,1,0]}'> Parser test</li>\n<li data-parsoid='{\"dsr\":[192,205,1,0]}'> Parser_test</li>\n<li class=\"mw-empty-elt\" data-parsoid='{\"dsr\":[206,207,1,0]}'></li>\n<li class=\"mw-empty-elt\" data-parsoid='{\"dsr\":[208,209,1,0]}'></li>\n<li data-parsoid='{\"dsr\":[210,213,1,0]}'> 0</li>\n<li data-parsoid='{\"dsr\":[214,220,1,0]}'> Talk</li>\n<li data-parsoid='{\"dsr\":[221,227,1,0]}'> Talk</li>\n<li class=\"mw-empty-elt\" data-parsoid='{\"dsr\":[228,229,1,0]}'></li>\n<li class=\"mw-empty-elt\" data-parsoid='{\"dsr\":[230,231,1,0]}'></li>\n<li data-parsoid='{\"dsr\":[232,308,1,0]}'> [/index.php?title=Template:Dynamic&amp;action=edit&amp;redlink=1 Template:Dynamic]</li></ul>\n");
add("html2html", "Double RFC with a wiki link", "<p data-parsoid='{\"dsr\":[0,62,0,0]}'>RFC [/index.php?title=RFC_1234&amp;action=edit&amp;redlink=1 <a href=\"https://tools.ietf.org/html/rfc1234\" rel=\"mw:ExtLink\" class=\"external text\" data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[53,61,0,0]}'>RFC 1234</a>]</p>\n");
add("html2html", "Parents of subpages, one level up", "<p data-parsoid='{\"dsr\":[0,62,0,0]}'>[/index.php?title=Subpage_test/L1/L2&amp;action=edit&amp;redlink=1 L2]</p>\n");
add("html2html", "Parents of subpages, one level up, not named", "<p data-parsoid='{\"dsr\":[0,78,0,0]}'>[/index.php?title=Subpage_test/L1/L2&amp;action=edit&amp;redlink=1 Subpage test/L1/L2]</p>\n");
add("html2html", "Parents of subpages, two levels up", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'>[/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1 L1]2</p>\n\n<p data-parsoid='{\"dsr\":[62,122,0,0]}'>[/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1 L1l]</p>\n");
add("html2html", "Parents of subpages, two levels up, with lots of extra trailing slashes.", "<p data-parsoid='{\"dsr\":[0,72,0,0]}'>[/index.php?title=Subpage_test/L1&amp;action=edit&amp;redlink=1 Subpage test/L1]</p>\n");
add("html2html", "RAW magic word", "<p data-parsoid='{\"dsr\":[0,72,0,0]}'>[/index.php?title=Template:QUERTY&amp;action=edit&amp;redlink=1 Template:QUERTY]</p>\n");
add("html2html", "Out-of-order TOC heading levels", "<div id=\"toc\" class=\"toc\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,551,26,6]}'><div class=\"toctitle\" lang=\"en\" dir=\"ltr\" data-parsoid='{\"stx\":\"html\",\"dsr\":[26,90,42,6]}'>\n<h2 id=\"Contents\" data-parsoid='{\"dsr\":[69,83,2,2]}'> Contents </h2>\n</div>\n\n<ul data-parsoid='{\"dsr\":[92,543,0,0]}'><li data-parsoid='{\"dsr\":[92,316,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#2\"},\"sa\":{\"href\":\"#2\"},\"dsr\":[94,164,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[99,131,24,7]}'>1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[132,162,22,7]}'>2</span></a>\n<ul data-parsoid='{\"dsr\":[165,316,0,0]}'><li data-parsoid='{\"dsr\":[165,240,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#6\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#6\"},\"sa\":{\"href\":\"#6\"},\"dsr\":[168,240,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[173,207,24,7]}'>1.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[208,238,22,7]}'>6</span></a></li>\n<li data-parsoid='{\"dsr\":[241,316,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#3\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#3\"},\"sa\":{\"href\":\"#3\"},\"dsr\":[244,316,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[249,283,24,7]}'>1.2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[284,314,22,7]}'>3</span></a></li></ul></li>\n<li data-parsoid='{\"dsr\":[317,543,1,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#1\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#1\"},\"sa\":{\"href\":\"#1\"},\"dsr\":[319,389,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[324,356,24,7]}'>2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[357,387,22,7]}'>1</span></a>\n<ul data-parsoid='{\"dsr\":[390,543,0,0]}'><li data-parsoid='{\"dsr\":[390,465,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#5\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#5\"},\"sa\":{\"href\":\"#5\"},\"dsr\":[393,465,5,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[398,432,24,7]}'>2.1</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[433,463,22,7]}'>5</span></a></li>\n<li data-parsoid='{\"dsr\":[466,543,2,0]}'> <a rel=\"mw:WikiLink\" href=\"./Main_Page#2_2\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page#2_2\"},\"sa\":{\"href\":\"#2_2\"},\"dsr\":[469,543,7,2]}'><span class=\"tocnumber\" data-parsoid='{\"stx\":\"html\",\"dsr\":[476,510,24,7]}'>2.2</span> <span class=\"toctext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[511,541,22,7]}'>2</span></a></li></ul></li></ul>\n\n</div>\n\n<h2 id=\"2\" data-parsoid='{\"dsr\":[553,560,2,2]}'> 2 </h2>\n\n<h6 id=\"6\" data-parsoid='{\"dsr\":[562,577,6,6]}'> 6 </h6>\n\n<h3 id=\"3\" data-parsoid='{\"dsr\":[579,588,3,3]}'> 3 </h3>\n\n<h1 id=\"1\" data-parsoid='{\"dsr\":[590,595,1,1]}'> 1 </h1>\n\n<h5 id=\"5\" data-parsoid='{\"dsr\":[597,610,5,5]}'> 5 </h5>\n\n<h2 id=\"2_2\" data-parsoid='{\"dsr\":[612,619,2,2]}'> 2 </h2>\n");
add("html2html", "Bad images - basic functionality", "<p data-parsoid='{\"dsr\":[0,16,0,0]}'><figure-inline class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[0,16,null,null]}' data-mw='{\"errors\":[{\"key\":\"apierror-filedoesnotexist\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{\"href\":\"File:Bad.jpg\"}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></figure-inline></p>");
add("html2html", "Bad images - T18039: text after bad image disappears", "<p data-parsoid='{\"dsr\":[0,32,0,0]}'>Foo bar\n<figure-inline class=\"mw-default-size\" typeof=\"mw:Error mw:Image\" data-parsoid='{\"optList\":[],\"dsr\":[8,24,null,null]}' data-mw='{\"errors\":[{\"key\":\"apierror-filedoesnotexist\",\"message\":\"This image does not exist.\"}]}'><a href=\"./File:Bad.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Bad.jpg\"},\"sa\":{\"href\":\"File:Bad.jpg\"}}'><img resource=\"./File:Bad.jpg\" src=\"./Special:FilePath/Bad.jpg\" height=\"220\" width=\"220\" data-parsoid='{\"a\":{\"resource\":\"./File:Bad.jpg\",\"height\":\"220\",\"width\":\"220\"},\"sa\":{\"resource\":\"File:Bad.jpg\"}}'/></a></figure-inline>\nBar foo</p>");
add("html2html", "T33098 Template which includes system messages which includes the template", "<p data-parsoid='{\"dsr\":[0,195,0,0]}'><span class=\"error\" data-parsoid='{\"stx\":\"html\",\"dsr\":[0,97,20,7]}'>Template loop detected: <a rel=\"mw:WikiLink\" href=\"./Wiki/Template:Identical\" title=\"Wiki/Template:Identical\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Template:Identical\"},\"sa\":{\"href\":\"wiki/Template:Identical\"},\"dsr\":[44,90,26,2]}'>Template:Identical</a></span>\n<span class=\"error\" data-parsoid='{\"stx\":\"html\",\"dsr\":[98,195,20,7]}'>Template loop detected: <a rel=\"mw:WikiLink\" href=\"./Wiki/Template:Identical\" title=\"Wiki/Template:Identical\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Template:Identical\"},\"sa\":{\"href\":\"wiki/Template:Identical\"},\"dsr\":[142,188,26,2]}'>Template:Identical</a></span></p>\n");
add("html2html", "T33490 Turkish: ucfırst (with a dotless i)", "<p data-parsoid='{\"dsr\":[0,90,0,0]}'>[/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1 Şablon:Ucfırst:blah]</p>\n");
add("html2html", "T33490 ucfırst (with a dotless i) with English language", "<p data-parsoid='{\"dsr\":[0,89,0,0]}'>[/index.php?title=Template:Ucf%C4%B1rst:blah&amp;action=edit&amp;redlink=1 Template:Ucfırst:blah]</p>\n");
add("html2html", "nowiki inside link inside heading (T20295)", "<h2 id=\"xyz\" data-parsoid='{\"dsr\":[0,22,2,2]}'> <a rel=\"mw:WikiLink\" href=\"./Wiki/Foo\" title=\"Wiki/Foo\" data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Foo\"},\"sa\":{\"href\":\"wiki/Foo\"},\"dsr\":[3,19,11,2]}'>xyz</a> </h2>\n");
add("html2html", "new support for bdi element (T33817)", "<p data-parsoid='{\"dsr\":[0,122,0,0]}'>ולדימיר לנין (ברוסית: <bdi lang=\"ru\" data-parsoid='{\"stx\":\"html\",\"dsr\":[22,57,15,6]}'>Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>\n");
add("html2html", "Empty LI and TR nodes should not be stripped from top-level content", "<ul data-parsoid='{\"dsr\":[0,9,0,0]}'><li data-parsoid='{\"dsr\":[0,3,1,0]}'> a</li>\n<li class=\"mw-empty-elt\" data-parsoid='{\"dsr\":[4,5,1,0]}'></li>\n<li data-parsoid='{\"dsr\":[6,9,1,0]}'> b</li></ul>\n\n<table data-parsoid='{\"dsr\":[11,24,2,2]}'>\n<tbody data-parsoid='{\"dsr\":[14,22,0,0]}'><tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[14,21,2,0]}'>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[17,21,1,0]}'>foo</td></tr>\n</tbody></table>");
add("html2html", "Empty TR followed by a template-generated TR", "<table data-parsoid='{\"dsr\":[0,36,2,2]}'>\n<tbody about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[3,34,0,0],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;tr>&lt;td>foo&lt;/td>&lt;/tr>\"}},\"i\":0}},\"\\n\"]}'><tr><td>foo</td></tr>\n</tbody></table>");
add("html2html", "Empty TR followed by mixed-ws-comment line should RT correctly", "<table data-parsoid='{\"dsr\":[0,36,2,2]}'>\n\n <!--c--><tbody data-parsoid='{\"dsr\":[13,34,0,0]}'><tr data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[13,25,2,0]}'>\n<!--c--> </tr><!--d-->\n</tbody></table>\n");
add("html2html", "T73074: More fostering fun", "<link rel=\"mw:PageProp/Category\" href=\"./Category:Two\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"dsr\":[0,16,null,null]}'/>\n<link rel=\"mw:PageProp/Category\" href=\"./Category:Two\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"fostered\":true,\"dsr\":[17,17]}'/><table data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[17,70,7,0]}'><tbody data-parsoid='{\"dsr\":[24,70,0,0]}'><tr data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[24,33,0,0]}'><td data-parsoid='{\"stx\":\"html\",\"dsr\":[24,33,4,5]}'></td></tr><tr about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[33,70,null,0],\"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>");
add("html2html", "Image: upright option (parsoid)", "<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[0,33,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[2,null,null,null]}'><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,31,null,null]}'>caption</figcaption></figure>\n<figure class=\"mw-default-size\" typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[34,67,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[36,null,null,null]}'><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,65,null,null]}'>caption</figcaption></figure>\n<figure typeof=\"mw:Image/Thumb\" data-parsoid='{\"optList\":[{\"ck\":\"thumbnail\",\"ak\":\"thumb\"},{\"ck\":\"width\",\"ak\":\"500x500px\"},{\"ck\":\"caption\",\"ak\":\"caption\"}],\"dsr\":[68,111,2,2]}'><a href=\"./File:Foobar.jpg\" data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"},\"dsr\":[70,null,null,null]}'><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\" data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"57\",\"width\":\"500\"},\"sa\":{\"resource\":\"File:Foobar.jpg\"}}'/></a><figcaption data-parsoid='{\"dsr\":[null,109,null,null]}'>caption</figcaption></figure>\n");
add("html2html", "Consecutive <pre>s should not get merged", "<pre data-parsoid='{\"dsr\":[0,2,1,0]}'>a</pre>\n\n<pre data-parsoid='{\"dsr\":[4,6,1,0]}'>b</pre>\n\n<pre data-parsoid='{\"dsr\":[8,10,1,0]}'>c</pre>\n\n<pre data-parsoid='{\"dsr\":[12,14,1,0]}'>d</pre>\n\n<pre data-parsoid='{\"dsr\":[16,19,1,0]}'>e</pre>\n\n\n <p data-parsoid='{\"dsr\":[23,23,0,0]}'><br data-parsoid='{\"dsr\":[23,23,0,0]}'/></p>\n<pre data-parsoid='{\"dsr\":[24,26,1,0]}'>f</pre>\n");
add("html2html", "HTML5 ids: fallback to legacy", "<h2 id=\"Foo_bar\" data-parsoid='{\"dsr\":[0,13,2,2]}'> Foo bar </h2>\n\n<h2 id=\"foo_Bar_2\" data-parsoid='{\"dsr\":[15,28,2,2]}'> foo Bar </h2>\n\n<h2 id=\"Тест\" data-parsoid='{\"dsr\":[30,40,2,2]}'><span id=\".D0.A2.D0.B5.D1.81.D1.82\" typeof=\"mw:FallbackId\" data-parsoid=\"{}\"></span> Тест </h2>\n\n<h2 id=\"Тест_2\" data-parsoid='{\"dsr\":[42,52,2,2]}'><span id=\".D0.A2.D0.B5.D1.81.D1.82_2\" typeof=\"mw:FallbackId\" data-parsoid=\"{}\"></span> Тест </h2>\n\n<h2 id=\"тест\" data-parsoid='{\"dsr\":[54,64,2,2]}'><span id=\".D1.82.D0.B5.D1.81.D1.82\" typeof=\"mw:FallbackId\" data-parsoid=\"{}\"></span> тест </h2>\n\n<h2 id=\"Hey_&lt;_#_&quot;_>_%_:_'\" data-parsoid='{\"dsr\":[66,89,2,2]}'><span id=\"Hey_.3C_.23_.22_.3E_.25_:_.27\" typeof=\"mw:FallbackId\" data-parsoid=\"{}\"></span> Hey &lt; # \" > %<span typeof=\"mw:DisplaySpace mw:Placeholder\" data-parsoid='{\"src\":\" \",\"isDisplayHack\":true,\"dsr\":[82,83,null,0]}'> </span>: ' </h2>\n<p data-parsoid='{\"dsr\":[90,158,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page#Foo_bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#Foo_bar\"},\"sa\":{\"href\":\"#Foo bar\"},\"dsr\":[90,102,2,2]}'>#Foo bar</a> <a rel=\"mw:WikiLink\" href=\"./Main_Page#foo_Bar\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#foo_Bar\"},\"sa\":{\"href\":\"#foo Bar\"},\"dsr\":[103,115,2,2]}'>#foo Bar</a> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Тест\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#Тест\"},\"sa\":{\"href\":\"#Тест\"},\"dsr\":[116,125,2,2]}'>#Тест</a> <a rel=\"mw:WikiLink\" href=\"./Main_Page#тест\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#тест\"},\"sa\":{\"href\":\"#тест\"},\"dsr\":[126,135,2,2]}'>#тест</a> <a rel=\"mw:WikiLink\" href=\"./Main_Page#Hey_&lt;_#_&quot;_>_%_:_'\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#Hey_&lt;_#_\\\"_>_%_:_&apos;\"},\"sa\":{\"href\":\"#Hey &lt; # \\\" > % : &apos;\"},\"dsr\":[136,158,2,2]}'>#Hey &lt; # \" > % : '</a></p>\n\n<p data-parsoid='{\"dsr\":[160,218,0,0]}'><span about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[160,179,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span> <span id=\"💩\" about=\"#mwt3\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"id\":\"💩\"},\"sa\":{\"id\":\"{{anchorencode:💩}}\"},\"dsr\":[180,218,31,7]}' data-mw='{\"attribs\":[[{\"txt\":\"id\"},{\"html\":\"&lt;span about=\\\"#mwt2\\\" typeof=\\\"mw:Transclusion\\\" data-parsoid=&apos;{\\\"pi\\\":[[]],\\\"dsr\\\":[190,209,null,null]}&apos; data-mw=&apos;{\\\"parts\\\":[{\\\"template\\\":{\\\"target\\\":{\\\"wt\\\":\\\"anchorencode:💩\\\",\\\"function\\\":\\\"anchorencode\\\"},\\\"params\\\":{},\\\"i\\\":0}}]}&apos;>💩&lt;/span>\"}]]}'></span></p>\n\n<!-- These two links should produce identical HTML -->\n<p data-parsoid='{\"dsr\":[275,306,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page#啤酒\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#啤酒\"},\"sa\":{\"href\":\"#啤酒\"},\"dsr\":[275,282,2,2]}'>#啤酒</a> <a rel=\"mw:WikiLink\" href=\"./Main_Page#啤酒\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page#啤酒\"},\"sa\":{\"href\":\"#%E5%95%A4%E9%85%92\"},\"dsr\":[283,306,2,2]}'>#啤酒</a></p>");
// Blacklist for html2wt
add("html2wt", "Paragraphs with newline spacing with comment lines in between", "----\na\nb\n\n----\na\nb\n\n----\na\nb\n\n----\na\n\nb\n\n----\na\n\nb\n\n----\na\n\n\nb\n\n----\na\n\n\nb\n\n----\n");
add("html2wt", "Paragraphs with newline spacing with non-empty white-space lines in between", "----\na\n\nb\n\n----\na\n\n \nb\n\n----\n");
add("html2wt", "Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between", "----\na\nb\n\n----\na\nb\n\n----\na\n\nb\n\n----\na\n\n \nb\n\n----\n");
add("html2wt", "Extra newlines: More paragraphs with indented comment", "a\n\n\nb\n");
add("html2wt", "Extra newlines followed by heading", "a\n\n\n\n= b =\n[/index.php?title=A&action=edit&redlink=1 a]\n\n\n\n= b =\n");
add("html2wt", "Extra newlines between heading and content are swallowed", "= b =\n[/index.php?title=A&action=edit&redlink=1 a]\n");
add("html2wt", "Parsing an URL", "http://fr.wikipedia.org/wiki/🍺\n");
add("html2wt", "Simple list", "* Item 1\n* Item 2\n");
add("html2wt", "Italics and bold", "* plain\n* plain''italic''plain\n* plain''italic''plain''italic''plain\n* plain'''bold'''plain\n* plain'''bold'''plain'''bold'''plain\n* plain''italic''plain'''bold'''plain\n* plain'''bold'''plain''italic''plain\n* plain''italic'''bold-italic'''italic''plain\n* plain'''bold''bold-italic''bold'''plain\n* plain'''''bold-italic'''italic''plain\n* plain'''''bold-italic''bold'''plain\n* plain''italic'''bold-italic'''''plain\n* plain'''bold''bold-italic'''''plain\n* plain l'''italic''plain\n* plain l''''bold''' plain\n");
add("html2wt", "Italics and possessives (1)", "obtained by ''[/index.php?title=Lunar_Prospector&action=edit&redlink=1 Lunar Prospector]'''s gamma-ray spectrometer\n");
add("html2wt", "Italics and possessives (3)", "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'[/index.php?title=Accademia_della_Crusca&action=edit&redlink=1 Accademia della Crusca]'', for Italian, was published. In 1690 in Rotterdam was published, posthumously, the ''Dictionnaire Universel''.\n");
add("html2wt", "<wbr> is valid wikitext (T54468)", "<wbr />\n");
add("html2wt", "Ruby markup (W3C-style)", "; Mono-ruby for individual base characters\n: <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>\n; Group ruby\n: <ruby>今日<rt>きょう</rt></ruby>\n; Jukugo ruby\n: <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>\n; Inline ruby\n: <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>\n; Double-sided ruby\n: <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>\n\n<ruby>\n<rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang=\"fr\"><rt>Cœur</rt></rtc>\n<rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang=\"fr\"><rt>Trèfle</rt></rtc>\n<rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang=\"fr\"><rt>Étoile</rt></rtc>\n</ruby>\n");
add("html2wt", "Non-word characters don't terminate tag names (T19663, T42670, T54022)", "<blockquote|>a<nowiki></blockquote></nowiki>\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>\n");
add("html2wt", "Non-word characters don't terminate tag names", "<blockquote|>a\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>\n");
add("html2wt", "Bare pipe character from a template (T54363)", "|\n");
add("html2wt", "T71950: 2. Put nowiki as close to cause as possible, after ' :'", "This text : L<nowiki>''</nowiki>[[Foo]]\n");
add("html2wt", "Comments and Indent-Pre", " asdf\n\n asdf\n\n asdf\n\nxyz\n\n asdf\n xyz\n");
add("html2wt", "Comment test 2a", "asdf\njkl\n");
add("html2wt", "Comment test 2b", "asdf\n\njkl\n");
add("html2wt", "Comment test 3", "asdf\njkl\n");
add("html2wt", "Comment test 4", "asdfjkl\n");
add("html2wt", "Comment spacing", "a\n\n b \n\nc\n");
add("html2wt", "Comment whitespace", "");
add("html2wt", "Comment in template title", "FOO\n");
add("html2wt", "Comment on its own line post-expand", "a\n\nb\n");
add("html2wt", "Comment on its own line post-expand with non-significant whitespace", "a\n\nb\n");
add("html2wt", "Block tag on one line (<div>)", "a <div>foo</div>\nb\n");
add("html2wt", "Block tag on one line (<blockquote>)", "a <blockquote>\nfoo\n</blockquote>\nb\n");
add("html2wt", "Block tag on both lines (<div>)", "a <div>foo</div>\nb <div>foo</div>");
add("html2wt", "Block tag on both lines (<blockquote>)", "a <blockquote>\nfoo\n</blockquote>\nb <blockquote>\nfoo\n</blockquote>");
add("html2wt", "Multiple lines without block tags", "<div>foo</div> a\n\nb\nc\nd e\n\nx <div>foo</div> z\n");
add("html2wt", "Preformatted text", " This is some\n Preformatted text\n With ''italic''\n And '''bold'''\n And a [[wiki/Main Page|link]]\n");
add("html2wt", "<pre> with <nowiki> inside (compatibility with 1.6 and earlier)", " <nowiki><b></nowiki>\n <nowiki><cite></nowiki>\n <nowiki><em></nowiki>\n");
add("html2wt", "Regression with preformatted in <center>", "<center>\n Blah\n\n</center>\n");
add("html2wt", "T54763: Preformatted in <blockquote>", "<blockquote>\n Blah\n\n{|\n|\n indented cell (no pre-wrapping!)\n|}\n</blockquote>\n");
add("html2wt", "T53086: Double newlines in blockquotes should be turned into paragraphs", "<blockquote>\nFoo\n\nBar\n\n</blockquote>\n");
add("html2wt", "T17491: <ins>/<del> in blockquote", "<blockquote>\nFoo <del>bar</del> <ins>baz</ins> quux\n\n</blockquote>\n");
add("html2wt", "T17491: <ins>/<del> in blockquote (2)", "<blockquote>\nFoo \n<del>bar</del> <ins>baz</ins>\n\n quux\n</blockquote>");
add("html2wt", "<pre> with attributes (T5202)", " Bluescreen of WikiDeath\n");
add("html2wt", "<pre> with width attribute (T5202)", " Narrow screen goodies\n");
add("html2wt", "<pre> with forbidden attribute (T5202)", " Narrow screen goodies\n");
add("html2wt", "Entities inside <pre>", " <\n");
add("html2wt", "<pre> with forbidden attribute values (T5202)", " Narrow screen goodies\n");
add("html2wt", "<nowiki> inside <pre> (T15238)", " &lt;nowiki&gt;\n\n \n\n &lt;nowiki&gt;Foo&lt;/nowiki&gt;\n");
add("html2wt", "HTML pre followed by indent-pre", " foo\n\n bar\n");
add("html2wt", "Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>", "");
add("html2wt", "Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>", "foo\n");
add("html2wt", "Templates: Indent-Pre: 1c: Wrapping should be based on expanded content", " a\n\nb\n");
add("html2wt", "Templates: Indent-Pre: 1d: Wrapping should be based on expanded content", " a\n\nb\nc\n\n d\n\ne\n");
add("html2wt", "Templates: Indent-Pre: 1e. Wrapping should be based on expanded content", " foo\n\n foo bar\n\n foo\n bar\n\n foo\n\n foo\n\n bar\n");
add("html2wt", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content", " a\n\n\n\n a\n\n\n\n b\n\na\n\n b\n\na\n\n b\n");
add("html2wt", "Templates: Strip leading and trailing whitespace from named-param values", "a\n\nb\n\nc\n\n* d\n");
add("html2wt", "Templates: Don't strip whitespace from positional-param values", "a \n\nb \n\n c \n\n\n\n d\n\n\n\n e\n\n\n\n* f\n\n\n\n g\n");
add("html2wt", "Templates: Handle comments in the target", "{{echo\n<!-- should be ignored -->|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{echo|foo}}");
add("html2wt", "Templates: Handle comments in parameter names (T69657)", "{{echo|1\n<!-- should be ignored -->=foo}}\n\n{{echo|<!-- should be ignored -->\n1=foo}}\n\n{{echo|1<!-- should be ignored -->=foo}}\n\n{{echo|<!-- should be ignored -->1=foo}}");
add("html2wt", "1a. Indent-Pre and Comments", " a\n\nc\n");
add("html2wt", "1b. Indent-Pre and Comments", " a\n\nc\n");
add("html2wt", "1c. Indent-Pre and Comments", " a\n\n a\n");
add("html2wt", "1d. Indent-Pre and Comments\n(Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)", " a\n\n b\n");
add("html2wt", "2a. Indent-Pre and tables", "{|\n!h1\n!h2\n|foo\n|bar\n|}\n");
add("html2wt", "2b. Indent-Pre and tables", "{|\n|foo\n|}\n");
add("html2wt", "2c. Indent-Pre and tables (T44252)", "{|\n|+foo\n!bar\n|}\n");
add("html2wt", "2d. Indent-Pre and tables", " a\n {|\n | b\n |}");
add("html2wt", "2g. Indented table markup mixed with indented pre content (proposed in T8200)", " {| \n |\n Text that should be rendered preformatted \n |}\n");
add("html2wt", "3c. Indent-Pre and block tags (pre-content on separate line)", "\n<nowiki> </nowiki>foo\n\n<div>\n foo\n\n</div>\n<center>\n foo\n\n</center>\n<blockquote>\n foo\n\n</blockquote>\n<blockquote>\n foo\n\n</blockquote>\n{|\n|\n foo\n|}\n\n* foo\n");
add("html2wt", "4. Indent-Pre and extension tags", "<nowiki> </nowiki>a <tag />");
add("html2wt", "Render paragraphs when indent-pre is suppressed in blocklevels", "<blockquote>\n foo\n\n bar\n\n</blockquote>\n");
add("html2wt", "4. Multiple spaces at start-of-line", "<nowiki> </nowiki> foo \n foo\n\n{|\n|foo\n|}\n");
add("html2wt", "5a. White-space in indent-pre", " a<br />\n \n \n b\n");
add("html2wt", "6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content", " a\n \n b\n\n c\n \n\nd\n");
add("html2wt", "HTML-pre: 2: indented text", " foo\n");
add("html2wt", "Simple definition", "; name \n: Definition\n");
add("html2wt", "Definition list for indentation only", ": Indented text\n");
add("html2wt", "Definition list with no space", "; name\n: Definition\n");
add("html2wt", "Definition list with URL link", "; http://example.com/ \n: definition\n");
add("html2wt", "Definition list with bracketed URL link", "; [http://www.example.com/ Example]\n: Something about it\n");
add("html2wt", "Definition list with wikilink containing colon", "; [/index.php?title=Help:FAQ&action=edit&redlink=1 Help:FAQ]\n: The least-read page on Wikipedia\n");
add("html2wt", "Definition list with news link containing colon", "; news:alt.wikipedia.rox<nowiki/>:This isn't even a real newsgroup!");
add("html2wt", "Malformed definition list with colon", "; news:alt.wikipedia.rox -- don't crash or enter an infinite loop\n");
add("html2wt", "Definition lists: colon in external link text", "; [http://www.wikipedia2.org/ Wikipedia :The Next Generation] \n: OK, I made that up\n");
add("html2wt", "Definition lists: colon in HTML attribute", "; '''bold'''\n");
add("html2wt", "Definition lists: self-closed tag", "; one<br />two \n: two-line fun\n");
add("html2wt", "Definition lists: ignore colons inside tags", "; one '''two : tag ''fun:'':'''\n: def\n");
add("html2wt", "Definition lists: excess closed tags", "\n; onetwo\n: bad tag fun\n");
add("html2wt", "T13748: Literal closing tags", "\n; test 1\n: test test test test test\n; test 2\n: test test test test test\n");
add("html2wt", "Definition and unordered list using wiki syntax nested in unordered list using html tags.", "\n*; term \n*: description\n** unordered\n");
add("html2wt", "Definition list with empty definition and following paragraph", "; term\n:\n\nParagraph text\n");
add("html2wt", "Nested definition lists using html syntax", "; x\n: a\n: b\n");
add("html2wt", "Definition Lists: No nesting: Multiple dd's", "; x\n: a\n: b\n");
add("html2wt", "Definition Lists: Indentation: Regular", ": i1\n:: i2\n::: i3\n");
add("html2wt", "Definition Lists: Indentation: Missing 1st level", ":: i2\n::: i3\n");
add("html2wt", "Definition Lists: Indentation: Multi-level indent", "::: i3\n");
add("html2wt", "Definition Lists: Hacky use to indent tables", ":: {|\n|foo\n|bar\n|}\n\nthis text\nshould be left alone\n");
add("html2wt", "Definition Lists: Hacky use to indent tables (with content following table)", ": {|\n|foo\n|bar\n|} <!--c1--> this text should be part of the dl");
add("html2wt", "Definition Lists: Hacky use to indent tables, with comments (T65979)", "<!-- foo -->\n:: {|\n|foo\n|bar\n|}<!-- bar -->\n\nthis text\nshould be left alone");
add("html2wt", "Definition Lists: Hacky use to indent tables, with comment before table", ":: <!-- foo -->{|\n|foo\n|}\n");
add("html2wt", "Table / list interaction: indented table with lists in table contents", ": {|\n|a\n\n* b\n|-\n|c\n\n* d\n|}\n");
add("html2wt", "Table / list interaction: lists nested in tables nested in indented lists", ": {|\n|\n: a\n: b\n|\n* c\n* d\n|}\n\n* e\n* f\n");
add("html2wt", "Definition Lists: Nesting: Multi-level (Parsoid only)", "\n; t1 \n: d1 \n;; t2 \n;: :d2 \n;;; t3 \n;;: ::d3 \n");
add("html2wt", "Definition Lists: Nesting: Test 2", "; t1\n:: d2\n");
add("html2wt", "Definition Lists: Nesting: Test 3", ":; t1\n:::: d2\n");
add("html2wt", "Definition Lists: Nesting: Test 4", "::; t3\n::: d3\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 1", "\n:;* foo\n::* bar\n:; baz\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 2", "*: d1\n*: d2\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 3", "*::: d1\n*::: d2\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 4", "*; d1 \n*: d2\n*; d3 \n*: d4\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 5", "*: d1\n*:: d2\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 6", "#*: d1\n#*::: d3\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 7", ":* d1\n:* d2\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 8", ":* d1\n::* d2\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 9", "*; foo \n*: bar\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 10", "*#; foo \n*#: bar\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 11", "; a\n:* b\n");
add("html2wt", "Definition Lists: Mixed Lists: Test 12", "\n*#*#;*;; foo :bar\n*#*#; boo :baz\n");
add("html2wt", "Definition Lists: Weird Ones: Test 1", "\n*#;*::;; foo :bar (who uses this?)\n");
add("html2wt", "Definition Lists: colons occurring in tags", "; a:b\n; '''a:b'''\n; <i>a:b</i>\n; <span>a:b</span>\n; <div>a:b</div>\n; <div>a\n: b\n; {{echo|a:b}}\n; {{echo|''a:b''}}\n;;; ''a:b''\n");
add("html2wt", "Definition Lists: colons and tables 1", ": {|\n|x\n|}\n: {|\n|y\n|}\n");
add("html2wt", "External links: Free with trailing punctuation", "http://example.com,\nhttp://example.com;\nhttp://example.com\\\nhttp://example.com.\nhttp://example.com:\nhttp://example.com!\nhttp://example.com?\nhttp://example.com)\nhttp://example.com/url_with_(brackets)\n(http://example.com/url_without_brackets)\nhttp://example.com/url_with_entity&\nhttp://example.com/url_with_entity&\nhttp://example.com/url_with_entity&\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&#xA0;\nhttp://example.com/url_with_entity&#160;\nhttp://example.com/url_with_entity&lt;\nhttp://example.com/url_with_entity&#x3C;\nhttp://example.com/url_with_entity&#60;");
add("html2wt", "External links: raw ampersand", "Old & use: http://x&y\n");
add("html2wt", "External links: encoded ampersand", "Old &#x26; use: http://x&y");
add("html2wt", "External links: encoded equals (T8102)", "http://example.com/?foo=bar");
add("html2wt", "External links: [raw ampersand]", "Old &#x26; use: [http://x&y]");
add("html2wt", "T2289: \">\"-token in bracketed URL", "[http://www.example.com/ <hello> stuff]\n");
add("html2wt", "T2289: literal \">\"-token in bracketed URL", "[http://www.example.com/ '''html''' stuff]\n");
add("html2wt", "T2289: literal double quote in bracketed URL", "[http://www.example.com/ \"hello\" stuff]\n");
add("html2wt", "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)", "[http://www.example.com test]\n");
add("html2wt", "Bracketed external links with template-generated invalid target", "[http:/example.com title]\n");
add("html2wt", "T4702: Mismatched <i>, <b> and <a> tags are invalid", "[http://example.com ''text'']\n[http://example.com '''text''']\n''Something ''[http://example.com ''in italic'']\n''Something ''[http://example.com ''mixed''''', even bold''']\n'''''Now '''''[http://example.com '''''both''''']\n");
add("html2wt", "External link containing double-single-quotes in text embedded in italics (T6598 sanity check)", "''Some ''[http://example.com/ ''pretty ''italics'' and stuff'']''!''\n");
add("html2wt", "External link containing double-single-quotes with no space separating the url from text in italics", "[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]]<span>.</span>");
add("html2wt", "URL-encoding in URL functions (single parameter)", "/index.php?title=Some_page&amp=&\n");
add("html2wt", "URL-encoding in URL functions (multiple parameters)", "/index.php?title=Some_page&q=?&amp=&\n");
add("html2wt", "IPv6 urls, autolink format (T23261)", "http://[2404:130:0:1000::187:2]/index.php\n\nExamples from RFC 2373, section 2.2:\n\n* http://[1080::8:800:200C:417A]/unicast\n* http://[FF01::101]/multicast\n* http://[::1]/loopback\n* http://[::]/unspecified\n* http://[::13.1.68.3]/ipv4compat\n* http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section 2:\n\n* http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n* http://[1080:0:0:0:8:800:200C:417A]/index.html\n* http://[3ffe:2a00:100:7031::1]\n* http://[1080::8:800:200C:417A]/foo\n* http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n* http://[2010:836B:4179::836B:4179]");
add("html2wt", "IPv6 urls, bracketed format (T23261)", "[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples from RFC 2373, section 2.2:\n\n* [http://[1080::8:800:200C:417A] unicast]\n* [http://[FF01::101] multicast]\n* [http://[::1]/ loopback]\n* [http://[::] unspecified]\n* [http://[::13.1.68.3] ipv4compat]\n* [http://[::FFFF:129.144.52.38] ipv4compat]\n\nExamples from RFC 2732, section 2:\n\n* [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n* [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* [http://[3ffe:2a00:100:7031::1] 3]\n* [http://[1080::8:800:200C:417A]/foo 4]\n* [http://[::192.9.5.5]/ipng 5]\n* [http://[::FFFF:129.144.52.38]:80/index.html 6]\n* [http://[2010:836B:4179::836B:4179] 7]");
add("html2wt", "Unclosed and unmatched quotes", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n'''Bold text..'''\n\n..spanning two paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left open'''\n\n''Italic tag left open''\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n'''This year'<nowiki/>'''s election ''should'' beat '''last year''''s.\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\nPlain ''italic'''s plain\n");
add("html2wt", "A table with caption with default-spaced attributes and a table row", "{|\n|+ style=\"color: red;\" |caption1\n|foo\n|}\n");
add("html2wt", "A table with captions with non-default spaced attributes and a table row", "{|\n|+ style=\"color: red;\" |caption2\n|+ style=\"color: red;\" |caption3\n|foo\n|}\n");
add("html2wt", "Table td-cell syntax variations", "{|\n|baz\n|foo bar foo\n|baz\n| style=\"color:red;\" |baz\n|style='color:red;'\n|baz\n|}\n");
add("html2wt", "Simple table", "{|\n|1\n|2\n|-\n|3\n|4\n|}\n");
add("html2wt", "Simple table but with multiple dashes for row wikitext", "{|\n|foo\n|-\n|bar\n|}\n");
add("html2wt", "Multiplication table", "{| border=\"1\" cellpadding=\"2\"\n|+Multiplication table\n!×\n!1\n!2\n!3\n|-\n!1\n|1\n|2\n|3\n|-\n!2\n|2\n|4\n|6\n|-\n!3\n|3\n|6\n|9\n|-\n!4\n|4\n|8\n|12\n|-\n!5\n|5\n|10\n|15\n|}\n");
add("html2wt", "Accept \"||\" in table headings", "{|\n!h1\n!h2\n|}\n");
add("html2wt", "Accept \"!!\" in table data", "{|\n| Foo!! ||\n|}");
add("html2wt", "Accept \"||\" in indented table headings", ": {|\n!h1\n!h2\n|}\n");
add("html2wt", "Accept empty attributes in td/th cells (td/th cells starting with leading ||)", "{|\n!h1\n|a\n|}\n");
add("html2wt", "Accept \"| !\" at start of line in tables (ignore !-attribute)", "{|\n|bar\n|}\n");
add("html2wt", "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 +/- ", "{|\n| style=\"color:red;\" |+1\n| style=\"color:blue;\" |-1\n|-\n|1\n|2\n|3\n|1\n|<nowiki>+2</nowiki>\n|<nowiki>-3</nowiki>\n|-\n|<nowiki>+1</nowiki>\n|<nowiki>-1</nowiki>\n|}\n");
add("html2wt", "Table rowspan", "{| border=\"1\"\n|Cell 1, row 1\n| rowspan=\"2\" |Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}\n");
add("html2wt", "Nested table", "{| border=\"1\"\n|α\n|\n{| bgcolor=\"#ABCDEF\" border=\"2\"\n|nested\n|-\n|table\n|}\n|the original table again\n|}\n");
add("html2wt", "Invalid attributes in table cell (T3830)", "{|\n|broken\n|}\n");
add("html2wt", "1. Template-generated table cell attributes and cell content", "{|\n| style=\"color:red;\" |Foo\n| style=\"color:red;\" |Foo\n|style=\"color:red;\"\n|Bar\n| style=\"color:red;\" |Foo\n| align=\"center\" style=\"color:red;\" |Foo\n| align=\"center\" style=\"color:red;\" |Foo\n|}\n");
add("html2wt", "Wikitext table with a lot of comments", "{|\n|foo\n|-\n|\n|}\n");
add("html2wt", "Table cell with a single comment", "{|\n|\n|a\n|}\n");
add("html2wt", "Build table with {{!}}", "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data\n| style=\"color:red;\" |second data\n|}\n");
add("html2wt", "Build table with pipe as data", "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data\n| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |<nowiki>data with |</nowiki>\n| style=\"color:red;\" |<nowiki>second data with |</nowiki>\n|-\n|<nowiki>data with |</nowiki>\n|<nowiki>second data with |</nowiki>\n|}\n");
add("html2wt", "Build table with wikilink", "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data [[wiki/Main Page|linktext]]\n|second data [[wiki/Main Page|linktext]]\n|-\n|data\n|second data [[wiki/Main Page|link|text with pipe]]\n|}\n");
add("html2wt", "Wikitext table with html-syntax row", "{|\n|foo\n|}");
add("html2wt", "Wikitext lists can be nested inside HTML lists", "<ul>\n<li>a\n* b\n</li>\n</ul>\n\n<ul>\n<li>x\n** y\n</li>\n</ul>");
add("html2wt", "Plain link, capitalized", "[[wiki/Main Page|Main Page]]\n");
add("html2wt", "Plain link, uncapitalized", "[[wiki/Main Page|main Page]]\n");
add("html2wt", "Piped link", "[[wiki/Main Page|The Main Page]]\n");
add("html2wt", "Piped link with comment in link text", "[[wiki/Main Page|The Main Page]]\n");
add("html2wt", "Piped link with multiple pipe characters in link text", "[[Main Page|<nowiki>|The|Main|Page|</nowiki>]]");
add("html2wt", "Broken link", "[/index.php?title=Zigzagzogzagzig&action=edit&redlink=1 Zigzagzogzagzig]\n");
add("html2wt", "Broken link with fragment", "[/index.php?title=Zigzagzogzagzig&action=edit&redlink=1 Zigzagzogzagzig#zug]\n");
add("html2wt", "Special page link with fragment", "[[wiki/Special:Version#anchor|Special:Version#anchor]]\n");
add("html2wt", "Nonexistent special page link with fragment", "[[wiki/Special:ThisNameWillHopefullyNeverBeUsed|Special:ThisNameWillHopefullyNeverBeUsed#anchor]]\n");
add("html2wt", "Link with prefix", "xxx[[wiki/Main Page|main Page]], xxx[[wiki/Main Page|Main Page]], Xxx[[wiki/Main Page|main Page]] XXX[[wiki/Main Page|main Page]], XXX[[wiki/Main Page|Main Page]]\n");
add("html2wt", "Link with suffix", "[[wiki/Main Page|Main Pagexxx]], [[wiki/Main Page|Main Page]]XXX, [[wiki/Main Page|Main Page]]!!!\n");
add("html2wt", "T45661: Piped links with identical prefixes", "[[wiki/Prefixed article|prefixed articles with spaces]]\n\n[[wiki/Prefixed article|prefixed articlesaoeu]]\n\n[[wiki/Main Page|Main Page test]]\n");
add("html2wt", "Link with 4 brackets", "[[[[wiki/Main Page|Main Page]]]]\n");
add("html2wt", "Link with multiple pipes", "[[wiki/Main Page|The|Main|Page]]\n");
add("html2wt", "Link to namespaces", "[/index.php?title=Talk:Parser_testing&action=edit&redlink=1 Talk:Parser testing], [/index.php?title=Meta:Disclaimers&action=edit&redlink=1 Meta:Disclaimers]\n");
add("html2wt", "Link with space in namespace", "[/index.php?title=User_talk:Foo_bar&action=edit&redlink=1 User talk:Foo bar]\n");
add("html2wt", "Namespace takes precedence over interwiki link (T53680)", "[[wiki/MemoryAlpha:AlphaTest|MemoryAlpha:AlphaTest]]\n");
add("html2wt", "Piped link to namespace", "[/index.php?title=Meta:Disclaimers&action=edit&redlink=1 The disclaimers]\n");
add("html2wt", "Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)", "''Some [/index.php?title=Link&action=edit&redlink=1 pretty ''italics'' and stuff]!''\n");
add("html2wt", "Plain link to page with question mark in title", "[[wiki/A?b|A?b]]\n\n[[wiki/A?b|Baz]]\n");
add("html2wt", "T2337: Escaped self-links should be bold", "[[Bug462]] [[Bug462]]");
add("html2wt", "Self-link to section should not be bold", "[[wiki/Main Page#section|Main Page#section]]\n");
add("html2wt", "Self-link to numeric title", "0\n");
add("html2wt", "Link to numeric-equivalent title", "[[wiki/00|00]]\n");
add("html2wt", "<nowiki> inside a link", "<nowiki>[[Main Page]]</nowiki> [[wiki/Main Page|the main page [it's not very good]]]\n");
add("html2wt", "Non-breaking spaces in title", "[[wiki/Main Page|  Main   Page  ]]\n");
add("html2wt", "Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)", "'''[[wiki/Main Page|Main Page]]'''\n");
add("html2wt", "Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)", "''[[wiki/Main Page|Main Page]]''\n");
add("html2wt", "Internal link with en linktrail: no apostrophes (T29473)", "[/index.php?title=Something&action=edit&redlink=1 Something]'nice\n");
add("html2wt", "Internal link with ca linktrail with apostrophes (T29473)", "[/index.php?title=Something&action=edit&redlink=1 Something'nice]\n");
add("html2wt", "Internal link with kaa linktrail with apostrophes (T29473)", "[/index.php?title=Something&action=edit&redlink=1 Something'nice]\n");
add("html2wt", "Internal link with is link prefix", "Aðrir [[wiki/Söfnuður|mótmælendasöfnuðir]] og\n");
add("html2wt", "Internal link with is link trail and link prefix", "[[wiki/Mótmælendatrú|xxxar]]\n[[wiki/Mótmælendatrú|mótmælendatrúar]]\n[[wiki/Söfnuður|mótmælendasöfnuður]]\n[[wiki/Söfnuður|mótmælendasöfnuðir]]\n[[wiki/Söfnuður|mótmælendasöfnuðirxxx]]\n");
add("html2wt", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved", "[[wiki/Foo| bar]]\n\n[[wiki/Foo| ''bar'']]\n\n[http://wp.org foo]\n\n[http://wp.org ''foo'']\n");
add("html2wt", "Interwiki link with fragment (T4130)", "[[meatball:SoftSecurity#foo|MeatBall:SoftSecurity#foo]]\n");
add("html2wt", "Escaping of interlanguage links (T129218, T156308)", "Blah blah blah\n[[:es:Spanish]]\n[[:zh:Chinese| zh : Chinese ]]");
add("html2wt", "Parsoid-specific test: Wikilinks with &nbsp; should RT properly", "[/index.php?title=WW_II&action=edit&redlink=1 WW II]\n");
add("html2wt", "<br> to <br />", "1\n2\n3\n");
add("html2wt", "Incorrecly removing closing slashes from correctly formed XHTML", "\n");
add("html2wt", "Failing to transform badly formed HTML into correct XHTML", "\n\n\n");
add("html2wt", "Handling html with a div self-closing tag", "<div title=\"\" />\n<div title=\"\" />\n<div title=\"\" />\n<div title=\"bar\" />\n<div title=\"bar\" />\n<div title=\"bar/\">");
add("html2wt", "Handling html with a br self-closing tag", "\n\n\n\n\n\n");
add("html2wt", "Horizontal ruler (should it add that extra space?)", "----\n----\nfoo \n---- bar\n");
add("html2wt", "Horizontal ruler -- eats additional dashes on the same line", "----\n");
add("html2wt", "Common list", "* Common list\n* item 2\n* item 3\n");
add("html2wt", "Numbered list", "# Numbered list\n# item 2\n# item 3\n");
add("html2wt", "Mixed list", "* Mixed list\n*# with numbers\n** and bullets\n*# and numbers\n* bullets again\n** bullet level 2\n*** bullet level 3\n***# Number on level 4\n** bullet level 2\n**# Number on level 3\n**# Number on level 3\n*# number level 2\n* Level 1\n*** Level 3\n\n#** Level 3, but ordered\n");
add("html2wt", "1. Nested mixed wikitext and html list", "* hi\n* <ul><li>ho</li></ul>\n* hi\n** ho\n");
add("html2wt", "2. Nested mixed wikitext and html list (incompatible)", "; hi\n: {{echo|<li>ho</li>}}");
add("html2wt", "Nested lists 1", "* foo\n** bar\n");
add("html2wt", "Nested lists 2", "** foo\n* bar\n");
add("html2wt", "Nested lists 3 (first element empty)", "\n** bar\n");
add("html2wt", "Nested lists 4 (first element empty)", "**\n* bar\n");
add("html2wt", "Nested lists 6 (both elements empty)", "\n**\n");
add("html2wt", "Nested lists 7 (skip initial nesting levels)", "*** foo\n");
add("html2wt", "Nested lists 8 (multiple nesting transitions)", "* foo\n*** bar\n** baz\n* boo\n");
add("html2wt", "1. Lists with start-of-line-transparent tokens before bullets: Comments", "* foo\n* bar\n* baz\n");
add("html2wt", "Nested lists 10 (list and span siblings: wt2wt regression)", "* a <span>x</span>\n** b <span>y</span>\n");
add("html2wt", "2. Lists with start-of-line-transparent tokens before bullets: Template close", "* foo bar\n* baz\n");
add("html2wt", "List items are not parsed correctly following a <pre> block (T2785)", "* <pre>foo</pre>\n* <pre>bar</pre>\n* zar");
add("html2wt", "List items from template", "* item 1\n* item 2\n\n* item 0\n* item 1\n* item 2\n\n* item 0\n* notSOL\n* item 1\n* item 2\n");
add("html2wt", "List interrupted by empty line or heading", "* foo\n\n** bar\n\n== A heading ==\n\n* Another list item\n");
add("html2wt", "Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines", "* a\n* b\n* c\n* d\n");
add("html2wt", "Replacing whitespace with tabs still doesn't break the list (gerrit 78327)", "* a\n* b\n* c\n* d\n");
add("html2wt", "Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines", "# foo\n## bar\n\n* foo\n** bar\n\n: foo\n:: bar\n");
add("html2wt", "Unbalanced closing block tags break a list", "<div>\n* a\n</div>\n<div>\n* b\n</div>");
add("html2wt", "Unbalanced closing non-block tags don't break a list", "<span>\n\n* a<span></span>\n* b\n\n</span>");
add("html2wt", "1. List embedded in a formatting tag", "<small>\n* foo\n</small>");
add("html2wt", "2. List embedded in a formatting tag in a misnested way", "<small></small>\n<small>\n* a\n</small>\n* <small>b</small>\n");
add("html2wt", "Magic Word: {{CURRENTDAY}}", "1\n");
add("html2wt", "Magic Word: {{CURRENTDAY2}}", "01\n");
add("html2wt", "Magic Word: {{CURRENTDAYNAME}}", "Thursday\n");
add("html2wt", "Magic Word: {{CURRENTDOW}}", "4\n");
add("html2wt", "Magic Word: {{CURRENTMONTH}}", "01\n");
add("html2wt", "Magic Word: {{CURRENTMONTH1}}", "1\n");
add("html2wt", "Magic Word: {{CURRENTMONTHABBREV}}", "Jan\n");
add("html2wt", "Magic Word: {{CURRENTMONTHNAME}}", "January\n");
add("html2wt", "Magic Word: {{CURRENTMONTHNAMEGEN}}", "January\n");
add("html2wt", "Magic Word: {{CURRENTTIME}}", "00:02\n");
add("html2wt", "Magic Word: {{CURRENTHOUR}}", "00\n");
add("html2wt", "Magic Word: {{CURRENTWEEK}} (T6594)", "1\n");
add("html2wt", "Magic Word: {{CURRENTYEAR}}", "1970\n");
add("html2wt", "Magic Word: {{CURRENTTIMESTAMP}}", "19700101000203\n");
add("html2wt", "Magic Words LOCAL (UTC)", "* 01\n* 1\n* January\n* January\n* Jan\n* 1\n* 01\n* Thursday\n* 1970\n* 00:02\n* 00\n* 1\n* 4\n* 19700101000203\n");
add("html2wt", "Case-sensitive magic words, when cased differently, should just be template transclusions", "[/index.php?title=Template:CurrentMonth&action=edit&redlink=1 Template:CurrentMonth]\n[/index.php?title=Template:Currentday&action=edit&redlink=1 Template:Currentday]\n[/index.php?title=Template:CURreNTweEK&action=edit&redlink=1 Template:CURreNTweEK]\n[/index.php?title=Template:CurrentHour&action=edit&redlink=1 Template:CurrentHour]\n");
add("html2wt", "Case-insensitive magic words should still work with weird casing.", "example.org\naOEU\nAoeu\nhttp://example.org\n");
add("html2wt", "Namespace 1 {{ns:1}}", "Talk\n");
add("html2wt", "Namespace 1 {{ns:01}}", "Talk\n");
add("html2wt", "Namespace 0 {{ns:0}} (T6783)", "");
add("html2wt", "Namespace 0 {{ns:00}} (T6783)", "");
add("html2wt", "Namespace -1 {{ns:-1}}", "Special\n");
add("html2wt", "Namespace User {{ns:User}}", "User\n");
add("html2wt", "Namespace User talk {{ns:User_talk}}", "User talk\n");
add("html2wt", "Namespace User talk {{ns:uSeR tAlK}}", "User talk\n");
add("html2wt", "Namespace File {{ns:File}}", "File\n");
add("html2wt", "Namespace File {{ns:Image}}", "File\n");
add("html2wt", "Namespace (lang=de) Benutzer {{ns:User}}", "Benutzer\n");
add("html2wt", "Namespace (lang=de) Benutzer Diskussion {{ns:3}}", "Benutzer Diskussion\n");
add("html2wt", "Nonexistent template", "[/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1 Template:Thistemplatedoesnotexist]\n");
add("html2wt", "Template with invalid target containing tags", "<nowiki>{{a</nowiki>'''b'''<nowiki>|foo|a=b|a = b}}</nowiki>\n");
add("html2wt", "Template with invalid target containing unclosed tag", "<nowiki>{{a</nowiki>'''<nowiki>|foo|a=b|a = b}}</nowiki>'''\n");
add("html2wt", "Template with just whitespace in it, T70421", "{{echo|{{ }<nowiki>}</nowiki>}}");
add("html2wt", "Simple template", "This is a test template\n");
add("html2wt", "Template with explicit namespace", "This is a test template\n");
add("html2wt", "Template parameter", "This is a test template with parameter foo\n");
add("html2wt", "Template unnamed parameter", "[[wiki/Main Page|the main page]]\n");
add("html2wt", "Template with template name as unnamed argument", "(test)\n");
add("html2wt", "Template with template name as argument", "(test)\n");
add("html2wt", "Template with template name as argument (2)", "(test)\n");
add("html2wt", "Template with default value", "(test)\n");
add("html2wt", "Template with default value (value set)", "'''templ'''\n");
add("html2wt", "Template with argument in separate line", "(test)\n");
add("html2wt", "Template with complex template as argument", "This is a test template with parameter (test)\n");
add("html2wt", "Templates with templated name", "{{{{echo|echo}}|foo}}\n{{{{echo|inner list}}}}");
add("html2wt", "Templates with invalid templated targets", "{{echo\n{{echo|foo}}}}");
add("html2wt", "Template with complex arguments", "[[wiki/Template:Complextemplate|link]] This is a test template with parameter (test)\n");
add("html2wt", "T2553: link with two variables in a piped link", "{|\n|[[{{{1}}}<nowiki>|</nowiki>{{{2}}}]]\n|}");
add("html2wt", "Abort table cell attribute parsing on wikilink", "{|\n|testing [[one|two]]<nowiki> |three</nowiki>||four\n| testing one two |three||four\n|testing=\"[[one|two]]<nowiki>\" |three</nowiki>||four\n|}");
add("html2wt", "Magic variable as template parameter", "This is a test template with parameter MediaWiki\n");
add("html2wt", "Template parameter as link source", "[[wiki/Main Page|link]]\n");
add("html2wt", "Template passing argument to another template", "including another template, This is a test template with parameter 'hmm'\n");
add("html2wt", "Template as link source", "[[wiki/Main Page|Main Page]]\n\n[[wiki/Main Page|Main Page]]\n\n[[wiki/Main Page|Main Page]]Page\n");
add("html2wt", "Template infinite loop", "<span class=\"error\">Template loop detected: [[wiki/Template:Loop1|Template:Loop1]]</span>\n");
add("html2wt", "Template from main namespace", "blah blah\n");
add("html2wt", "T2529: Template with table, not included at beginning of line", "foo \n\n{|\n|1\n|2\n|-\n|3\n|4\n|}\n");
add("html2wt", "T2523: Template shouldn't eat newline (or add an extra one before table)", "foo\n\n{|\n|1\n|2\n|-\n|3\n|4\n|}\n");
add("html2wt", "T2041: Template parameters shown as broken links", "<nowiki>{{{parameter}}}</nowiki>\n");
add("html2wt", "int keyword", "You have lots of money (not!).\n");
add("html2wt", "int keyword - non-existing message", "⧼var⧽\n");
add("html2wt", "<includeonly> and <noinclude> being included", "Foobar\n");
add("html2wt", "<onlyinclude> being included", "Foo\n");
add("html2wt", "<onlyinclude> and <includeonly> being included", "Foo\n");
add("html2wt", "<includeonly> and <noinclude> on a page", "Foozar\n");
add("html2wt", "Un-closed <noinclude>", "");
add("html2wt", "<onlyinclude> on a page", "Foobar\n");
add("html2wt", "Un-closed <onlyinclude>", "");
add("html2wt", "Self-closed noinclude, includeonly, onlyinclude tags", "\n");
add("html2wt", "Unbalanced includeonly and noinclude tags", "{|\n|a\n|b\n|c</includeonly>\n|d</includeonly></includeonly>\n|}\n");
add("html2wt", "T8563: Edit link generation for section shown by <includeonly>", "== Includeonly section ==\n\n== Section T-1 ==\n");
add("html2wt", "T8563: Section extraction for section shown by <includeonly>", "<nowiki>==Section T-2==</nowiki>");
add("html2wt", "T8563: Edit link generation for section suppressed by <includeonly>", "== Section 1 ==\n");
add("html2wt", "T8563: Section extraction for section suppressed by <includeonly>", "<nowiki>==Section 1==</nowiki>");
add("html2wt", "0. includeonly around the entire attribute", "<span id=\"v2\">bar</span>\n");
add("html2wt", "1. includeonly in html attr key", "<span id=\"foo\">bar</span>\n");
add("html2wt", "2. includeonly in html attr value", "<span id=\"v1\">bar</span>\n<span id=\"v1\">bar</span>\n");
add("html2wt", "3. includeonly in part of an attr value", "<span style=\"color:red;\">bar</span>\n");
add("html2wt", "4. includeonly in table attributes", "{|\n|a\n|}\n");
add("html2wt", "Preprocessor precedence 14: broken language converter in comment", "* <!--{{foo}}-->...should be ok\n* <!---{{foo}}-->...extra dashes\n* {{echo|foo<!-- -{bar} -->bat}}...should be ok\n");
add("html2wt", "Templates: Template Name/Arg clash: 1. Use of positional param", "foo\n");
add("html2wt", "Templates: Template Name/Arg clash: 2. Use of named param", "foo\n");
add("html2wt", "Templates: Template Name/Arg clash: 3. Use of named param with empty input", "quote\n");
add("html2wt", "Templates: 1. Simple use", "Foo\n");
add("html2wt", "Templates: 2. Inside a block tag", "<div>Foo</div>\n<blockquote>\nFoo\n</blockquote>");
add("html2wt", "Templates: P-wrapping: 1a. Templates on consecutive lines", "Foo\nbar\n");
add("html2wt", "Templates: P-wrapping: 1b. Templates on consecutive lines", "Foo\n\nbar\nbaz\n");
add("html2wt", "Templates: P-wrapping: 1c. Templates on consecutive lines", "Foo\n\nbar <div>baz</div>");
add("html2wt", "Templates: Inline Text: 1. Multiple template uses", "Foobarbaz\n");
add("html2wt", "Templates: Inline Text: 2. Back-to-back template uses", "Foobar\n");
add("html2wt", "Templates: Block Tags: 1. Multiple template uses", "<div>Foo</div><div>bar</div><div>baz</div>\n");
add("html2wt", "Templates: Block Tags: 2. Back-to-back template uses", "<div>Foo</div><div>bar</div>\n");
add("html2wt", "Templates: Links: 1. Simple example", "[[wiki/Foo|bar]]\n");
add("html2wt", "Templates: Links: 2. Generation of link href", "[[wiki/Foo|bar]]\n");
add("html2wt", "Templates: Links: 3. Generation of part of a link href", "[[wiki/Foo|bar]]\n\n[/index.php?title=Foobar&action=edit&redlink=1 Foobar]\n\n[/index.php?title=Foobarbaz&action=edit&redlink=1 Foobarbaz]\n\n[/index.php?title=Foobar&action=edit&redlink=1 bar]\n\n[/index.php?title=Foobar&action=edit&redlink=1 Foobar]\n\n[/index.php?title=Foobar&action=edit&redlink=1 bar]\n");
add("html2wt", "Templates: Links: 4. Multiple templates generating link href", "[/index.php?title=Foobar&action=edit&redlink=1 Foobar]\n");
add("html2wt", "Templates: Links: 5. Generation of link text", "[[wiki/Foo|bar]]\n");
add("html2wt", "Templates: Links: 5. Nested templates (only outermost template should be marked)", "[[wiki/Foo|bar]]\n");
add("html2wt", "Templates: HTML Tag: 1. Generation of HTML attr. key", "<div style=\"color:red;\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 2. Generation of HTML attr. value", "<div style=\"color:red;\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 3. Generation of HTML attr key and value", "<div style=\"color:red;\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 4. Generation of starting piece of HTML attr value", "<div title=\"This is a long title with just one piece templated\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 5. Generation of middle piece of HTML attr value", "<div title=\"This is a long title with just one piece templated\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 6. Generation of end piece of HTML attr value", "<div title=\"This is a long title with just one piece templated\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 7. Generation of partial attribute key string", "<div style=\"color:red;\">foo</div>\n");
add("html2wt", "Templates: HTML Tag: 8. Template-generated attribute (k=v)", "<div id=\"v1\">bar</div>\n");
add("html2wt", "Templates: HTML Tag: 9. Multiple template-generated attributes", "<div id=\"v1\" title=\"foo\">bar</div>\n");
add("html2wt", "Templates: HTML Tables: 1. Generating start of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 2a. Generating middle of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 2b. Generating middle of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 3. Generating end of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4a. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4b. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4c. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4d. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4e. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: HTML Tables: 4f. Generating a single tag of a HTML table", "{|\n|foo\n|}\n");
add("html2wt", "Templates: Wiki Tables: 3. td-content via multiple templates", "{|\n|ab\n|}\n");
add("html2wt", "Templates: Wiki Tables: 4. Templated tags, no content", "{|\n|\n|}\n");
add("html2wt", "Templates: Wiki Tables: 5. Templated tags, regular td-tags", "{|\n|foo\n|}\n");
add("html2wt", "Templates: Wiki Tables: 6. Templated tags, templated td-tags", "{|\n|foo\n|}\n");
add("html2wt", "Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered", "{{echo|{{{!}}\n{{!}}-}}\n<onlyinclude>\n|foo\n</onlyinclude>\n{{!}}}\n");
add("html2wt", "Templates: Lists: Multi-line list-items via templates", "* a [/index.php?title=Template:Nonexistent&action=edit&redlink=1 Template:Nonexistent]\n* b [/index.php?title=Template:Nonexistent&action=edit&redlink=1 Template:Nonexistent]\n");
add("html2wt", "Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)", "''ab''c''d''e\n");
add("html2wt", "Templates: Ugly nesting: 4. Divs opened/closed across templates", "a<div>bc</div>de\n");
add("html2wt", "Templates: Ugly templates: 3. newline-only template parameter", "foo \n");
add("html2wt", "Templates: Ugly templates: 4. newline-only template parameter inconsistency", "\n");
add("html2wt", "Parser Functions: 1. Simple example", "FOO\n");
add("html2wt", "Parser Functions: 2. Nested use (only outermost should be marked up)", "FOO\n");
add("html2wt", "(confirming safety of fix for subst T3936)", "@<span>Oh no</span>\n");
add("html2wt", "T24297: safesubst: works during normal parse", "Foobar\n");
add("html2wt", "subst: does not work during normal parse", "<nowiki>{{subst:Includes}}</nowiki>\n");
add("html2wt", "message transform: magic variables", "MediaWiki");
add("html2wt", "message transform: should not transform wiki markup", "<nowiki>''test''</nowiki>");
add("html2wt", "message transform: <noinclude> in transcluded template (T6926)", "Foobar");
add("html2wt", "message transform: <onlyinclude> in transcluded template (T6926)", "Foo");
add("html2wt", "{{#special:}} page name, known", "Special:RecentChanges");
add("html2wt", "{{#special:}} page name with subpage, known", "Special:RecentChanges/param");
add("html2wt", "{{#special:}} page name, unknown", "Special:Foobar nonexistent");
add("html2wt", "{{#speciale:}} page name, known", "Special:RecentChanges");
add("html2wt", "{{#speciale:}} page name with subpage, known", "Special:RecentChanges/param");
add("html2wt", "{{#speciale:}} page name, unknown", "Special:Foobar_nonexistent");
add("html2wt", "Allow empty links in image captions (T62753)", "[[File:Foobar.jpg|thumb|Caption [[Link1]]\n<nowiki>[[]]</nowiki>\n[[Link2]]\n]]");
add("html2wt", "Image with multiple attributes from the same template", "[[File:Foobar.jpg|right|Caption text]]\n");
add("html2wt", "Image with link tails", "123[[File:Foobar.jpg]]456\n123\n[[File:Foobar.jpg|right]]\n456\n123\n[[File:Foobar.jpg|thumb]]\n456");
add("html2wt", "Image with multiple captions -- only last one is accepted", "[[File:Foobar.jpg|right|Caption3 - accepted]]\n");
add("html2wt", "Image with multiple widths -- use last", "[[File:Foobar.jpg|300x300px|caption]]");
add("html2wt", "Image with multiple alignments -- use first (T50664)", "[[File:Foobar.jpg|left|thumb|caption]]\n[[File:Foobar.jpg|middle|caption]]");
add("html2wt", "Image with width attribute at different positions", "[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n[[File:Foobar.jpg|right|200x200px|Caption]]\n");
add("html2wt", "Image with link parameter, wiki target", "[[File:Foobar.jpg|link=Main_Page]]");
add("html2wt", "Link to image page- image page normally doesn't exists, hence edit link\nAdd test with existing image page\n#<p><a href=\"/wiki/File:Test\" title=\"Image:Test\">Image:test</a>", "[/index.php?title=File:Test&action=edit&redlink=1 Image:test]\n");
add("html2wt", "T20784 Link to non-existent image page with caption should use caption as link text", "[/index.php?title=File:Test&action=edit&redlink=1 caption]\n");
add("html2wt", "Parsoid-specific image handling - simple image with size and middle alignment", "[[File:Foobar.jpg|middle|50x50px]]");
add("html2wt", "Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption", "[[File:Foobar.jpg|right|middle|thumb|50x50px|caption]]\n");
add("html2wt", "Parsoid-specific image handling - caption with a template in it", "[[File:Foobar.jpg|thumb|200x200px|This caption has a {{echo|transclusion}} in it.]]\n");
add("html2wt", "Subpage link", "[[wiki/Subpage test/subpage|/subpage]]\n");
add("html2wt", "Subpage noslash link", "[[wiki/Subpage test/subpage|subpage]]\n");
add("html2wt", "Render invalid page names as plain text (T53090)", "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n<nowiki>[[foo~~~bar]]</nowiki>\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\n[[{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}]]\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("html2wt", "Disabled subpages", "[/index.php?title=/subpage&action=edit&redlink=1 /subpage]\n");
add("html2wt", "T2561: {{/Subpage}}", "[/index.php?title=Page/Subpage&action=edit&redlink=1 Page/Subpage]\n");
add("html2wt", "Link to category", "[[wiki/Category:MediaWiki User's Guide|Category:MediaWiki User's Guide]]\n");
add("html2wt", "PAGESINCATEGORY invalid title fatal (r33546 fix)", "0\n");
add("html2wt", "Basic section headings", "== Headline 1 ==\nSome text\n\n== Headline 2 ==\nMore\n\n=== Smaller headline ===\nBlah blah\n");
add("html2wt", "Section headings with TOC", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#Headline_1|<span class=\"tocnumber\">1</span> <span class=\"toctext\">Headline 1</span>]]\n** [[#Subheadline_1|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">Subheadline 1</span>]]\n*** [[#Skipping_a_level|<span class=\"tocnumber\">1.1.1</span> <span class=\"toctext\">Skipping a level</span>]]\n**** [[#Skipping_a_level_2|<span class=\"tocnumber\">1.1.1.1</span> <span class=\"toctext\">Skipping a level</span>]]\n* [[#Headline_2|<span class=\"tocnumber\">2</span> <span class=\"toctext\">Headline 2</span>]]\n** [[#Another_headline|<span class=\"tocnumber\">2.1</span> <span class=\"toctext\">Another headline</span>]]\n\n</div>\n\n== Headline 1 ==\n\n=== Subheadline 1 ===\n\n===== Skipping a level =====\n\n====== Skipping a level ======\n\n== Headline 2 ==\nSome text\n\n=== Another headline ===\n");
add("html2wt", "TOC regression (T11764)", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#title_1|<span class=\"tocnumber\">1</span> <span class=\"toctext\">title 1</span>]]\n** [[#title_1.1|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">title 1.1</span>]]\n*** [[#title_1.1.1|<span class=\"tocnumber\">1.1.1</span> <span class=\"toctext\">title 1.1.1</span>]]\n** [[#title_1.2|<span class=\"tocnumber\">1.2</span> <span class=\"toctext\">title 1.2</span>]]\n* [[#title_2|<span class=\"tocnumber\">2</span> <span class=\"toctext\">title 2</span>]]\n** [[#title_2.1|<span class=\"tocnumber\">2.1</span> <span class=\"toctext\">title 2.1</span>]]\n\n</div>\n\n== title 1 ==\n\n=== title 1.1 ===\n\n==== title 1.1.1 ====\n\n=== title 1.2 ===\n\n== title 2 ==\n\n=== title 2.1 ===\n");
add("html2wt", "TOC with wgMaxTocLevel=3 (T8204)", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#title_1|<span class=\"tocnumber\">1</span> <span class=\"toctext\">title 1</span>]]\n** [[#title_1.1|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">title 1.1</span>]]\n** [[#title_1.2|<span class=\"tocnumber\">1.2</span> <span class=\"toctext\">title 1.2</span>]]\n* [[#title_2|<span class=\"tocnumber\">2</span> <span class=\"toctext\">title 2</span>]]\n** [[#title_2.1|<span class=\"tocnumber\">2.1</span> <span class=\"toctext\">title 2.1</span>]]\n\n</div>\n\n== title 1 ==\n\n=== title 1.1 ===\n\n==== title 1.1.1 ====\n\n=== title 1.2 ===\n\n== title 2 ==\n\n=== title 2.1 ===\n");
add("html2wt", "TOC with wgMaxTocLevel=3 and two level four headings (T8204)", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#Section_1|<span class=\"tocnumber\">1</span> <span class=\"toctext\">Section 1</span>]]\n** [[#Section_1.1|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">Section 1.1</span>]]\n* [[#Section_2|<span class=\"tocnumber\">2</span> <span class=\"toctext\">Section 2</span>]]\n\n</div>\n\n== Section 1 ==\n\n=== Section 1.1 ===\n\n==== Section 1.1.1 ====\n\n==== Section 1.1.1.1 ====\n\n== Section 2 ==\n");
add("html2wt", "Resolving duplicate section names", "== Foo bar ==\n\n== Foo bar ==\n");
add("html2wt", "Resolving duplicate section names with differing case (T12721)", "== Foo bar ==\n\n== Foo Bar ==\n");
add("html2wt", "Template with sections, __NOTOC__", "== Section 0 ==\n\n=== Section 1 ===\n\n== Section 2 ==\n\n== Section 4 ==\n");
add("html2wt", "__NOEDITSECTION__ keyword", "== Section 1 ==\n\n== Section 2 ==\n");
add("html2wt", "Link inside a section heading", "== Section with a [[wiki/Main Page|link]] in it ==\n");
add("html2wt", "TOC regression (T14077)", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#title_1|<span class=\"tocnumber\">1</span> <span class=\"toctext\">title 1</span>]]\n** [[#title_1.1|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">title 1.1</span>]]\n* [[#title_2|<span class=\"tocnumber\">2</span> <span class=\"toctext\">title 2</span>]]\n\n</div>\n\n== title 1 ==\n\n=== title 1.1 ===\n\n== title 2 ==\n");
add("html2wt", "Header with special characters (T27462)", "The tooltips shall not show entities to the user (ie. be double escaped)\n\n== text > text ==\nsection 1\n\n== text < text ==\nsection 2\n\n== text & text ==\nsection 3\n\n== text ' text ==\nsection 4\n\n== text \" text ==\nsection 5");
add("html2wt", "Header with space, plus and underscore as entity", "Id should not contain + for spaces\n\n== Space between Text ==\nsection 1\n\n== Space-Entity&#32;between&#32;Text ==\nsection 2\n\n== Plus+between+Text ==\nsection 3\n\n== Plus-Entity&#43;between&#43;Text ==\nsection 4\n\n== Underscore_between_Text ==\nsection 5\n\n== Underscore-Entity&#95;between&#95;Text ==\nsection 6\n\n[[#Space between Text]]\n[[#Space-Entity&#32;between&#32;Text]]\n[[#Plus+between+Text]]\n[[#Plus-Entity&#43;between&#43;Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity&#95;between&#95;Text]]");
add("html2wt", "div with single-quoted attribute", "<div id=\"rock\">HTML rocks</div>\n");
add("html2wt", "div with unquoted attribute", "<div id=\"rock\">HTML rocks</div>\n");
add("html2wt", "div with illegal double attributes", "<div id=\"b\">HTML rocks</div>\n");
add("html2wt", "HTML multiple attributes correction", "Awesome!\n");
add("html2wt", "Table multiple attributes correction", "{|\n! class=\"awesome\" |status\n|}\n");
add("html2wt", "DIV IN UPPERCASE", "<div id=\"x\">HTML ROCKS</div>\n");
add("html2wt", "text with character entity: eacute", "I always thought é was a cute letter.\n");
add("html2wt", "Media link with nasty text", "[[Media:Foobar.jpg|Safe Link]]<div style=\"display:none\">[[Media:Foobar.jpg|\" onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>\n");
add("html2wt", "Character reference normalization in link text (T3938)", "[[wiki/Main Page|this&that]]\n");
add("html2wt", "(T21451) Links should refer to the normalized form.", "[[wiki/אַ|אַ]]\n[[wiki/אַ|אַ]]\n[[wiki/אַ|אַ]]\n[[wiki/אַ|אַ]]\n[[wiki/אַ|אַ]]\n");
add("html2wt", "Empty attribute crash test single-quotes (T4067)", "<font color=\"\">foo</font>\n");
add("html2wt", "Attribute test: unquoted but illegal value (hash)", "<font color=\"#x\">foo</font>\n");
add("html2wt", "T4095: link with pipe and three closing brackets, version 2", "[[Main Page|<nowiki>[http://example.com/]</nowiki>]]");
add("html2wt", "T4304: HTML attribute safety (unsafe breakout parameter; 2309)", "<div style=\"float: right;\"><script>alert(document.cookie)</script>\">Magic div</div>\n");
add("html2wt", "T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)", "<div style=\"float: right;\"><script>alert(document.cookie)</script>\">Magic div</div>\n");
add("html2wt", "Table attribute legitimate extension", "{|\n! style=\"color:blue\" |status\n|}\n");
add("html2wt", "Table attribute safety", "{|\n! style=\"/* insecure input */\" |status\n|}\n");
add("html2wt", "CSS line continuation 1", "<div style=\"/* insecure input */\"></div>\n");
add("html2wt", "CSS line continuation 2", "<div style=\"/* invalid control char */\"></div>\n");
add("html2wt", "Expansion of multi-line templates in attribute values (T8255)", "<div style=\"background: #00FF00\">-</div>\n");
add("html2wt", "Expansion of multi-line templates in attribute values (T8255 sanity check 2)", "<div style=\"background: \n#00FF00\">-</div>\n");
add("html2wt", "Parser hook: nested tags", "<tag><tag></tag><nowiki></tag></nowiki>");
add("html2wt", "Nested template calls", "(My parameter is: param)\n");
add("html2wt", "Sanitizer: Closing of open tags", "<s></s>\n{|\n|}");
add("html2wt", "Sanitizer: Closing of open but not closed tags", "<s>foo</s>\n");
add("html2wt", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata", "<div itemscope=\"\">\n\t<meta itemprop=\"hello\" content=\"world\" />\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" content=\"5\" />\n\t[http://example.org]\n\t<link rel=\"stylesheet\" href=\"http://example.org\">\n\t[http://example.org]\n\n</div>\n");
add("html2wt", "Self closed html pairs (T7487)", "<center><font id=\"bug\"></font>Centered text</center>\n<div><font id=\"bug2\"></font>In div text</div>");
add("html2wt", "Punctuation: nbsp before exclamation", "C'est grave !\n");
add("html2wt", "HTML nested bullet list, open tags (T7497)", "* One\n* Two:\n** Sub-one\n** Sub-two\n");
add("html2wt", "HTML nested ordered list, closed tags (T7497)", "# One\n# Two:\n## Sub-one\n## Sub-two\n");
add("html2wt", "HTML nested ordered list, open tags (T7497)", "# One\n# Two:\n## Sub-one\n## Sub-two\n");
add("html2wt", "HTML ordered list item with parameters oddity", "# One\n");
add("html2wt", "Fuzz testing: Parser13", "{|\n|\n|}\n");
add("html2wt", "Fuzz testing: Parser14", "== onmouseover= ==\nhttp://__TOC__");
add("html2wt", "Fuzz testing: Parser16", "{|\n!https://\n!\n!\n!\n|}");
add("html2wt", "Fuzz testing: Parser21", "{|\n!irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|\n|}\n");
add("html2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|\n|}\n");
add("html2wt", "Parsing optional HTML elements (T8171)", "{| \n | Some tabular data\n | More tabular data ...\n | And yet som tabular data \n|}\n");
add("html2wt", "Correct handling of <td>, <tr> (T8171)", "{| \n | Some tabular data\n | More tabular data ...\n | And yet som tabular data \n|}\n");
add("html2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph\n");
add("html2wt", "Inline HTML vs wiki block nesting", "'''Bold paragraph'''\n\nNew wiki paragraph\n");
add("html2wt", "Mixing markup for italics and bold", "'<nowiki/>''bold'<nowiki/>'''''bold''bolditalics'''''\n");
add("html2wt", "Special page transclusion", "* [[wiki/Xyzzyx|Xyzzyx]]\n");
add("html2wt", "Special page transclusion twice (T7021)", "* [[wiki/Xyzzyx|Xyzzyx]]\n\n* [[wiki/Xyzzyx|Xyzzyx]]\n");
add("html2wt", "Transclusion of default MediaWiki message", "Main Page\n");
add("html2wt", "Transclusion of nonexistent MediaWiki message", "[/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1 MediaWiki:Mainpagexxx]\n");
add("html2wt", "Transclusion of MediaWiki message with underscore", "History\n");
add("html2wt", "Transclusion of MediaWiki message with space", "History\n");
add("html2wt", "Handling of &#x0A; in URLs", "* irc://&#x0A;a");
add("html2wt", "Handling of %0A in URLs", "* irc://%0Aa");
add("html2wt", "Special:Search page linking.", "[[wiki/Special:Search|Special:Search]]\n");
add("html2wt", "Say the magic word", "* Parser test\n* Parser_test\n* Parser test\n* Parser_test\n* Parser test\n* Parser_test\n* Parser test\n* Parser_test\n* Parser test\n* Parser_test\n* Talk:Parser test\n* Talk:Parser_test\n* Parser test\n* Parser_test\n*\n*\n* 0\n* Talk\n* Talk\n*\n*\n* [/index.php?title=Template:Dynamic&action=edit&redlink=1 Template:Dynamic]\n");
add("html2wt", "Illegal character references (T106578)", "; Null\n: &amp;#00;\n; FF\n: &amp;#xC;\n; CR\n: &amp;#xD;\n; Control (low)\n: &amp;#8;\n; Control (high)\n: &amp;#x7F; &amp;#x9F;\n; Surrogate\n: &amp;#xD83D;&amp;#xDCA9;\n; This is an okay astral character\n: 💩");
add("html2wt", "ISBN code coverage", "ISBN 978-0-1234-56&#x20;789");
add("html2wt", "Double RFC with a wiki link", "RFC [/index.php?title=RFC_1234&action=edit&redlink=1 RFC 1234]\n");
add("html2wt", "Parents of subpages, one level up", "[/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1 L2]\n");
add("html2wt", "Parents of subpages, one level up, not named", "[/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1 Subpage test/L1/L2]\n");
add("html2wt", "Parents of subpages, two levels up", "[/index.php?title=Subpage_test/L1&action=edit&redlink=1 L1]2\n\n[/index.php?title=Subpage_test/L1&action=edit&redlink=1 L1l]\n");
add("html2wt", "Parents of subpages, two levels up, with lots of extra trailing slashes.", "[/index.php?title=Subpage_test/L1&action=edit&redlink=1 Subpage test/L1]\n");
add("html2wt", "Transclusion of a sibling page (one level up)", "Sibling article\n");
add("html2wt", "Transclusion of a child page", "Sibling article\n");
add("html2wt", "Definition list code coverage", "; title \n: def\n; title \n: def\n; title\n: def");
add("html2wt", "Don't fall for the self-closing div", "<div>hello world</div>\n");
add("html2wt", "RAW magic word", "[/index.php?title=Template:QUERTY&action=edit&redlink=1 Template:QUERTY]\n");
add("html2wt", "Template caching", "This is a test template\nThis is a test template\n");
add("html2wt", "Inclusion of !userCanEdit() content", "== header ==\n");
add("html2wt", "Out-of-order TOC heading levels", "<div id=\"toc\" class=\"toc\"><div class=\"toctitle\" lang=\"en\" dir=\"ltr\">\n== Contents ==\n</div>\n\n* [[#2|<span class=\"tocnumber\">1</span> <span class=\"toctext\">2</span>]]\n** [[#6|<span class=\"tocnumber\">1.1</span> <span class=\"toctext\">6</span>]]\n** [[#3|<span class=\"tocnumber\">1.2</span> <span class=\"toctext\">3</span>]]\n* [[#1|<span class=\"tocnumber\">2</span> <span class=\"toctext\">1</span>]]\n** [[#5|<span class=\"tocnumber\">2.1</span> <span class=\"toctext\">5</span>]]\n** [[#2_2|<span class=\"tocnumber\">2.2</span> <span class=\"toctext\">2</span>]]\n\n</div>\n\n== 2 ==\n\n====== 6 ======\n\n=== 3 ===\n\n= 1 =\n\n===== 5 =====\n\n== 2 ==\n");
add("html2wt", "anchorencode encodes like the TOC generator: (T20431)", "=== _ +:.3A%3A _ &&amp;]] x ===\n{{anchorencode: _ +:.3A%3A _ &&amp;]] x}}\n__NOEDITSECTION__\n");
add("html2wt", "T8200: blockquotes and paragraph formatting", "<blockquote>\nfoo\n\n</blockquote>\nbar\n\n baz\n");
add("html2wt", "T10293: Use of center tag ruins paragraph formatting", "<center>\nfoo\n\n</center>\nbar\n\n baz\n");
add("html2wt", "Parsing of overlapping (improperly nested) inline html tags", "<span><s>x</s></span>\n");
add("html2wt", "-{}- tags within headlines (within html for parserConvert())", "== -{Naslov}- ==\n\nNote that even an unprotected headline ID is not affected by language\nconversion:\n\n== Latinski ==\n");
add("html2wt", "T2529: Uncovered bullet", "* Foo\n* Bar\n");
add("html2wt", "T2529: Uncovered bullet in a deeply nested list", "******* Foo\n* Bar\n");
add("html2wt", "T2529: Uncovered table already at line-start", "x\n\n{|\n|1\n|2\n|-\n|3\n|4\n|}\ny\n");
add("html2wt", "T2529: Uncovered bullet in parser function result", "* Foo\n* bar\n");
add("html2wt", "T7678: Double-parsed template argument", "<nowiki>{{{1}}}</nowiki>\n");
add("html2wt", "T7678: Double-parsed template invocation", "<nowiki>{{paramtest | param = hello }}</nowiki>\n");
add("html2wt", "Case insensitivity of parser functions for non-ASCII characters (T10143)", "Ěščř\nĚščř\něščř\něščř\něščř\něščř\nĚŠČŘ\nĚŠČŘ\n");
add("html2wt", "Morwen/13: Unclosed link followed by heading", "[[link\n\n== heading ==\n");
add("html2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n\n= heading =\n");
add("html2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures", "<nowiki>{{foo|</nowiki>\n\n== heading ==\n");
add("html2wt", "Paragraphs inside divs (no extra line breaks)", "<div>Line one\nLine two</div>\n");
add("html2wt", "Paragraphs inside divs (extra line break on close)", "<div>Line one\nLine two\n\n</div>\n");
add("html2wt", "Paragraphs inside divs (extra line break on open and close)", "<div>\nLine one\n\nLine two\n\n</div>\n");
add("html2wt", "Nesting tags, paragraphs on lines which begin with <div>", "<div></div>\n<strong>A\nB</strong>\n");
add("html2wt", "T8200: paragraphs inside blockquotes (no extra line breaks)", "<blockquote>\nLine one\nLine two\n</blockquote>");
add("html2wt", "T8200: paragraphs inside blockquotes (extra line break on open)", "<blockquote>\nLine one\n\nLine two\n</blockquote>");
add("html2wt", "T8200: paragraphs inside blockquotes (extra line break on close)", "<blockquote>\nLine one\n\nLine two\n\n</blockquote>");
add("html2wt", "T8200: paragraphs inside blockquotes (extra line break on open and close)", "<blockquote>\nLine one\n\nLine two\n\n</blockquote>\n");
add("html2wt", "Paragraphs inside blockquotes/divs (no extra line breaks)", "<blockquote><div>Line one\nLine two</div></blockquote>\n");
add("html2wt", "Paragraphs inside blockquotes/divs (extra line break on close)", "<blockquote><div>Line one\nLine two\n\n</div></blockquote>\n");
add("html2wt", "Paragraphs inside blockquotes/divs (extra line break on open and close)", "<blockquote><div>\nLine one\n\nLine two\n\n</div></blockquote>\n");
add("html2wt", "formatdate parser function", "<span class=\"mw-formatted-date\" title=\"2009-03-24\">2009-03-24</span>\n");
add("html2wt", "formatdate parser function, with default format", "<span class=\"mw-formatted-date\" title=\"2009-03-24\">March 24, 2009</span>\n");
add("html2wt", "Spacing of numbers in formatted dates", "<span class=\"mw-formatted-date\" title=\"01-15\">January 15</span>\n");
add("html2wt", "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", "<span class=\"mw-formatted-date\" title=\"2009-03-24\">24 March 2009</span>\n");
add("html2wt", "Special characters in embedded file links (T29679)", "[[File:Contains_&_ampersand.jpg]]\n[[File:Does_not_exist.jpg|Title with & ampersand]]");
add("html2wt", "Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)", "Text's been normalized?\n");
add("html2wt", "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links", "[http://www.example.org/ ideograms]\n");
add("html2wt", "T33098 Template which includes system messages which includes the template", "<span class=\"error\">Template loop detected: [[wiki/Template:Identical|Template:Identical]]</span>\n<span class=\"error\">Template loop detected: [[wiki/Template:Identical|Template:Identical]]</span>\n");
add("html2wt", "T33490 Turkish: ucfirst 'blah'", "Blah\n");
add("html2wt", "T33490 Turkish: ucfirst 'ix'", "İx\n");
add("html2wt", "T33490 Turkish: lcfirst 'BLAH'", "bLAH\n");
add("html2wt", "T33490 Turkish: ucfırst (with a dotless i)", "[/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1 Şablon:Ucfırst:blah]\n");
add("html2wt", "T33490 ucfırst (with a dotless i) with English language", "[/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1 Template:Ucfırst:blah]\n");
add("html2wt", "span tags with directionality in TOC", "__TOC__\n==<span dir=\"ltr\">C++</span>==\n\n== <span dir=\"rtl\">זבנג!</span> ==\n\n== <span style=\"font-style: italic\">The attributes on these span tags must be deleted from the TOC</span> ==\n\n== <span style=\"font-style: italic\" dir=\"ltr\">All attributes on these span tags must be deleted from the TOC</span> ==\n\n== <span dir=\"ltr\" style=\"font-style: italic\">Attributes after dir on these span tags must be deleted from the TOC</span> ==\n");
add("html2wt", "T34057: Title needed when expanding <h> nodes.", "== Headline text ==\n");
add("html2wt", "Strip marker in lc", "xy\n");
add("html2wt", "Strip marker in uc", "XY\n");
add("html2wt", "Strip marker in formatNum", "12\n12\n");
add("html2wt", "Check noCommafy in formatNum", "123 456,78\n123456.78\n");
add("html2wt", "Wrong option for formatNum (T58199)", "1,234.56\n1,234.56\n1,234.56\n");
add("html2wt", "Strip marker in grammar", "foobarista\n");
add("html2wt", "Strip marker in padleft", "xy\n");
add("html2wt", "Strip marker in padright", "xy\n");
add("html2wt", "nowiki inside link inside heading (T20295)", "== [[wiki/Foo|xyz]] ==\n");
add("html2wt", "new support for bdi element (T33817)", "ולדימיר לנין (ברוסית: <bdi lang=\"ru\">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.\n");
add("html2wt", "Ignore pipe between table row attributes", "{|\n|quux\n|- id=\"foo\" style=\"color: red\"\n|bar\n|}\n");
add("html2wt", "Language parser function", "العربية\n");
add("html2wt", "Special parser function", "Special:Random\nSpecial:Badtitle\nSpecial:Foobar\n");
add("html2wt", "Disable TOC", "Lead\n\n== Section 1 ==\n\n== Section 2 ==\n\n== Section 3 ==\n\n== Section 4 ==\n\n== Section 5 ==\n");
add("html2wt", "Empty LI and TR nodes should not be stripped from top-level content", "* a\n*\n* b\n\n{|\n|-\n|foo\n|}");
add("html2wt", "Lists: 4. No escapes needed", "* foo*bar\n\n* ''foo''*bar\n\n* [[Foo]]: bar\n\n* [[Foo]]*bar\n");
add("html2wt", "HRs: 1. Single line", "--------\n----=foo=\n----*foo");
add("html2wt", "3. Leading whitespace in indent-pre suppressing contexts should not be escaped", "<blockquote>\n\n a\n <span>b</span>\n c\n</blockquote>");
add("html2wt", "HTML tag with 'unnecessary' entity encoding in attributes", "<span title=\"&\">foo</span>\n");
add("html2wt", "Accept empty td cell attribute", "{|\n| align=\"center\" |foo\n|\n|}\n");
add("html2wt", "Non-empty attributes in th-cells", "{|\n!Foo\n! style=\"color: red\" |Bar\n|}\n");
add("html2wt", "Accept empty attributes in th-cells", "{|\n!foo\n!bar\n|}\n");
add("html2wt", "Empty table rows go away", "{|\n|Hello\n|there\n|}\n");
add("html2wt", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out", "{|\n|<small>foo\n\nbar\n|}\n\n{|\n|<small>foo<small>\n|}");
add("html2wt", "Empty TD followed by TD with tpl-generated attribute", "{|\n|\n|foo\n|}\n");
add("html2wt", "Indented table with an empty td", "{|\n|\n|foo\n|}\n");
add("html2wt", "Indent and comment before table row", "{|\n <!--hi-->|-\n | there\n|}");
add("html2wt", "Empty TR followed by a template-generated TR", "{|\n{{echo|<tr><td>foo</td></tr>}}\n|}");
add("html2wt", "Empty TR followed by mixed-ws-comment line should RT correctly", "{|\n\n <!--c-->|-\n<!--c--> <!--d-->\n|}\n");
add("html2wt", "Improperly nested inline or quotes tags with whitespace in between", "<span> <s>x</s></span><s> </s>\n''' ''x'''''<nowiki/>'' ''\n");
add("html2wt", "T73074: More fostering fun", "[[Category:Two]]\n<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("html2wt", "Parsoid should not accept invalid interwiki shortcuts", "[[news:Foo|Foo]]\n[news:Foo Foo]\n[news:Foo Foo]");
add("html2wt", "Image: upright option (parsoid)", "[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|caption]]\n[[File:Foobar.jpg|thumb|500x500px|caption]]\n");
add("html2wt", "Image: upright option is ignored on inline and frame images (parsoid)", "[[File:Foobar.jpg|500x500px|caption]]");
add("html2wt", "Empty LI (T49673)", "* a\n*\n*\n* b");
add("html2wt", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714)", "== A&B&amp;C&amp;amp;D&amp;amp;amp;E ==\n[[#A&B&amp;C&amp;amp;D&amp;amp;amp;E]]");
add("html2wt", "HTML5 ids: fallback to legacy", "== Foo bar ==\n\n== foo Bar ==\n\n== Тест ==\n\n== Тест ==\n\n== тест ==\n\n== Hey < # \" > % : ' ==\n[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n<!-- These two links should produce identical HTML -->\n[[#啤酒]] [[#%E5%95%A4%E9%85%92]]");
add("html2wt", "T90902: Normalize weird characters in section IDs", "== Foo&nbsp;bar ==\n[[#Foo&nbsp;bar]]");
add("html2wt", "Section wrapping for well-nested sections (no leading content)", "= 1 =\na\n\n= 2 =\nb\n\n== 2.1 ==\nc\n\n== 2.2 ==\nd\n\n=== 2.2.1 ===\ne\n\n= 3 =\nf\n");
add("html2wt", "Section wrapping for well-nested sections (with leading content)", "Para 1.\n\nPara 2 with a <div>nested in it</div>\n\nPara 3.\n\n= 1 =\na\n\n= 2 =\nb\n\n== 2.1 ==\nc\n");
add("html2wt", "Section wrapping with template-generated sections (good nesting 1)", "= 1 =\na\n\n{{echo|1=\n==1.1==\nb\n}}\n\n== 1.2 ==\nc\n\n= 2 =\nd");
add("html2wt", "Section wrapping with template-generated sections (bad nesting 2)", "= 1 =\na\n\n{{echo|1=\n=2=\nb\n==2.1==\nc\n}}\n\nd\n\n= 3 =\ne");
add("html2wt", "Section wrapping with uneditable lead section + div wrapping multiple sections", "foo\n\n<div style=\"border:1px solid red;\">\n= 1 =\na\n\n== 1.1 ==\nb\n\n= 2 =\nc\n</div>\n\n= 3 =\nd\n\n== 3.1 ==\ne\n");
add("html2wt", "Section wrapping with editable lead section + div overlapping multiple sections", "foo\n\n= 1 =\na\n<div style=\"border:1px solid red;\">\nb\n\n== 1.1 ==\nc\n\n= 2 =\nd\n</div>\ne\n\n= 3 =\nf\n\n== 3.1 ==\ng\n");
add("html2wt", "HTML header tags should not be wrapped in section tags", "foo\n\n<h1>a</h1>\n\n= b =\n\n<h1>c</h1>\n\n= d =\n");
add("html2wt", "Lead section containing only whitespace and comments.", "\n<!-- this is a comment, presumably significant to editors -->\n= 1 =\na\n\n= 2 =\nb");
// Blacklist for selser
add("selser", "Extra newlines followed by heading [1,2,1,3,0,4,0,4,1,3,4]", "a\n\n7y1lpx\n\n\n\n=b=\nip38yd\n\n[[a]]\n\n1556qs4\n\n\n\n1y84y3s");
add("selser", "Parsing an URL [[[2]],2,0]", "[[:fr:🍺|mwh6a1http://fr.wikipedia.org/wiki/🍺]]\n\nfj3cgh\n<!-- EasterEgg we love beer, better be able be able to link to it -->");
add("selser", "Italics and bold: 5-quote opening sequence: (5,6) [[[2]]]", "''f2isaa'''foo''''''");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [1]", "{| data-foobar=\"1hy2782\"\n!''a!!''b\n|''a||''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [2]", "1472tnt\n{|\n!''a!!''b\n|''a||''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[0,[2,0]]]", "{|\n<!--ozg58-->!''a!!''b\n|''a||''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[0,[[3,[2],3,[2],1],3]]]", "{|\n!p6mcdk''b\n|d0ix25''a|| data-foobar=\"4g8of5\" |''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[4,[[[3],1,0,[[2]],0],0]]]", "{|<!--1w3puuv-->\n!!! data-foobar=\"1t3dkx\" |''b\n|''bnq9qla''||''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[0,[[1,0,0,4,1],0]]]", "{|\n! data-foobar=\"s19poy\" |''a!!''b\n!vx4tlq\n| data-foobar=\"a1y3t4\" |''b''\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[4,[[[3],4,0,0,[3]],3]]]", "{|<!--1ypcdkj-->\n!\n!xj9ho5\n|''a||\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[4,1]]", "{|<!--1bnj6ev-->\n!''a!!''b\n|''a||''b\n|}");
add("selser", "Quote balancing context should be restricted to td/th cells on the same wikitext line [[0,1]]", "{|\n!''a!!''b\n|''a||''b\n|}");
add("selser", "Non-word characters don't terminate tag names (T19663, T42670, T54022) 5", "<blockquote|>a\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>");
add("selser", "Non-word characters don't terminate tag names 5", "<blockquote|>a\n\n<b→> doesn't terminate </b→>\n\n<bä> doesn't terminate </bä>\n\n<boo> doesn't terminate </boo>\n\n<s.foo> doesn't terminate </s.foo>\n\n<sub-ID#1>");
add("selser", "Empty lines between lines with block tags [0,0,0,0,4,[4],0,4,2,4,2,0,0,3,3,0,0,[4]]", "<div></div>\n\n\n12z01x\n\nku0gkm\n\n9kuqwp\n\n7ha43h\n\nhpgub4\n\n1xhfwxa\n\nb\n\n<div>b</div>\n<div>xoyi4a</div>");
add("selser", "Empty lines between lines with block tags [0,4,2,2,0,4,0,[2],0,[4],3,0,0,0,0,2,3,0]", "<div></div>vygiqc\n\nldw79x\n\n\n\n1g9ukkj\n<div></div>1j1f0la\n\n1qbabjmb\n<div>t9qray</div>\n\n<div>b</div>d\n\n1r0x9v4\n\n<div>e</div>");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,4,0,0,0,0,0,3,0,0,0,4,0,0,[3]]", "{{echo| }}a1v0rsn1{{echo|\n }}a\n\n{{echo|\n b}}\n{{echo|a\n }}b\n1ikarr6{{echo|a\n}} ");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,4,0,0,0,0,0,4,0,0,0,0,0,0,0]", "{{echo| }}a17f3ud6{{echo|\n }}a\n\n{{echo|\n b}}\n1kc5ntg{{echo|a\n }}b\n\n{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,3,0,0,0,0,0,4,0,0,0,0,0,0,[4]]", "{{echo| }}a{{echo|\n }}a\n\n{{echo|\n b}}\n1hhz1mf{{echo|a\n }}b\n\n{{echo|a\n}} 1aewpjv");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,4,0,0,0,0,0,0,0,0,0,2,0,0,[3]]", "{{echo| }}a1y95ktj{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\n1far117\n\n{{echo|a\n}} ");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,3,0,0,0,0,0,0,0,0,0,2,0,0,[3]]", "{{echo| }}a{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\n17080ek\n\n{{echo|a\n}} ");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,3,0,0,0,0,0,3,0,0,0,4,0,0,0]", "{{echo| }}a{{echo|\n }}a\n\n{{echo|\n b}}\n{{echo|a\n }}b\n1rwm9sa{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,3,0,0,0,0,0,3,0,0,0,3,0,0,0]", "{{echo| }}a{{echo|\n }}a\n\n{{echo|\n b}}\n{{echo|a\n }}b\n{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,0,0,0,0,0,0,2,0,0,0,0,0,0,1]", "{{echo| }}a\n\n{{echo|\n }}a\n\n{{echo|\n b}}\nvovvem\n\n{{echo|a\n }}b\n\n{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,2,0,0,0,0,0,3,0,0,0,0,0,0,1]", "{{echo| }}a14hw18j\n\n{{echo|\n }}a\n\n{{echo|\n b}}\n{{echo|a\n }}b\n\n{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,0,0,0,0,0,0,0,0,0,0,4,0,0,0]", "{{echo| }}a\n\n{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\nnavwn2{{echo|a\n}} b");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,0,0,0,4,0,0,0,0,0,0,0,0,0,[2]]", "{{echo| }}a\n\n{{echo|\n }}a\n90lf8h{{echo|\n b}}\n\n{{echo|a\n }}b\n\n{{echo|a\n}} fhhbtwb");
add("selser", "Templates: Indent-Pre: 1f: Wrapping should be based on expanded content [0,0,0,0,0,0,0,0,0,0,0,0,0,0,[4]]", "{{echo| }}a\n\n{{echo|\n }}a\n\n{{echo|\n b}}\n\n{{echo|a\n }}b\n\n{{echo|a\n}} tq4wr0");
add("selser", "Templates: Handle comments in the target [0,0,0,3,0,3,0,2,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}{{echo<!-- should be ignored -->|foo}}\n\npm7iz2\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,3,0,0,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,3,0,0,0,2,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\nj1csr1\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,4,0,3,0,0,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n15yxofr\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,0,0,2,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\njgyysa\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,3,0,0,0,4,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\nsgvcmd\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,2,0,3,0,0,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\nzcgcjr\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,0,0,0,0,3,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,2,0,0,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\nr8wbl5\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,2,0,0,0,4,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n1pmd7ph\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n1jcnmqf\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,0,0,0,0,4,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n3qfb35\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,2,0,3,0,4,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\nvrcm62\n\n{{echo<!-- should be ignored -->\n|foo}}{{echo<!-- should be ignored -->|foo}}\n\n1yscfka\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,3,0,0,0,4,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n1rq5hmx\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,2,0,2,0,3,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n1ts33ib\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\ndiv5ig\n\n{{echo<!-- should be ignored -->\n|foo}}{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,0,0,4,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\nc9taiz\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,4,0,4,0,4,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n1ekhlra\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n1rwssbq\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n1y3hrq6\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,3,0,0,0,2,0,0,0]", "{{echo\n<!-- should be ignored -->\n|foo}}{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n1efeuy2\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,3,0,3,0,0,0,2,0]", "{{echo\n<!-- should be ignored -->\n|foo}}{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n1st49h4\n\n{{<!-- should be ignored -->echo|foo}}");
add("selser", "Templates: Handle comments in the target [0,0,0,4,0,0,0,3,0]", "{{echo\n<!-- should be ignored -->\n|foo}}\n\n{{echo\n<!-- should be ignored and spaces on next line should not trip us up (T147742) -->\n |foo}}\n\nyqfzta\n\n{{echo<!-- should be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}{{<!-- should be ignored -->echo|foo}}");
add("selser", "4. Indent-Pre and extension tags 5", "<nowiki> </nowiki>a <tag />");
add("selser", "4. Indent-Pre and extension tags [2,0]", "1x7gem9\n\n a <tag />");
add("selser", "5a. White-space in indent-pre [[0,0,4]]", " a<br />\n fforbc");
add("selser", "5a. White-space in indent-pre [1]", " a<br />\n \n \n b");
add("selser", "5a. White-space in indent-pre [[3,0,0]]", " <br />\n \n \n b");
add("selser", "5a. White-space in indent-pre [[3,2,0]]", " wjzi7e<br />\n \n \n b");
add("selser", "5a. White-space in indent-pre [[0,2,2]]", " a1qgred7<br />\n 1mr1ufg\n \n b");
add("selser", "5a. White-space in indent-pre [[0,0,2]]", " a<br />\n 17tnwzt\n \n b");
add("selser", "5a. White-space in indent-pre [[2,0,4]]", " puq9wka<br />\n fwh62r");
add("selser", "5a. White-space in indent-pre [[2,0,0]]", " ie5udka<br />\n \n \n b");
add("selser", "5a. White-space in indent-pre [[0,2,0]]", " a17lt6v3<br />\n \n \n b");
add("selser", "Definition list with news link containing colon [[2,[2]]]", ": 130ytmu\n;news:alt.wikipedia.rox:diwuzj This isn't even a real newsgroup!");
add("selser", "Definition list with news link containing colon [[0,[2]]]", ";news:alt.wikipedia.rox:o6oowo This isn't even a real newsgroup!");
add("selser", "Definition lists: self-closed tag [2]", "1t68spe\n\n;one<br/>two :two-line fun");
add("selser", "Definition lists: self-closed tag [1]", ";one<br/>two :two-line fun");
add("selser", "Definition lists: self-closed tag [[[4,2,4,0],[2]]]", ";yedg8a2fds9m<br/>2hay3h :lwx5eqtwo-line fun");
add("selser", "Definition lists: self-closed tag [[[4,0,2,0],4]]", ";cqh580<br/>1cxv9dytwo \n: xelayq");
add("selser", "Definition lists: self-closed tag [[[2,2,0,3],[3]]]", ";1nuwfyaoneignte1<br/>two:");
add("selser", "Definition lists: self-closed tag [[[0,0,0,[3]],0]]", ";one<br/>two :two-line fun");
add("selser", "Definition lists: self-closed tag [[[0,0,0,1],0]]", ";one<br/>two :two-line fun");
add("selser", "Definition lists: self-closed tag [[[3,0,0,1],2]]", ";<br/>two \n: 1d1gzuu:two-line fun");
add("selser", "Definition lists: self-closed tag [[2,3]]", ": p5btax\n;one<br/>two ");
add("selser", "Definition lists: self-closed tag [[[0,0,2,[4]],3]]", ";one<br/>bj07h5two ");
add("selser", "Definition lists: self-closed tag [[1,0]]", ";one<br/>two :two-line fun");
add("selser", "Definition lists: ignore colons inside tags [[[3,[2,2,3,0,2],0]]]", ";<b>hpkdfptwo7k990h <i>fun:</i>yh7cjg:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[1]]", ";one <b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[2]]", ": iuxzng\n;one <b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [2]", "1cpbmsz\n\n;one <b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [1]", ";one <b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[4,[4,1,4,2,0],0]]]", ";119n669<b>1ea1k5c 1y6e936u31y8e<i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[0,[2,[4],2,3,0],0]]]", ";one <b>1pa1sdqtwo 1mkk2cc: tag :</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[2,[0,3,0,3,2],0]]]", ";1kxeineone <b>two: tag 603f0u:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[0,[0,[4],4,[3],2],0]]]", ";one <b>two 18ih7yw<i></i>onwv27:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[4,2,0]]]", ";tsk6sa1xx8ym6<b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: ignore colons inside tags [[[3,2,0]]]", ";fl1k07<b>two : tag <i>fun:</i>:</b>:def");
add("selser", "Definition lists: excess closed tags [1]", ";one</b>two :bad tag fun");
add("selser", "Definition lists: excess closed tags [2]", "1p36ay3\n\n;one</b>two :bad tag fun");
add("selser", "T13748: Literal closing tags [[0,4,3,[2],0,[3],3,0,0]]", "<dl>\n<dd>1m6oh4c</dd><dd>1twdvoftest test test test test</dd>\n<dt></dt>\n<dd>test test test test test</dd>\n</dl>");
add("selser", "Definition Lists: Hacky use to indent tables [2,0,0]", "1pj1vx9\n\n::{|\n|foo\n|bar\n|}\nthis text\nshould be left alone");
add("selser", "Definition Lists: Hacky use to indent tables [1,0,1]", "::{|\n|foo\n|bar\n|}\nthis text\nshould be left alone");
add("selser", "Definition Lists: Hacky use to indent tables [1,0,0]", "::{|\n|foo\n|bar\n|}\nthis text\nshould be left alone");
add("selser", "Definition Lists: Hacky use to indent tables [[[[2]]],0,0]", ":: hjb208\n::{|\n|foo\n|bar\n|}\nthis text\nshould be left alone");
add("selser", "Table / list interaction: indented table with lists in table contents [[[2]]]", ":wwbalm {| |- |a *b |- |c *d |}");
add("selser", "Definition Lists: colons occurring in tags [[0,4,2,1,0,[[4]],0,3,3,[[3]],0,0,2,0,0,3,2,3]]", ";a\n: k4i8ju\n: 1frp7z5\n;'''a:b'''\n;<i>1xbcbjd</i>\n;<div></div>\n;<div>a\n: tdgkhy\n:b</div>\n: 7xvywx\n");
add("selser", "Definition Lists: colons occurring in tags [2]", "1g6rrb9\n\n;a:b\n;'''a:b'''\n;<i>a:b</i>\n;<span>a:b</span>\n;<div>a:b</div>\n;<div>a\n:b</div>\n;{{echo|a:b}}\n;{{echo|''a:b''}}\n;;;''a:b''");
add("selser", "Definition Lists: colons occurring in tags [[3,3,2,1,0,[[2]],2,[3],4,3,0,1,2,0,2,1,0,[0,4,[4]]]]", ": nzvnpe\n;'''a:b'''\n;<i>1jw5jcza:b</i>\n: 17s8ytm\n;\n: 1g5wqy9\n;<div>a\n: 1xd9cpp\n:b</div>\n: fwqnl\n;{{echo|a:b}}\n;{{echo|''a:b''}}h5gm3v\n;: vhbio0\n");
add("selser", "Definition Lists: colons occurring in tags [[1,1,3,[3],0,[3],0,1,4,[1],0,3,3,0,4,0,0,2]]", ";a:b\n;\n;\n;<span>a:b</span>\n: y09n62\n;<div data-foobar=\"1n7de7p\">a:b</div>\n:b</div>\n: 1kgtm03\n;{{echo|a:b}}\n: gqtlve\n;{{echo|''a:b''}}\n;;;''a:b''");
add("selser", "Definition Lists: colons occurring in tags [[3,[4],0,[[2]],4,0,4,[4],0,[[2]],2,[[4]],2,0,0,0,0,4]]", ":b1paz2\n;'''p58ldma:b'''\n: 17zzltx\n;<i>a:b</i>\n: 1bwlhk7\n;i7sb76\n;<div>2mikjga:b</div>\n: 1qgql3b\n;<div>1yrntbc\n: 2syw3k\n:b</div>\n;{{echo|a:b}}\n: zdm48w");
add("selser", "Definition Lists: colons occurring in tags [[0,0,4,[2],3,[4],0,[[3]],4,[[3]],0,2,3,0,0,0,0,[0,0,1]]]", ";a:b\n: xpkafq\n;xtr0w1'''a:b'''\n;vfwfi4\n;<span></span>\n: xrlfdd\n;<div></div>\n: qopt54\n;<div>a\n:b</div>\n;{{echo|a:b}}\n;{{echo|''a:b''}}\n;;;''a:b''");
add("selser", "Definition Lists: colons occurring in tags [1]", ";a:b\n;'''a:b'''\n;<i>a:b</i>\n;<span>a:b</span>\n;<div>a:b</div>\n;<div>a\n:b</div>\n;{{echo|a:b}}\n;{{echo|''a:b''}}\n;;;''a:b''");
add("selser", "T2289: \">\"-token in bracketed URL [1]", "[http://www.example.com/<hello> stuff]");
add("selser", "T2289: \">\"-token in bracketed URL [2]", "13x10lq\n\n[http://www.example.com/<hello> stuff]");
add("selser", "T2289: \">\"-token in bracketed URL [[2]]", "tgqujw[http://www.example.com/<hello> stuff]");
add("selser", "T2289: literal \">\"-token in bracketed URL [1]", "[http://www.example.com/<b>html</b> stuff]");
add("selser", "T2289: literal \">\"-token in bracketed URL [2]", "sgqdyx\n\n[http://www.example.com/<b>html</b> stuff]");
add("selser", "T2289: literal \">\"-token in bracketed URL [[2]]", "1k6kax7[http://www.example.com/<b>html</b> stuff]");
add("selser", "T2289: literal double quote in bracketed URL [2]", "1sts8fr\n\n[http://www.example.com/\"hello\" stuff]");
add("selser", "T2289: literal double quote in bracketed URL [1]", "[http://www.example.com/\"hello\" stuff]");
add("selser", "T2289: literal double quote in bracketed URL [[2]]", "1nc6wue[http://www.example.com/\"hello\" stuff]");
add("selser", "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081) [2]", "17fhfw0\n\n[http://www.example.com test]");
add("selser", "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081) [[2]]", "6srwd0[http://www.example.com test]");
add("selser", "External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081) [1]", "[http://www.example.com test]");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[3],0,0,0,0,[0,[3,1]],0,[4,3,2],0,3]]", "''<nowiki/>''\n[http://example.com '''text]'''\n''Something [http://example.com ''<nowiki/>'']''\n''qkgn80o3zxsd'''\n");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [2]", "1m5psig\n\n''[http://example.com text'']\n[http://example.com '''text]'''\n''Something [http://example.com in italic'']\n''Something [http://example.com mixed''''', even bold]'''\n'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [1]", "''[http://example.com text'']\n[http://example.com '''text]'''\n''Something [http://example.com in italic'']\n''Something [http://example.com mixed''''', even bold]'''\n'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[[2,0]],3,[[2]],1,4,[0,3],0,[0,4,4],4,1]]", "''[http://example.com zyb9y3text'']''[http://example.com '''1qoymvgtext''']'''<nowiki/>'''bw748n''Something ''\n''Something adl0iw1pgmuwk''y4f27b'''''Now [http://example.com both''''']'''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[4,0,4,2,0,1,0,3,0,2]]", "1jjctz5\npqo6mlxj4zfi'''\n''Something [http://example.com in italic'']''\n\n1nkqnry'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[4,0,[2],3,3,1,2,3,0,[[0,[3,0]]]]]", "fq633s\n[http://example.com z6k6a5'''text]''Something [http://example.com in italic'']''1itz7sk\n\n'''''Now [http://example.com ''''']'''''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[[2,0]],3,[[2]],3,0,4,4,3,0,2]]", "''[http://example.com 1fl7zurtext'']''[http://example.com '''g2czgytext''']\ntkxlfzewz40l\nb43mrw'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[2,0,[[2]],0,0,3,0,2,0,[[0,2]]]]", "1su8ozt''[http://example.com text'']\n[http://example.com '''1yotag2text''']'''\n\nkcfz7g''Something [http://example.com mixed''''', even bold]'''\n'''''Now medcd9[http://example.com both''''']'''''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[0,0,[2],1,3,[4,[3,0]],4,[0,[3,4],2],0,[1]]]", "''[http://example.com text'']\n[http://example.com 1k1dra5'''text]'''<nowiki/>'''''2sgkur[http://example.com '']''chob23''Something [http://example.com 8v224l]17aioqf'<nowiki/>''\n'''''Now [http://example.com both''''']'''''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[[2,4]],3,[1],0,4,[0,[0,1]],3,2,0,[3]]]", "''[http://example.com 1fdmvh4text2yfn7v]''[http://example.com '''text''']'''10j1en2''Something [http://example.com in italic''<nowiki/>'']''16etdql''Something [http://example.com mixed''''', even bold]'''\n'''<nowiki/>'''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[3],3,[3],1,4,[3,2],0,[0,[0,2],4],0,[4]]]", "''<nowiki/>''[http://example.com]'''<nowiki/>'''5vl9nm''4r1rc2[http://example.com in italic'']''\n''Something [http://example.com mixedxdfvtk''''', even bold]1enu0jj''\n'''1cffq00'''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[[0,2]],2,[4],2,0,[4,[3,2]],3,[0,[0,3],0],0,[4]]]", "''[http://example.com texto8ckan'']''z9uyf8\n[http://example.com y33u36]y3ygwe'''\n''6qo38u[http://example.com cxfvtc'']Something [http://example.com mixed]'''\n'''fnt2s9'''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[1,2,2,0,2,[4,[0,4]],0,[0,[0,[[3]]],0],0,2]]", "''[http://example.com text'']''1dtvvhy\n1owq85s[http://example.com '''text]'''2ovole\n''1hkfcxq[http://example.com in italic4ylldq]''\n''Something [http://example.com mixed'''''<nowiki/>''''']'''\n1sxxa72'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[1],0,[4],0,0,[0,4],4,[0,1,3],3,[[4,3]]]]", "''[http://example.com text'']''\n[http://example.com 18j7tcl]'''\n''Something d5uz25''1ceigdx''Something [http://example.com mixed''''', even bold]'''9akd2o'''''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[[3],0,1,0,0,[2,[3,0]],3,[3,2,4],2,[2]]]", "''<nowiki/>''\n[http://example.com '''text]'''\n''442ldxSomething [http://example.com '']a0udil[http://example.com mixed''''', even bold]pigbwn''pn85gv\n'''26be4p''Now [http://example.com both''''']'''");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[4,2,3,2,3,[4,0],0,[0,2,0],0,0]]", "19v8d1luol8sn\n1g90nho'''''1smcwbl[http://example.com in italic'']''\n''Something 11ylls1[http://example.com mixed''''', even bold]'''\n'''''Now [http://example.com both''''']");
add("selser", "T4702: Mismatched <i>, <b> and <a> tags are invalid [[4,0,[3],4,0,4,2,3,0,2]]", "3dbdof\n[http://example.com]nssqhn\n147922y1mii58r\nuafhnx'''''Now [http://example.com both''''']");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[0,1,1]]", "[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]].][[Museo Picasso (París)|Museo Picasso]]<span data-foobar=\"1rbr6np\">.</span>");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [2]", "1ehf2a5\n\n[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]].]");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [1]", "[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]].]");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[2,0,[2]]]", "7a8apf[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]].]4wkxto.");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[[[4],4],2,0]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''t0j7dk''bc0354]692z0l");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[2,[3],[3]]]", "e6sxcx[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]].][[Museo Picasso (París)|<nowiki/>]]");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[0,0,4]]", "[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]].]<nowiki/>wn9za5");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[[4,0],0,2]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm 17uhaq0 (1901) en el sitio de ]1167r4g");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[[3,3],[4],0]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm][[Museo Picasso (París)|q6h2zv]]");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[[[2],0],2,0]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''7q2puaLa muerte de Casagemas'' (1901) en el sitio de ]1m5co9z");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[0,[3],2]]", "[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]].][[Museo Picasso (París)|<nowiki/>]]<nowiki/>b4d1d6");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[3,[3],2]]", "[[Museo Picasso (París)|<nowiki/>]]65ww3e");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[1,3,0]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de Casagemas'' (1901) en el sitio de ]");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[4,0,3]]", "1jnda7a");
add("selser", "External link containing double-single-quotes with no space separating the url from text in italics [[[1,2],2,4]]", "[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de Casagemas''1svf0oe (1901) en el sitio de ]mqtmyg6n94l9");
add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723) [[[4]]]", "[[:en:European_Robin|1rmduf6]]");
add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723) [[[2]]]", "[[:en:European_Robin|134iwocEuropean Robin]]");
add("selser", "Unclosed and unmatched quotes [[[0,0,4]],2,3,3,[1],0,4,0,1,2,[[2]],3,3,3,2,0,3,4,1,2,2]", "'''''Bold italic text '''with bold deactivatedmik1b''\n\n194mnir\n\n'''Bold text..'''\n\n1vh6b8p\n\n'''Bold tag left open\n\n118iayy\n\n''hxqm6fItalic tag left open''\n\n8zfmbl<!-- Unmatching number of opening, closing tags: -->\n\nv7yj6u\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\n1suii2h\n\n1qt3jiw\n\nPlain ''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[1],0,[1],0,[3],0,[2,2],0,4,0,4,2,4,0,3,0,4,0,[[0,[4]],0,3],0,4]", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n1vbvxxl..spanning two paragraphs (should not work).6tygj0'''\n\n750fcg\n\n1ke2xol\n\nqpzby4\n\n1fztsq9\n\n1qf0akm\n\n''Tom'''3ftppf'''''<nowiki/>'''Susan'''\n\namwrge");
add("selser", "Unclosed and unmatched quotes [[[3,0,[3]]],0,[1],0,2,2,3,0,[4],4,[4],0,0,3,0,4,[2,3,3,4,3,0],0,4,2,[0,3,4]]", "''with bold deactivated'''<nowiki/>'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n1o7p7gt\n\n'''Bold text..\n\nypestg\n\n9sn2o4\n\n1clpd1j\n\n1933mb7\n\nNormal text.<!-- Unmatching number of opening, closing tags: -->\n\nr7rcfr\n\n9vn9he'''This year''''1bex21s.\n\n23segf\n\n15xu7jn\n\nPlain 1038n5m");
add("selser", "Unclosed and unmatched quotes [4,0,3,0,2,0,0,2,4,0,[4],2,[4],2,4,0,[0,0,2,0,0,0],4,1,0,[0,2,0]]", "1dlqun5\n\n1i8pxk7\n\n'''Bold text..\n\n..spanning two paragraphs (should not work).'''\n\npzcqs\n\n1opojwd\n\n1lccvsd\n\n10rnb3g\n\nhwo4pr\n\n1nzcl3r\n\n1aa0n94\n\n'''This year'<nowiki/>'''s election phw2k7''should'' beat '''last year''''s.\n\nbg6ytl\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\nPlain muf30w''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[1],4,[2],3,3,3,1,2,2,0,2,0,2,3,4,2,[[2],3,3,0,[4],2],0,3,3,[0,4,0]]", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n1f2u2s9\n\n1h4sgyp'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n..spanning two paragraphs (should not work).'''\n\n10r6c97\n\n1g4ubk5\n\n'''Bold tag left open\n\nxni30r\n\n''Italic tag left open\n\n8iprbx\n\nNormal text.\n\n1qhnti8\n\ntfibsr\n\n'''1lug5iuThis year'''' beat '''17lidb7'''1arsznqs.\n\nPlain 16bbnhrs plain");
add("selser", "Unclosed and unmatched quotes [4,2,2,2,4,4,[0,1],0,1,2,2,0,3,0,0,0,[1,0,1,0,3,3],3,3,4,4]", "1l3cu15\n\n1o7t026\n\n1jk4d4p\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n10q0gg\n\n1rl13k4\n\njsbpho\n\n..spanning two paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left open'''\n\n1ya2gu0\n\n1kcx5d2\n\n''Italic tag left open\n\n\n<!-- Unmatching number of opening, closing tags: -->'''This year''''s election ''should'' beat \n\nuh1zef\n\n4hr9nl");
add("selser", "Unclosed and unmatched quotes [[[0,4,[2]]],4,[[3,0,1]],0,3,2,0,0,[[3]],3,3,3,0,0,0,0,3,0,[3,[4],0],0,2]", "'''''Bold italic text '''v4msrm'''1k8j03x in between.'''''\n\n8hunuj\n\n'''with italic deactivated'' in between.'''''\n\n9rlkry\n\n..spanning two paragraphs (should not work).'''\n\n'''<nowiki/>'''\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n'''i1gmy6'''s.\n\nfjxw35\n\nPlain ''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[[[4],0,0]],0,1,0,2,4,[0,1],0,2,4,4,2,0,0,0,0,[[3],3,0,0,[3],3],0,2,2,3]", "'''''vorhf2'''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\ni5kdfx\n\n'''Bold text..\n\ndjwh10\n\n..spanning two paragraphs (should not work).'''<nowiki/>'''\n\n1dwvgej\n\n'''Bold tag left open\n\n1hy1yls\n\n1qyd6on\n\n9j2kf8\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n'''<nowiki/>'''''should'' beat '''<nowiki/>'''\n\nwvw7sb\n\n''Tom'''s car is bigger than ''Susan'''s.\n\nxeyd4d\n");
add("selser", "Unclosed and unmatched quotes [[1],2,3,3,0,0,2,0,[[2]],0,[3],0,3,3,0,0,1,0,[3,0,4],4,3]", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n1bl3py2\n\n'''Bold text..\n\n12dfmgu\n\n..spanning two paragraphs (should not work).'''\n\n'''g53i9rBold tag left open'''\n\n\n<!-- Unmatching number of opening, closing tags: -->'''This year''''s election ''should'' beat '''last year''''s.\n\nSusan'''iohemb\n\n1etvtq3");
add("selser", "Unclosed and unmatched quotes [2,0,[[2,2,[3]]],3,1,3,3,0,3,4,[[4]],2,4,4,2,0,3,0,1,2,[3,4,3]]", "1f38mmi\n\n'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''u8rwj5''Bold italic text ''ywfi2hwith italic deactivated''<nowiki/>'''''\n\n'''Bold text..\n\no2egqo\n\n''p7itsn''\n\ni6ynz7\n\n1pf5uyh\n\n1f7ibb6\n\ntv3z96<!-- Unmatching number of opening, closing tags: -->\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\n67uyx0\n\nag0pjn");
add("selser", "Unclosed and unmatched quotes [2,0,[1],0,[2],0,[3,0],0,0,2,3,4,[2],2,0,3,[2,3,4,0,[4],0],0,3,3,[3,1,0]]", "1xakauy\n\n'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\nhzlrck'''Bold text..\n\n'''\n\n'''Bold tag left open\n\n71jxcx\n\nebs4fl\n\nrhouppNormal text.\n\n1u3yozz\n\n<!-- Unmatching number of opening, closing tags: -->44pvot'''This year''''6gfb4w beat '''1cdwta1'''s.\n\n''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[2],0,4,3,[2],3,3,4,[[2]],0,0,2,3,4,0,0,4,2,[[3,[4]],2,0],3,2]", "9sywqh'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n1127ewx\n\n18snsp4'''Bold text..\n\nkwdyl6\n\n'''cq1retBold tag left open'''\n\n''Italic tag left open\n\n1m173cz\n\n1uh0zvc<!-- Unmatching number of opening, closing tags: -->\n\n1o92frs\n\n111xp9u\n\n'''''15f4vm2'''''jdjuhi'''Susan'''s.\n\nzs90ic\n\nPlain ''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[[0,4,[4]]],4,[[[3],0,0]],3,4,2,[0,3],0,2,4,1,3,0,3,0,2,[3,2,[4],0,2,0],0,3,0,2]", "'''''Bold italic text '''e4eswx'''rin525'''''\n\nkycm0h\n\n'''''<nowiki/>''with italic deactivated'' in between.'''''\n\n18kp4eq\n\nafllf7\n\n..spanning two paragraphs (should not work).\n\nfbytaq\n\n'''Bold tag left open\n\nclvgvd\n\n''Italic tag left open''\n\nNormal text.<!-- Unmatching number of opening, closing tags: -->\n\n1wljmpn\n\n1yf7po2s election ''n3toxs'' beat 18vtfnx'''last year''''s.\n\n1kriell\n\nPlain ''italic'''s plain");
add("selser", "Unclosed and unmatched quotes [[[1,0,1]],3,[4],2,2,0,0,2,0,0,3,2,0,2,0,0,[[2],0,[3],3,0,4],0,[1,0,0],0,4]", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\n84mgbb\n\nzmk5su\n\n1prf6rc\n\n'''Bold text..\n\n..spanning two paragraphs (should not work).'''\n\n99j0fi\n\n'''Bold tag left open\n\ntf1r5b\n\nNormal text.\n\nko4tou\n\n<!-- Unmatching number of opening, closing tags: -->\n'''1bryg9wThis year'<nowiki/>'''s election ''<nowiki/>'''''last year'<nowiki/>'''5ugxe0\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\n16lxode");
add("selser", "Unclosed and unmatched quotes [[3],0,[1],0,3,2,1,4,4,4,4,3,[2],0,0,0,3,0,3,2,[4,3,3]]", "\n\n'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n1t7tkil\n\n..spanning two paragraphs (should not work).'''\n\n1a7e2lc\n\ngp94tg\n\nt3eyyv\n\nj7oxi3\n\n1uck7bqNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->\n1iiym73\n\n57eta6");
add("selser", "Unclosed and unmatched quotes [3,0,[2],0,[[2]],3,[3,0],0,4,4,0,0,3,2,0,3,[[4],2,4,0,3,0],2,3,3,[3,3,0]]", "\n1lkzwl3'''''Bold italic text ''with italic deactivated'' in between.'''''\n\n'''185d61gBold text..'''\n\n'''\n\n2zp9tr\n\n1d50xt4\n\n''Italic tag left open\n\n12nm7f\n\n<!-- Unmatching number of opening, closing tags: -->'''1tp4wkd'''163bqnss election um2tlp beat s.\n\nhoh73y\n\ns plain");
add("selser", "Unclosed and unmatched quotes [2,4,3,0,2,0,1,0,[3],0,[2],0,2,0,0,2,[2,2,4,0,1,0],2,4,3,4]", "1i1t83y\n\n'''''Bold italic text '''with bold deactivated''' in between.'''''\n\nmgs28i\n\n1ppsz13\n\n'''Bold text..\n\n..spanning two paragraphs (should not work).'''\n\n16xn80r''Italic tag left open\n\n14qu5k5\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->y12s55\n\n1npevcq'''This year'<nowiki/>'''1jhux5gs election ky09ea beat '''last year''''s.\n\n1i6z1zp\n\n16e2uso\n\ner47o9");
add("selser", "Unclosed and unmatched quotes [[1],2,4,0,[4],0,[4,0],0,[[2]],3,2,0,2,0,0,2,[0,2,2,0,1,0],0,1,0,2]", "'''''Bold italic text '''with bold deactivated''' in between.'''''\n\nhv4igs\n\n18k1jal\n\nho45in\n\n19jl2b8'''<nowiki/>'''\n\n'''iffcibBold tag left open'''\n\n1cppahe\n\n''Italic tag left open\n\n1qvkr1q\n\nNormal text.\n\n<!-- Unmatching number of opening, closing tags: -->e0uqhq\n\n'''This year'<nowiki/>'''sesl44s election x1edqk''should'' beat '''last year''''s.\n\n''Tom'''s car is bigger than '''''<nowiki/>'''Susan'''s.\n\n1x5ab2x\n\nPlain ''italic'''s plain");
add("selser", "A table with captions with non-default spaced attributes and a table row [[3,2,3,[4],4,[2,4]]]", "{|<!--hspjc0-->\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\"|cbsbv4<!--18yhrc2--><!--uk5rai-->\n|-\n|foo<!--1xdk3og-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[0,2,4,0,3,[4,0]]]", "{|\n<!--gn6w81-->|+style=\"color: red;\"|caption2<!--isdju7-->\n|+ style=\"color: red;\"|caption3<!--ogw8tz-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[2,0,2,3,3,3]]", "{|<!--ccnxjg-->\n|+style=\"color: red;\"|caption2<!--3gt3mj-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [2]", "1c9grfl\n{|\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\"|caption3\n|-\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[4,[3],2,0,3,[[3,4],4]]]", "{|<!--wrcota-->\n|+style=\"color: red;\"|<!--i5iaap-->\n|+ style=\"color: red;\"|caption3\n|-\n|1qgj03j<!--1mzit1t-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[2,2,0,4,2,[0,4]]]", "{|<!--yyyv97-->\n<!--1fesh1v-->|+style=\"color: red;\"|caption2\n<!--15d1qjf--><!--muo5ac-->\n|-\n|foo<!--1eapk56-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[0,[2],0,0,0,[[0,2],0]]]", "{|\n|+style=\"color: red;\"|1iu6jlncaption2\n|+ style=\"color: red;\"|caption3\n|-\n|1pyfbkm\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[2,0,3,[2],0,[2,0]]]", "{|<!--h7ysdr-->\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\"|164mjh9caption3\n<!--1f50l6s-->|-\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [1]", "{| data-foobar=\"1bvlgsc\"\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\"|caption3\n|-\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[0,[2],0,2,3,[[2,0],0]]]", "{|\n|+style=\"color: red;\"|1rn3ocecaption2\n<!--1jl20xm-->|+ style=\"color: red;\"|caption3\n|-\n|zwy3vy\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[3,4,3,0,0,1]]", "{|<!--1tq0bmd-->\n|+ style=\"color: red;\"|caption3\n|-\n|foo\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[2,3,0,[3],2,[[2,[3]],2]]]", "{|<!--1gvmoqz-->\n\n|+ style=\"color: red;\"|<!--190xj98-->\n|-\n|1qozus\n|<!--16h9zo0-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[0,0,0,1,4,3]]", "{|\n|+style=\"color: red;\"|caption2\n|+ style=\"color: red;\" data-foobar=\"96108f\" |caption3<!--hig06k-->\n|}");
add("selser", "A table with captions with non-default spaced attributes and a table row [[0,0,2,[3],3,[[0,4],0]]]", "{|\n|+style=\"color: red;\"|caption2<!--8c8urw-->\n|+ style=\"color: red;\" |\n|-\n|19jkrlo\n|}");
add("selser", "Table td-cell syntax variations [2]", "1jwii2y\n{|\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz\n|}");
add("selser", "Table td-cell syntax variations [[4,[1,4]]]", "{|<!--4cgz4o-->\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz<!--12mt387-->\n|}");
add("selser", "Table td-cell syntax variations [1]", "{| data-foobar=\"1iarw18\"\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz\n|}");
add("selser", "Table td-cell syntax variations [[3,[2,0]]]", "{|<!--kjgs8a-->\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz\n|}");
add("selser", "Table td-cell syntax variations [[4,[[2,0,2,[3],4,0,3,[3],1],2]]]", "{|<!--19byc9i-->\n|1rdjmx5\n|foo bar foo|baz\n|15gm5vi\n|foo bar foo||\n|1k8mu2s\n|style='color:red;'|baz\n||| data-foobar=\"15blb6e\" |baz<!--srur4b-->\n|}");
add("selser", "Table td-cell syntax variations [[0,[[4,0,0,1,0,0,0,4,4],0]]]", "{|\n|136i03d\n|foo bar foo|| data-foobar=\"1p5zg05\" |baz\n|style='color:red;'|baz\n|dnhd2o\n|szjqq8\n|}");
add("selser", "Table td-cell syntax variations [[0,[1,4]]]", "{|\n|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz<!--1mu375u-->\n|}");
add("selser", "Table td-cell syntax variations [[0,[[1,4,0,2,2,0,4,0,0],3]]]", "{|\n| data-foobar=\"1vo6ycz\" foo bar |baz\n|19o3nfe\n|foo bar foo\n|7m6oo8||baz\n|18jq9io\n|style='color:red;'|baz\n|57uz8w\n|style='color:red;'||baz\n|}");
add("selser", "Table td-cell syntax variations [[0,2]]", "{|\n<!--1o8bwee-->|foo bar foo|baz\n|foo bar foo||baz\n|style='color:red;'|baz\n|style='color:red;'||baz\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[4,1]]", "{|<!--iahavp-->\n|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [2]", "194wm64\n{|\n|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[0,[1,4]]]", "{|\n|- data-foobar=\"1onas0u\"\n|!style=\"color:red\"|bar<!--lnxjat-->\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [1]", "{| data-foobar=\"1esn062\"\n|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[0,[1,0]]]", "{|\n|- data-foobar=\"1djv4wn\"\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[0,1]]", "{|\n|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[0,[2,0]]]", "{|\n<!--1s7gz3l-->|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[2,2]]", "{|<!--1s8mzg5-->\n<!--1rradqq-->|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[4,[2,4]]]", "{|<!--1m6dz8p--><!--1q6udai-->\n|-\n|!style=\"color:red\"|bar<!--6x372r-->\n|}");
add("selser", "Accept \"| !\" at start of line in tables (ignore !-attribute) [[0,2]]", "{|\n<!--329kt4-->|-\n|!style=\"color:red\"|bar\n|}");
add("selser", "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 +/- [[4,[[0,0,4,3],4,[2,4,[2],[3],2,[3],[2],1],3,4,0]]]", "{|<!--thv0ap-->\n|-\n|style='color:red;'|+1\n|je9a5x<!--159s14c-->\n|-\n|1es89nf\n|lrqhh8||1vdyqyt2||\n|kmqcrp\n|||13gkdkf+2|| data-foobar=\"zh3ts2\" |-3<!--1ojj34v-->\n|}");
add("selser", "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 +/- [1]", "{| data-foobar=\"1gl68m8\"\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}");
add("selser", "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 +/- [2]", "1e44vh7\n{|\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}");
add("selser", "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 +/- [[0,1]]", "{|\n|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}");
add("selser", "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 +/- [[0,2]]", "{|\n<!--1uamx13-->|-\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1||2||3\n|1||+2||-3\n|-\n| +1\n| -1\n|}");
add("selser", "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 +/- [[3,[[3,1,0,[4]],3,4,2,[0,4,0,0],4]]]", "{|\n|-\n| style=\"color:red;\" data-foobar=\"p348lc\" |+1\n|style='color:blue;'|k4tdu0<!--1tg046q--><!--pt1fz0-->\n|-\n|hdvifu\n| -1<!--1fwsrhn-->\n|}");
add("selser", "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 +/- [[0,[[3,2,0,0],0,[2,0,1,[2],0,0,0,2],0,[0,[4],0,0],0]]]", "{|\n|-\n|miw69\n|style='color:red;'|+1\n|style='color:blue;'|-1\n|-\n|1l3081g\n|1|| data-foobar=\"4dp8jk\" |2||17cpoo03\n|1||+2\n|xy04h0||-3\n|-\n|14bux0j\n| -1\n|}");
add("selser", "Table rowspan [[3,2]]", "{| border=1<!--renghc-->\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[0,1]]", "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[2,[[2,0,3,0,4],0,[0,0,0,3],2]]]", "{| border=1<!--ydg6ad-->\n|8xt6hw\n|Cell 1, row 1\n|1hnzall\n|-\n|Cell 1, row 2\n<!--g8lme3-->\n|}");
add("selser", "Table rowspan [2]", "1tpwepb\n{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [1]", "{| border=\"1\" data-foobar=\"1u0zsbm\"\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[0,[1,0,2,0]]]", "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n<!--t7525d-->|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[3,4]]", "{| border=1<!--8klp1m-->\n|}");
add("selser", "Table rowspan [[2,2]]", "{| border=1<!--o6xkyn-->\n<!--185kocl-->|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[3,3]]", "{| border=1\n|}");
add("selser", "Table rowspan [[0,[1,0,2,2]]]", "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n<!--tpnv4l-->|-\n|Cell 1, row 2\n|Cell 3, row 2<!--ywjyk7-->\n|}");
add("selser", "Table rowspan [[3,[1,0,[0,2,0,4],2]]]", "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|x54ea5\n|Cell 1, row 2\n|nif00j<!--camaa6-->\n|}");
add("selser", "Table rowspan [[0,[[4,0,4,0,1],0,1,2]]]", "{| border=1\n|laz5jy\n|e00dac\n| data-foobar=\"1lnc803\" |Cell 3, row 1\n|- data-foobar=\"3dh7h3\"\n|Cell 1, row 2\n|Cell 3, row 2<!--1k13wan-->\n|}");
add("selser", "Table rowspan [[0,3]]", "{| border=1\n|}");
add("selser", "Table rowspan [[0,4]]", "{| border=1\n<!--2w2uxw-->|}");
add("selser", "Table rowspan [[4,1]]", "{| border=1<!--qh3w0u-->\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[0,[2,0,4,0]]]", "{| border=1\n<!--nmk7t4-->|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n<!--zfwgha-->\n|}");
add("selser", "Table rowspan [[2,1]]", "{| border=1<!--14qbjv1-->\n|Cell 1, row 1\n| rowspan=\"2\" |Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n|Cell 1, row 2\n|Cell 3, row 2\n|}");
add("selser", "Table rowspan [[3,[1,0,[0,1,0,2],4]]]", "{| border=1\n|Cell 1, row 1\n|rowspan=2|Cell 2, row 1 (and 2)\n|Cell 3, row 1\n|-\n| data-foobar=\"xi77y6\" |Cell 1, row 2\n|wc2ose\n|Cell 3, row 2<!--14jwgmk-->\n|}");
add("selser", "Nested table [[0,[1,4]]]", "{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again<!--1lj2axn-->\n|}");
add("selser", "Nested table [[0,2]]", "{| border=1\n<!--4a15up-->| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [2]", "1v9epga\n{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [[0,3]]", "{| border=1\n|}");
add("selser", "Nested table [[2,[4,2]]]", "{| border=1<!--q9xsl-->\n<!--qrxi94--><!--r50nmy-->\n|}");
add("selser", "Nested table [[2,3]]", "{| border=1<!--oxuram-->\n|}");
add("selser", "Nested table [[4,1]]", "{| border=1<!--415rzt-->\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [1]", "{| border=\"1\" data-foobar=\"1x647n6\"\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [[3,2]]", "{| border=1<!--a6wva0-->\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [[2,1]]", "{| border=1<!--6890pa-->\n| &alpha;\n|\n{| bgcolor=\"#ABCDEF\" border=\"2\"\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [[3,[3,0]]]", "{| border=1\n|}");
add("selser", "Nested table [[0,[[[4,0],0,4,2,1],3]]]", "{| border=1\n|1aokhi5&alpha;\n|14zv42q\n|p6svuj\n| data-foobar=\"yd3jrc\" |the original table again\n|}");
add("selser", "Nested table [[3,[1,4]]]", "{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again<!--1ug56z6-->\n|}");
add("selser", "Nested table [[0,4]]", "{| border=1\n<!--3j9op3-->|}");
add("selser", "Nested table [[0,[[1,2,[3,4],0,4],2]]]", "{| border=1\n| data-foobar=\"1j0u5p5\" | &alpha;\n|yn4ogm\n|1auu2z2\n|1wca08l<!--1g3cfq9-->\n|}");
add("selser", "Nested table [[0,[1,2]]]", "{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again<!--99zni7-->\n|}");
add("selser", "Nested table [[0,1]]", "{| border=1\n| &alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table again\n|}");
add("selser", "Nested table [[0,[[2,0,[4,[0,[0,0,[0,3],2]]],0,0],4]]]", "{| border=1\n|4n52hy\n| &alpha;\n|1pd7ii1\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n<!--56kp43-->\n|}\n|the original table again<!--14gs8h-->\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[4,2]]", "{|<!--notxkw--><!--s750wu-->\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (T3830) [2]", "1i126sf\n{|\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (T3830) [1]", "{| data-foobar=\"1yw7tah\"\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[0,2]]", "{|\n<!--ray8td-->|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[3,[2,3]]]", "{|<!--96g5z4-->\n|Cell:|broken\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[0,[[[3]],4]]]", "{|\n|Cell:|<!--14x9lr4-->\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[0,[1,4]]]", "{|\n|Cell:|broken<!--g4popb-->\n|}");
add("selser", "Invalid attributes in table cell (T3830) [[3,2]]", "{|<!--ep030l-->\n|Cell:|broken\n|}");
add("selser", "Element attributes with double ! should not be broken up by <th> [[3,[[[0,4,0]],0]]]", "{|\n!hi \nrgsfem\n ho\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[3,[[[2],2,[2]],4]]]", "{| <span>boo</span> style='border:1px solid black'\n| <span>boo</span> style='color:blue' |erkdht 1\n|1pjart5\n| style=\"color:blue\" boo |12g0bj4 2<!--10bq6ao-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,4]]", "{| <span>boo</span> style='border:1px solid black'\n<!--qbah7k-->|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [1]", "{| style=\"border:1px solid black\" data-foobar=\"12li3bp\" boo\n| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[2,3]]", "{| <span>boo</span> style='border:1px solid black'<!--f5mmfl-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[4,[[1,0,[3]],2]]]", "{| <span>boo</span> style='border:1px solid black'<!--hj82pd-->\n| style=\"color:blue\" data-foobar=\"1tzva8q\" boo | 1\n|<span>boo</span> style='color:blue'|<!--1cqigek-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[2,[3,0]]]", "{| <span>boo</span> style='border:1px solid black'<!--y1gy1a-->\n\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,[1,0]]]", "{| <span>boo</span> style='border:1px solid black'\n| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,1]]", "{| <span>boo</span> style='border:1px solid black'\n| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [2]", "1q63vep\n{| <span>boo</span> style='border:1px solid black'\n| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[2,[[3,0,2],0]]]", "{| <span>boo</span> style='border:1px solid black'<!--13g6mx9-->\n|12327is\n| style=\"color:blue\" boo | 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,3]]", "{| <span>boo</span> style='border:1px solid black'\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[4,4]]", "{| <span>boo</span> style='border:1px solid black'<!--113xtzc--><!--1nrttpq-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[4,3]]", "{| <span>boo</span> style='border:1px solid black'<!--104u18f-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,[1,4]]]", "{| <span>boo</span> style='border:1px solid black'\n| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2<!--6yyxor-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,2]]", "{| <span>boo</span> style='border:1px solid black'\n<!--b2ndhe-->| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,[2,0]]]", "{| <span>boo</span> style='border:1px solid black'\n<!--1g1y7cp-->| <span>boo</span> style='color:blue' | 1\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[3,4]]", "{| <span>boo</span> style='border:1px solid black'<!--1afrey0-->\n|}");
add("selser", "Invalid text in table attributes should be preserved by selective serializer [[0,[[3,0,0],0]]]", "{| <span>boo</span> style='border:1px solid black'\n\n|<span>boo</span> style='color:blue'| 2\n|}");
add("selser", "Build table with {{!}} [2]", "1qdcx7i\n{{{!}} class=\"wikitable\"\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [1]", "{{{!}} class=\"wikitable\" data-foobar=\"19t9aza\"\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[0,2]]", "{{{!}} class=\"wikitable\"\n<!--xj13jp-->!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[4,[4,0,2,0]]]", "{{{!}} class=\"wikitable\"<!--10ycvqs--><!--9gia5n-->\n<!--1giwdnr-->{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[4,2]]", "{{{!}} class=\"wikitable\"<!--1rp4y4q--><!--hcbeb0-->\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[2,2]]", "{{{!}} class=\"wikitable\"<!--y650rv-->\n<!--1uosyvo-->!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[4,1]]", "{{{!}} class=\"wikitable\"<!--1fkinqk-->\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with {{!}} [[3,1]]", "{{{!}} class=\"wikitable\"\n!header\n!second header\n{{!}}- style=\"color:red;\"\n{{!}}data{{!}}{{!}} style=\"color:red;\" {{!}}second data\n{{!}}}");
add("selser", "Build table with pipe as data [[4,[[[3],4,[2]],4,1,3,1,0,[2,[3],0],3]]]", "{| class=\"wikitable\"<!--xg0u8a-->\n!\n!d7701x\n!1tbn79zsecond header<!--1m7bm59-->\n|- style=\"color:red;\" data-foobar=\"r8fxpk\"\n|data|| style=\"color:red;\" |second data\n|- data-foobar=\"uclhfr\"\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n|5k1hnz\n|||||second data with |\n|}");
add("selser", "Build table with pipe as data [[4,2]]", "{| class=\"wikitable\"<!--scocw0--><!--1pczk3f-->\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [[3,2]]", "{| class=\"wikitable\"<!--vu7fc-->\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [2]", "16o0w77\n{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [1]", "{| class=\"wikitable\" data-foobar=\"160k0or\"\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [[4,[[[4],3,2],2,[0,[3],3],0,[0,1,[2]],4,2,0]]]", "{| class=\"wikitable\"<!--ijw0rv-->\n!s1bdux\n!1d2jp94\n!second header<!--1u387xw-->\n|- style=\"color:red;\"\n|\n|-\n| style=\"color:red;\" data-foobar=\"werz9z\" |<nowiki>data with | </nowiki>|| style=\"color:red;\" |1yfsrz1 second data with |<!--bcsnts--><!--1aq02o8-->\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [[0,1]]", "{| class=\"wikitable\"\n!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Build table with pipe as data [[0,[[3,0,4],0,[3,2,4],0,0,3,[3,3,4],0]]]", "{| class=\"wikitable\"\n|gbqns6\n|- style=\"color:red;\"\n|1yui9cn\n|data\n|qqjnv4\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n|16m5q2m\n|}");
add("selser", "Build table with pipe as data [[2,2]]", "{| class=\"wikitable\"<!--zawjqo-->\n<!--1on9zub-->!header\n!second header\n|- style=\"color:red;\"\n|data|| style=\"color:red;\" |second data\n|-\n| style=\"color:red;\" |data with | || style=\"color:red;\" | second data with |\n|-\n||data with | |||second data with |\n|}");
add("selser", "Piped link with multiple pipe characters in link text [1]", "[[Main Page||The|Main|Page|]]");
add("selser", "Piped link with multiple pipe characters in link text [2]", "zoince\n\n[[Main Page||The|Main|Page|]]");
add("selser", "Piped link with multiple pipe characters in link text [[2]]", "3b7j8e[[Main Page||The|Main|Page|]]");
add("selser", "<nowiki> inside a link [[0,2,0,[0,1]]]", "[[Mainxsq4rf<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("selser", "<nowiki> inside a link [[0,2,0,3]]", "[[Main1rvhx46<nowiki> Page</nowiki>]] ");
add("selser", "<nowiki> inside a link [1]", "[[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("selser", "<nowiki> inside a link [[0,0,0,1]]", "[[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("selser", "<nowiki> inside a link [2]", "1kg3djm\n\n[[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("selser", "<nowiki> inside a link [[0,2,0,1]]", "[[Mainepwrl2<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]");
add("selser", "<nowiki> inside a link [[2,2,0,[0,4]]]", "u5qm6t[[Mainp758n<nowiki> Page</nowiki>]] [[Main Page|the main page 1v6pedl]]");
add("selser", "<nowiki> inside a link [[0,1,0,3]]", "[[Main<nowiki> Page</nowiki>]] ");
add("selser", "2. Interaction of linktrail and template encapsulation [1]", "{{echo|Some [[Fool]]}}");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,2,[[4,2]],3,4,3,2]", "175ks3d\n\n[[Foo|173exoy148kdsg''bar'']]\n\n6xbp9z\n\npyd6c8\n\n[http://wp.org ''foo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [0,3,1,0,1,0,1]", "[[Foo| bar]]\n\n[[Foo| ''bar'']]\n\n[http://wp.org foo]\n\n[http://wp.org ''foo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [[[2]],0,[[2,3]],3,4,4,0]", "[[Foo|tv7jco bar]]\n\n[[Foo|vr2v1d ]]\n\n7oogb6\n\n1yp7ufe\n\n[http://wp.org ''foo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [[[3]],4,2,2,2,4,0]", "[[Foo|<nowiki/>]]\n\npdshi7\n\n1r9qk0i\n\n[[Foo| ''bar'']]\n\nk6mkmq\n\n1yhdkfq\n\n[http://wp.org foo]\n\n1tdly6y\n\n[http://wp.org ''foo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [2,4,[2],4,2,0,4]", "1fzcpcf\n\n[[Foo| bar]]\n\nmq4rz4\n\n1nzfla4[[Foo| ''bar'']]\n\n1hc5q72\n\ng5tdbo\n\n[http://wp.org foo]\n\nv11lff");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,0,1,3,0,0,[[[2]]]]", "\n[[Foo| ''bar'']]\n\n[http://wp.org foo]\n\n[http://wp.org ''12l9a3wfoo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [2,4,2,0,[2],2,4]", "121ys1z\n\n[[Foo| bar]]\n\nua7f0u\n\n1dics83\n\n[[Foo| ''bar'']]\n\n1pjll8i[http://wp.org foo]\n\n1krfxu7\n\nmwg6b3");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,4,2,2,2,0,4]", "1ft87cu\n\n13xu2qq\n\n[[Foo| ''bar'']]\n\n15lnhl6\n\n1djvh1q\n\n[http://wp.org foo]\n\n1rzfwwg");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [0,2,1,3,[[4]],3,0]", "[[Foo| bar]]\n\np3atih\n\n[[Foo| ''bar'']]\n\n[http://wp.org rop4jb]\n\n[http://wp.org ''foo'']");
add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved [3,4,4,2,2,4,0]", "1bj9bbq\n\n11icu1m\n\n1f2hrph\n\n1d06nta\n\n[http://wp.org foo]\n\n1npgg6a\n\n[http://wp.org ''foo'']");
add("selser", "Interwiki link encoding conversion (T3636) [[[3],2,[2]]]", "*\n* edo4is\n*1k978vr[[:Wikipedia:ro:Olteniţa]]");
add("selser", "Different interwiki prefixes mapping to the same URL [[1],0,4,0,1,0,3,0,[1],0,[3],0,[1]]", "[[:en:Foo]]\n\nv7i85g\n\n[[wikipedia:Foo]]\n\n[[:wikipedia:en:Foo]]\n\n[[: wikiPEdia :Foo]]");
add("selser", "Different interwiki prefixes mapping to the same URL [4,0,[[3]],0,1,0,[[4]],2,0,0,[1],4,1]", "1l14vkx\n\n[:en:Foo]\n\n[[wikipedia:Foo]]\n\n[[:wikipedia:Foo|nbuvsk]]\n\nk4ccf8\n\n[[wikipedia:en:Foo]]\n\n[[:wikipedia:en:Foo]]\n\n1gr9ugr\n\n[[: wikiPEdia :Foo]]");
add("selser", "Different interwiki prefixes mapping to the same URL [2,0,[[4]],3,3,0,[[3]],0,1,3,0,3,[2]]", "1belm8p\n\n[[:en:Foo]]\n\n[[:en:Foo|jvi0fn]]\n\n[:wikipedia:Foo]\n\n[[:wikipedia:en:Foo]]\n\n[[:wikipedia:en:Foo]]\n\nrqndks[[ wikiPEdia :Foo]]");
add("selser", "Different interwiki prefixes mapping to the same URL [4,3,[[2]],2,[2],0,4,4,[[4]],4,[[2]],3,[4]]", "1vnl7bc\n\n[[:en:Foo|1mo1igaFoo]]\n\n15p8av9\n\nt1tnk7[[:wikipedia:Foo]]\n\nik65u\n\ncp91v8\n\n[[wikipedia:en:Foo|vzo3uh]]\n\n1hyadw9\n\n[[:wikipedia:en:Foo|11hwcmxwikipedia:en:Foo]]\n\n8ja2ps");
add("selser", "Parsoid: recognize interwiki links without a target page [2,2,1]", "13h7yqp\n\n[[:es:]]\n\nn76wcf\n\n[[ko:]]");
add("selser", "Parsoid: recognize interwiki links without a target page [[2],2,1]", "1fz9jlc[[:es:]]\n\n2alzzr\n\n[[ko:]]");
add("selser", "Parsoid: recognize interwiki links without a target page [1,4,1]", "[[:es:]]\n\neviwhn\n\n[[ko:]]");
add("selser", "Handling html with a div self-closing tag [0,0,4,0,1,0,1,0,3,4,3]", "<div title />\njvfv9u\n<div title=\"\" data-foobar=\"19amz5u\" />\n<div title=\"bar\" data-foobar=\"2c0zl1\" />\nunjgxk");
add("selser", "Handling html with a div self-closing tag [0,2,3,0,1,3,4,0,0,0,2]", "<div title />z4hu3d\n\n<div title=\"\" data-foobar=\"1ejw30m\" />zpk4k0\n<div title=bar/>\n9vzhbx<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,2,0,2,0,0,1,2,4,3,1]", "<div title />z1wu6q\n<div title/>prls0w\n<div title/ >\n<div title=\"bar\" data-foobar=\"17m8bl0\" />7xb62b\najpkh9<div title=\"bar/\" data-foobar=\"z4xusc\">");
add("selser", "Handling html with a div self-closing tag [4,0,0,0,0,2,2,0,0,0,2]", "17js8jr\n<div title/>\n<div title/ >1sl6yr4\nj86h3u<div title=bar />\n<div title=bar/>\n71wkc8<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,0,1,0,3,3,1,0,0,4,1]", "<div title />\n<div title=\"\" data-foobar=\"kuianq\" />\n<div title=\"bar\" data-foobar=\"d3lywh\" />\n<div title=bar/>8qwvdo<div title=\"bar/\" data-foobar=\"zn1z6g\">");
add("selser", "Handling html with a div self-closing tag [0,0,1,4,2,0,0,0,1,0,3]", "<div title />\n<div title=\"\" data-foobar=\"astgig\" />n4ykie\n\nu11p60<div title/ >\n<div title=bar />\n<div title=\"bar\" data-foobar=\"nqc0ik\" />\n");
add("selser", "Handling html with a div self-closing tag [3,3,0,3,0,0,0,4,0,0,4]", "<div title/><div title/ >\n<div title=bar />1a5ysvn<div title=bar/>\n1epa8go");
add("selser", "Handling html with a div self-closing tag [0,4,0,2,2,0,3,0,1,0,0]", "<div title />pj334<div title/>apzedi\n1xwesye<div title/ >\n\n<div title=\"bar\" data-foobar=\"1qj5vpn\" />\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,2,4,0,3,2,0,0,4,0,0]", "<div title />tjb6dh\n1ibpo8e\n\n1wcjhry\n<div title=bar />\n4df8qj\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,0,4,3,3,3,2,0,4,0,0]", "<div title />\n6gy6kj\n\n1mubaek<div title=bar />\n8b6667\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,0,0,2,4,4,4,3,4,0,0]", "<div title />\n<div title/>7t1yln\n1ivritn\n\nc6n0ng\n\n1pckjyk\n\ngs8izm\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,3,1,0,4,4,0,0,0,0,0]", "<div title /><div title=\"\" data-foobar=\"4aihok\" />\np8c5dz\n\n1ey5oam<div title=bar />\n<div title=bar/>\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,3,0,4,1,4,0,0,1,3,3]", "<div title /><div title/>1x4v9t<div title=\"\" data-foobar=\"13fsp5c\" />15o6dtj<div title=bar />\n<div title=\"bar\" data-foobar=\"yo0en4\" />");
add("selser", "Handling html with a div self-closing tag [2,4,0,0,0,0,1,4,0,2,0]", "1vjlvfp<div title />wb572n<div title/>\n<div title/ >\n<div title=\"bar\" data-foobar=\"1wu7uip\" />1hrodml<div title=bar/>5oc9rg\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,3,3,3,3,2,1,4,4,2,0]", "<div title />ble28j\n<div title=\"bar\" data-foobar=\"16ep6fo\" />15sgjwf\n\n171bi8o\n\n1pt4q40\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [2,3,4,2,0,2,0,0,0,0,3]", "1qmlct6<div title />rdd5tt\n\n15upwgi\n<div title/ >y0ozfw\n<div title=bar />\n<div title=bar/>\n");
add("selser", "Handling html with a div self-closing tag [0,4,3,0,0,3,0,0,0,0,0]", "<div title />qvj9pt\n<div title/ ><div title=bar />\n<div title=bar/>\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [1,0,0,0,4,0,0,2,0,0,0]", "<div title=\"\" data-foobar=\"1jrnhkp\" />\n<div title/>\ndc0bic\n<div title=bar />2o9mnz\n<div title=bar/>\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,0,4,0,0,0,0,0,0,0,0]", "<div title />\nzhc338\n<div title/ >\n<div title=bar />\n<div title=bar/>\n<div title=bar/ >");
add("selser", "Handling html with a div self-closing tag [0,0,3,0,2,2,4,4,3,0,2]", "<div title />\n\nllols<div title/ >1fm62we\nsm7wkf\n\n2059dm\n1arbu5k<div title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,2,2,0,0,3,0,4,0,0,0]]", "<br title />o8ausi\n1gctyyh<br title/>\n<br title/ ><br title=bar />m332j0<br title=bar/>\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [2]", "1y2q7tc\n\n<br title />\n<br title/>\n<br title/ >\n<br title=bar />\n<br title=bar/>\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [1]", "<br title />\n<br title/>\n<br title/ >\n<br title=bar />\n<br title=bar/>\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,2,2,3,0,2,1,0,4,2,2]]", "<br title />qrel0a\np3ru21<br title/><br title/ >pvacdo\n<br title=\"bar\" data-foobar=\"13hyw0g\" />\nzmo7f6fahzji\n1hmlxn8<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,4,4,4,3,0,4,2,0,2,0]]", "<br title />5jdb981tm0zvcn6g1l8\nmzsha812ib2r2\n<br title=bar/>1g8m4z9\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,0,2,4,0,2,3,2,0,4,0]]", "<br title />\ni6j9kq<br title/>9xwro3<br title/ >l1tvpp\n10871ty\n<br title=bar/>zfhohe<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[2,0,0,3,0,0,0,4,0,0,0]]", "1ntjcv<br title />\n<br title/><br title/ >\n<br title=bar />mzv3ry<br title=bar/>\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[3,0,0,2,4,4,0,0,0,3,2]]", "\n<br title/>1lsqe95\namppw11msaq6m<br title=bar />\n<br title=bar/>r3efml<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,4,1,4,1,0,0,0,0,3,0]]", "<br title />64twqw<br title=\"\" data-foobar=\"1jexc20\" />5ffnv3<br title=\"\" data-foobar=\"1jcwr50\" />\n<br title=bar />\n<br title=bar/><br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[2,2,0,2,0,0,0,0,0,0,1]]", "94vr30<br title />p478z7\n<br title/>18la5wu\n<br title/ >\n<br title=bar />\n<br title=bar/>\n<br title=\"bar/\" data-foobar=\"loeblv\">");
add("selser", "Handling html with a br self-closing tag [[0,0,0,4,2,4,1,0,3,0,0]]", "<br title />\n<br title/>1uyznsuz3x213<br title/ >fqmtv7<br title=\"bar\" data-foobar=\"1ct1fsd\" />\n\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[1,0,4,0,0,4,0,2,0,0,0]]", "<br title=\"\" data-foobar=\"4ysrp4\" />\n15btxql\n<br title/ >1u9pb6m<br title=bar />c5w6ju\n<br title=bar/>\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,0,0,2,1,0,0,2,4,0,0]]", "<br title />\n<br title/>10lzesr\n<br title=\"\" data-foobar=\"101o9rd\" />\n<br title=bar />1f0n62z\n1mzfbff\n<br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[0,0,0,4,0,0,2,0,3,0,4]]", "<br title />\n<br title/>b75xs8<br title/ >\n3wx1j8<br title=bar />\n\ne5fb7p");
add("selser", "Handling html with a br self-closing tag [[0,3,0,2,0,4,0,2,0,3,3]]", "<br title /><br title/>111nxfi\n<br title/ >12oukc0<br title=bar />1cg9f9c\n<br title=bar/>");
add("selser", "Handling html with a br self-closing tag [[1,3,0,0,4,0,2,0,0,3,0]]", "<br title=\"\" data-foobar=\"1gesbxi\" /><br title/>\n1wru1kg\n1p73cug<br title=bar />\n<br title=bar/><br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[4,0,0,0,3,2,0,3,0,3,0]]", "e9yw1e\n<br title/>\n75h4hh\n<br title=bar /><br title=bar/><br title=bar/ >");
add("selser", "Handling html with a br self-closing tag [[3,0,3,0,2,0,3,3,0,2,0]]", "\nl45js8<br title/ >\n<br title=bar/>19e7fe0\n<br title=bar/ >");
add("selser", "Horizontal ruler (should it add that extra space?) [2,2,4,3,3,0,3]", "1cw4y9e<hr>oydu6n\n1h6c8go<hr\n>");
add("selser", "Horizontal ruler (should it add that extra space?) [2,2,0,2,[3],0,[4]]", "1892m5z<hr>w02gq0\n<hr >19u2m1n\n<hr\n>9ijqo5");
add("selser", "Horizontal ruler (should it add that extra space?) [0,4,3,4,2,0,2]", "<hr>shhmrb\n\n1ud6cvr\n\n12w3kcj\n\nfoo <hr\n>1sdr30p\n\n<nowiki> </nowiki>bar");
add("selser", "Horizontal ruler (should it add that extra space?) [2,0,0,2,4,2,1]", "1ywl4gt<hr>\n<hr >tzldct\n2bf7sy\n\n1yd6tyi<hr\n> bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,4,3,4,1,4,[2]]", "<hr>9vf7rn\n\ngbrc0t\n\nfoo \n\n1gcpr1u\n\n1ru4qsf bar");
add("selser", "Horizontal ruler (should it add that extra space?) [1,0,0,0,2,0,4]", "<hr data-foobar=\"1xoxm94\" />\n<hr >\n2nfq8i\n\nfoo <hr\n>dys25r");
add("selser", "Horizontal ruler (should it add that extra space?) [2,3,0,0,[4],3,2]", "1bo4wvx<hr><hr >\nptm7th\n\n15ki7zh\n\n<nowiki> </nowiki>bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,4,1,4,0,4,[2]]", "<hr>mf2gbr<hr data-foobar=\"1dqu75s\" />1y25uxn\n\nfoo \n\n1iwm3fg\n\n1ibkqnw bar");
add("selser", "Horizontal ruler (should it add that extra space?) [3,3,1,0,0,0,0]", "<hr data-foobar=\"16993ao\" />\nfoo <hr\n> bar");
add("selser", "Horizontal ruler (should it add that extra space?) [4,0,0,3,2,3,[2]]", "1tc12vq\n<hr >1r8pf3d\n\nfoo \n\n32ivri bar");
add("selser", "Horizontal ruler (should it add that extra space?) [1,3,0,3,0,3,[3]]", "<hr data-foobar=\"15g99qk\" /><hr >foo \n\n");
add("selser", "Horizontal ruler (should it add that extra space?) [0,0,0,0,[4],0,1]", "<hr>\n<hr >\n4kqq89<hr\n> bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,3,3,2,4,1,3]", "<hr>p9n9hx\n1ps013j<hr data-foobar=\"1mqm1za\">");
add("selser", "Horizontal ruler (should it add that extra space?) [3,4,4,2,3,0,0]", "1bpdtc3\n\n1fyl8sa\n\n1ex5ysd\n<hr\n> bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,0,1,0,[3],0,3]", "<hr>\n<hr data-foobar=\"xqmaaw\" />\n<hr\n>");
add("selser", "Horizontal ruler (should it add that extra space?) [1,2,4,2,1,0,0]", "<hr data-foobar=\"19fgz9j\" />5kiaq2\n1bg0ar5\n\ne88kgo\nfoo <hr\n> bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,0,0,4,0,3,0]", "<hr>\n<hr >77m2g8\n\nfoo \n\n<nowiki> </nowiki>bar");
add("selser", "Horizontal ruler (should it add that extra space?) [0,0,0,3,4,1,0]", "<hr>\n<hr >ppkc4e<hr data-foobar=\"u8tr71\"> bar");
add("selser", "Mixed list [3,0,0]", "#**Level 3, but ordered");
add("selser", "Mixed list [2,0,[[3]]]", "1ln2r7e\n\n*Mixed list\n*#with numbers\n**and bullets\n*#and numbers\n*bullets again\n**bullet level 2\n***bullet level 3\n***#Number on level 4\n**bullet level 2\n**#Number on level 3\n**#Number on level 3\n*#number level 2\n*Level 1\n***Level 3\n#");
add("selser", "Nested lists 3 (first element empty) [2]", "1rwjwtv\n\n*\n**bar");
add("selser", "Nested lists 3 (first element empty) [1]", "*\n**bar");
add("selser", "Nested lists 3 (first element empty) [[2]]", "* 10whdfl\n*\n**bar");
add("selser", "Nested lists 6 (both elements empty) [1]", "*\n**");
add("selser", "Nested lists 6 (both elements empty) [2]", "1ubvum0\n\n*\n**");
add("selser", "Nested lists 6 (both elements empty) [[2]]", "* 1mfyy4i\n*\n**");
add("selser", "List interrupted by empty line or heading [4,2,2,0,0,0,[[4]]]", "1011ox6\n\n1s9zz7e\n\n1bpj5vc\n\n**bar\n==A heading==\n*m5ifx8");
add("selser", "List interrupted by empty line or heading [[4],4,0,0,1,0,4]", "* hxdonh\n\non3o28\n\n**bar\n==A heading==\n1xbqoyk");
add("selser", "List interrupted by empty line or heading [3,0,3,4,0,0,1]", "\n1atcar0\n\n==A heading==\n*Another list item");
add("selser", "List interrupted by empty line or heading [3,0,2,4,2,0,[[2]]]", "\n1t8zafz\n\n**bar\n\n1b32yqy\n\nux8im\n\n==A heading==\n*cfr1ezAnother list item");
add("selser", "List interrupted by empty line or heading [[1],3,3,0,[3],0,[1]]", "*foo\n\n==<nowiki/>==\n*Another list item");
add("selser", "List interrupted by empty line or heading [[[4]],3,2,0,1,4,1]", "*f3o1md\n\n1g01lsb\n\n**bar\n==A heading==\n11s9oe7\n\n*Another list item");
add("selser", "Unbalanced closing non-block tags don't break a list [1]", "<span data-foobar=\"1fqnc7r\">\n*a</span><span>\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,[[4,4],0,2]]]", "<span>\n*tf6ok9dcxgha\n* cxwg3j\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [2]", "15379hl<span>\n*a</span><span>\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[4,[0,0,[2]]]]", "<span>15ah5wy\n\n*a</span><span>\n*q2t21gb");
add("selser", "Unbalanced closing non-block tags don't break a list [[2,[[4,0],3,0]]]", "<span>1krxkwc\n\n*1mbsuej<span>\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,[[3,0],0,3]]]", "<span>\n*<span>\n");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,[2,0,[4]]]]", "<span>\n\n* rzlphr\n*a</span><span>\n*1o6pzak");
add("selser", "Unbalanced closing non-block tags don't break a list [[2,[2,0,4]]]", "<span>1ejnj9m\n\n* 1wj8gd7\n*a</span><span>\n* 1t4vrcq");
add("selser", "Unbalanced closing non-block tags don't break a list [[3,2]]", "<span>12op402\n\n*a</span><span>\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,1]]", "<span>\n*a</span><span>\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,[4,0,0]]]", "<span>\n\n* j87csm\n*b</span>");
add("selser", "Unbalanced closing non-block tags don't break a list [[0,[1,0,[2]]]]", "<span>\n*a<span>\n*guut7sb");
add("selser", "Unbalanced closing non-block tags don't break a list [[3,[0,2,0]]]", "<span>\n\n*a</span><span>\n* 1ef95bs\n*b</span>");
add("selser", "Table with missing opening <tr> tag [[2,[[4,3],3]]]", "<table><!--1tf32as-->\n<td>1pozjc1</td></tr>\n</table>");
add("selser", "Table with missing opening <tr> tag [[2,[0,3]]]", "<table><!--1ch5rmb-->\n<td>foo</td>\n</tr>\n</table>");
add("selser", "Template with invalid target containing tags [2]", "14gbmgd\n\n{{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing tags [[3,3,3,0,4,0,2,0,0]]", "{{echo|foo}}122zygl{{echo|a}}iovjgt={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[3,[4],2,0,0,0,3,0,0]]", "<b>bagzg7</b>x43r01|{{echo|foo}}|{{echo|a}}{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [1]", "<nowiki>{{a</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[2,[2],4,0,2,0,0,0,0]]", "<nowiki>6fh1ne{{a</nowiki><b>ewrzqfb</b>16xx6fh{{echo|foo}}b2rfjv|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[0,[2],2,0,0,0,3,0,0]]", "<nowiki>{{a</nowiki><b>qynbnub</b>1c8yos2|{{echo|foo}}|{{echo|a}}{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[0,2,0,0,0,0,4,0,0]]", "<nowiki>{{aiian39</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}1yn79wf{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[2,0,0,0,4,0,0,0,0]]", "<nowiki>1urdb0z{{a</nowiki><b>b</b>|{{echo|foo}}e9y82q{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[0,0,4,0,0,0,0,0,0]]", "<nowiki>{{a</nowiki><b>b</b>175dtji{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags [[4,1,0,0,4,0,3,0,0]]", "b16sm<b data-foobar=\"1fjn19g\">b</b>|{{echo|foo}}1qngxs8{{echo|a}}{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [1]", "<nowiki>{{a</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing unclosed tag [[0,1]]", "<nowiki>{{a</nowiki><b data-foobar=\"ko3jgc\">|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [[4,2]]", "q1xph61brak71<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing unclosed tag [[3,[0,0,4,0,3,0,0]]]", "<b>|{{echo|foo}}tsfkfk{{echo|a}}{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [[0,[4,0,0,0,3,0,0]]]", "<nowiki>{{a</nowiki><b>19r2jlp{{echo|foo}}|{{echo|a}}{{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [[3,[4,0,0,0,0,0,0]]]", "<b>i84j51{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [2]", "19xdeji\n\n{{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing unclosed tag [[0,[3,0,0,0,2,0,0]]]", "<nowiki>{{a</nowiki><b>{{echo|foo}}|{{echo|a}}1rbm25o={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [[2,2]]", "<nowiki>mcg2mj{{a1e60gsv</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing wikilink [2]", "1ytvukb\n\n{{[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [1]", "<nowiki>{{</nowiki>[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[3,0,0]]", "[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[2,0,0]]", "<nowiki>1cswm3n{{</nowiki>[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[0,[2],0]]", "<nowiki>{{</nowiki>[[Main Page|vv392sMain Page]]}}");
add("selser", "Template with invalid target containing wikilink [[4,2,0]]", "w6cqtiwz6hya[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[3,[4],0]]", "[[Main Page|y475kz]]}}");
add("selser", "T2553: link with two variables in a piped link [1]", "{| data-foobar=\"zmx7dq\"\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[3,2]]", "{|<!--197bpun-->\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[0,2]]", "{|\n<!--qmaiq1-->|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[0,1]]", "{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[4,[[[2,0,0,0,0]],0]]]", "{|<!--qmjs41-->\n|q9ijzz[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [2]", "1gosfky\n{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[3,[[[2,0,0,0,3]],0]]]", "{|\n|3muk97[[{{{1}}}|{{{2}}}\n|}");
add("selser", "T2553: link with two variables in a piped link [[0,[1,0]]]", "{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[3,1]]", "{|\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "T2553: link with two variables in a piped link [[4,1]]", "{|<!--1pngny4-->\n|[[{{{1}}}|{{{2}}}]]\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [1]", "{| data-foobar=\"1ri2w66\"\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[0,1]]", "{|\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[0,[[[2,0,0],1,0,2,[2],4,[0,2,0],4],0]]]", "{|\n|fcuopqtesting [[one|two]] |three|| data-foobar=\"1yeo7as\" |four\n|56fj7s\n|testing one two |three||b54owjfour\n|zh3co4\n|testing=\"dpbddn[[one|two]]<nowiki>\" |three</nowiki>\n|dqr2bo\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [2]", "1ua6wgu\n{|\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[0,[[4,[4],3,[3],3,2,3,3],3]]]", "{|\n|ohpvxm||gzv7pj\n|testing one two |\n|5i0d3y\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[4,[2,3]]]", "{|<!--5c0kdj--><!--1izcfek-->\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[3,1]]", "{|\n|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[4,[[4,4,3,0,2,2,[0,2,0],0],4]]]", "{|<!--nw5tlu-->\n|60jjn4\n|1i67rw4\n|testing one two |three\n|1c6z2h1||four\n|tq1bxt\n|testing=\"lrhs29[[one|two]]<nowiki>\" |three</nowiki>||four<!--ae682r-->\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[0,2]]", "{|\n<!--15uskpo-->|testing [[one|two]] |three||four\n|testing one two |three||four\n|testing=\"[[one|two]]\" |three||four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink [[4,[[2,[2],4,3,2,4,[3,4,4],1],0]]]", "{|<!--1ralrbd-->\n|2ff0i4\n|testing [[one|two]] |three||107le2cfour\n|1ramog0\n|vofeuf||four\n|1dte0qk\n|1kust171sntudl|| data-foobar=\"5fe4zq\" |four\n|}");
add("selser", "Template as link source [0,4,[2],0,[1,0]]", "[[{{linktest2}}]]\n\n319h5n\n\nguibb6[[{{linktest2}}]]\n\n[[{{linktest2}}]]Page");
add("selser", "Template as link source [0,4,1,0,1]", "[[{{linktest2}}]]\n\n5jn034\n\n[[{{linktest2}}]]\n\n[[{{linktest2}}]]Page");
add("selser", "Template as link source [2,2,[2],0,3]", "1a7kpug\n\n[[{{linktest2}}]]\n\nn91lde\n\n13by1pn[[{{linktest2}}]]\n");
add("selser", "2. includeonly in html attr value [[[4],0,2]]", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">tvt1yt</span>\n1fbs42j<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[0,3,[2]]]", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span><span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>uym61bbar</span>");
add("selser", "2. includeonly in html attr value [[4,2,[4]]]", "7d71o016ctugi\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>1a845ug</span>");
add("selser", "2. includeonly in html attr value [[1,0,[2]]]", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\" data-foobar=\"yoda5w\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>zqqegpbar</span>");
add("selser", "2. includeonly in html attr value [[[4],4,0]]", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">740srt</span>1x665ur<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[2,0,0]]", "w9yn7t<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[2,0,[2]]]", "py30do<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>1uj5ruybar</span>");
add("selser", "2. includeonly in html attr value [2]", "1yy13qj\n\n<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[4,2,0]]", "8wvp4x11loyrn\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[2,2,2]]", "xk8sh5<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>15c4m41\n1axnx8l<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[4,2,[2]]]", "d84yek1w573vj\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>13mtw37bar</span>");
add("selser", "2. includeonly in html attr value [1]", "<span id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "2. includeonly in html attr value [[3,0,0]]", "\n<span id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,3]]", "{{echo|}}{| width = '100%'\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[0,2]]]", "{{echo|}}{| width = '100%'\n|foo<!--fkhg96-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,1]", "{{echo|}}{| width=\"100%\" data-foobar=\"1lq56ny\"\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[[[2]],3]]]", "{{echo|}}{| width = '100%'\n|b12tt0foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[4,[4,2]]]", "{{echo|}}{| width = '100%'<!--htfpch--><!--hopyvr--><!--15lil83-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[4,[2,0]]]", "{{echo|}}{| width = '100%'<!--gqamhx--><!--qyr36i-->\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[4,[3,0]]]", "{{echo|}}{| width = '100%'<!--9nk86i-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,2]", "{{echo|}}1a147ql\n{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,1]]", "{{echo|}}{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[[3],0]]]", "{{echo|}}{| width = '100%'\n\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[1,4]]]", "{{echo|}}{| width = '100%'\n|foo<!--16zfhov-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[[3],3]]]", "{{echo|}}{| width = '100%'\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[2,0]]]", "{{echo|}}{| width = '100%'\n<!--x13f3o-->|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[[[3]],3]]]", "{{echo|}}{| width = '100%'\n|\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[4,0]]]", "{{echo|}}{| width = '100%'\n<!--1ndfslw-->\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[3,[1,0]]]", "{{echo|}}{| width = '100%'\n|foo\n|}");
add("selser", "1. Table tag in SOL posn. should get reparsed correctly with valid TSR [0,[0,[[1],4]]]", "{{echo|}}{| width = '100%'\n| data-foobar=\"1en2in6\" |foo<!--14t2mrs-->\n|}");
add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[3]]", "<div style={{echo|'color:red;'}}></div>");
add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [2]", "137x85j<div style={{echo|'color:red;'}}>foo</div>");
add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[2]]", "<div style={{echo|'color:red;'}}>1jf78cnfoo</div>");
add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[4]]", "<div style={{echo|'color:red;'}}>1vo5am</div>");
add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value [2]", "18vezbn<div {{echo|style}}={{echo|'color:red;'}}>foo</div>");
add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value [[3]]", "<div {{echo|style}}={{echo|'color:red;'}}></div>");
add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value [[2]]", "<div {{echo|style}}={{echo|'color:red;'}}>1hosslffoo</div>");
add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value [[4]]", "<div {{echo|style}}={{echo|'color:red;'}}>kuv3ct</div>");
add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes [2]", "1rohvn2<div {{echo|1=id=\"v1\" title=\"foo\"}}>bar</div>");
add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes [[4]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}>4p4o20</div>");
add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes [[2]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}>13vgs1abar</div>");
add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes [[3]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}></div>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,4,3,3,0,0,3,1]", "\n1vi7n\n\n<table data-foobar=\"12pupm8\">[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,[3],0,0,3,0,4,2]", "<table></table>\n<!--Two categories (T52330)-->\nkal57i\n\n1fg67o7<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [4,1,3,2,2,2,0,2]", "11cgxk9<table data-foobar=\"1kruwif\"><tr><td>foo</td></tr></table>1p4pzxf<!--Two categories (T52330)-->9d2fal\n1ug7g5k\n\n18i4eyx<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,4,2,4,2,1,0,1]", "\nvchdgw\n\n1a4s1ba\n\n1uucj7k\n\n1os8dgc\n[[Category:bar1]]<table data-foobar=\"muyrlt\">[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [3,[[3]],3,2,0,4,0,4]", "<table></table>11bprlf<!--Two categories (T52330)-->\n13iwckd\n\n6zjdec");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [1,3,0,4,0,0,0,[[[[3]]]]]", "[[Category:foo1]]\ncwxp7v\n<table><tr><td></td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [3,2,3,2,2,0,0,[[[[2]]]]]", "112n9ra<table>[[Category:foo1]]<tr><td>foo</td></tr></table>1h1qh8l<!--Two categories (T52330)-->1npvk4k\n<table><tr><td>x5h3pkfoo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [1,2,0,0,4,0,0,1]", "[[Category:foo1]]\n2i6zm0<table>[[Category:foo1]]<tr><td>foo</td></tr></table>\n<!--Two categories (T52330)-->1onlnl8\n<table data-foobar=\"rl18e4\">[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,1,4,0,0,0,1,[1]]", "<table data-foobar=\"1yx73e\">[[Category:foo1]]<tr><td>foo</td></tr></table>26ctnz<!--Two categories (T52330)-->\n[[Category:bar2]]<table><tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [4,3,0,2,2,0,0,[2]]", "17yawb9\n\n1uufmas<!--Two categories (T52330)-->\n\n11zcybv\n<table><!--1a4i25l-->[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [2,3,4,2,3,0,0,0]", "1f0ibpy\n\nvuouca\n\n1wz9o97<!--Two categories (T52330)-->\n<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [4,1,0,2,0,0,3,2]", "12avjhz<table data-foobar=\"1o71wty\"><tr><td>foo</td></tr></table>\n1of4n1y<!--Two categories (T52330)-->\n\n1pito2<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,3,2,4,3,3,0,4]", "\nyatypy\n\nll9cx6\n\n15s7td7");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,2,4,4,4,4,2,0]", "\n7arpcr<table>[[Category:foo1]]<tr><td>foo</td></tr></table>1a7h1oz\n\n111nlmc\n\nqd5wnu\n\n1pkocry\n\n1xxsf9l\n<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,3,2,0,2,4,0,2]", "\nataevx\n<!--Two categories (T52330)-->\ndezxyo\n\n1d2sy2b\n\n14jsz6h<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [2,3,2,2,0,0,0,[[4]]]", "1etf57x\n\nno79z2\n\n1kp1zvk<!--Two categories (T52330)-->\n<table><!--10ezcp9--></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,1,4,0,0,0,1,[2]]", "<table data-foobar=\"2bu50v\">[[Category:foo1]]<tr><td>foo</td></tr></table>1dden9i<!--Two categories (T52330)-->\n[[Category:bar2]]<table><!--haq63u-->[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,[2],0,2,2,0,0,[1]]", "<table><!--nq0o7d-->[[Category:foo1]]<tr><td>foo</td></tr></table>\ngrpghf<!--Two categories (T52330)-->\n\n23necy\n<table><tr><td>foo</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,[[3]],2,0,0,4,0,[[[4]]]]", "<table></table>v3gupm\n<!--Two categories (T52330)-->\n74gc39\n<table><tr><td>dorqz6</td></tr></table>");
add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from inside [0,4,4,0,0,3,2,[3]]", "\n8xlk8t\n\n1amx4cv<!--Two categories (T52330)-->\n\n1y4b7rq\n<table></table>");
add("selser", "Image with multiple widths -- use last [2]", "1n3v0c7\n\n[[File:Foobar.jpg|200px|300px|caption]]");
add("selser", "Image with multiple widths -- use last [1]", "[[File:Foobar.jpg|200px|300px|caption]]");
add("selser", "Image with width attribute at different positions [0,2,[0,1],3,0]", "[[File:Foobar.jpg|200px|right|Caption]]1ud2zr5\n[[File:Foobar.jpg|right|200px|Caption]]\n[[File:Foobar.jpg|right|Caption|200px]]");
add("selser", "Image with 'frame' first. [0,4,[0,1],3,0]", "[[File:Foobar.jpg|frame|caption]]fd0mwi[[File:Foobar.jpg|frame|frameless|caption]]\n[[File:Foobar.jpg|frame|thumb|caption]]");
add("selser", "Invalid image attributes (T64500) [0,2,[0,4],3,0]", "[[File:Foobar.jpg|thumb|float|left|caption]]7cf8mv\n\n[[File:Foobar.jpg|thumb|righ]]\n\n[[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]");
add("selser", "Render invalid page names as plain text (T53090) [4,0,[0,0,3,0,2,0,4,0,0,0,3,0,0,0,3,0,2,0,0,0,0,0,0]]", "1ysvkvp\n\n[[{{echo|./../foo}}{{echo|foo/.}}<nowiki>1ulc7fi|bar]]</nowiki>\n[[{{echo|foo/..}}tiq1oc{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}{{echo|foo}bar}}<nowiki>1ctgjek]]</nowiki>\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("selser", "Render invalid page names as plain text (T53090) [2,4,[4,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,4,0,0,0,0,0,4]]", "1o8kojt\n\n[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\nt825dx\n\n1pdzloq{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}<nowiki>1mujldn]]</nowiki>\n[[{{echo|foo}bar}}kc7lat{{echo|foo[bar}}<nowiki>]]</nowiki>\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}14p1tim");
add("selser", "Render invalid page names as plain text (T53090) [[0,1,2],3,[0,0,0,0,0,0,4,0,3,0,0,0,0,0,0,0,3,0,0,0,3,0,0]]", "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n<nowiki>[[foo~~~bar]]</nowiki>\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]1t9imsexyz]]\n\n[[{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}9dnx15{{echo|foo~~~~bar}}{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}{{echo|foo<bar}}]]");
add("selser", "Render invalid page names as plain text (T53090) [0,0,[4,0,0,0,2,0,0,0,3,0,0,0,0,0,4,0,0,0,0,0,0,0,2]]", "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\nxqf8nc{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}<nowiki>dg9iv2|bar]]</nowiki>\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}yonvwr{{echo|foo}bar}}]]\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}<nowiki>1ecm9yt]]</nowiki>");
add("selser", "Render invalid page names as plain text (T53090) [2,2,4]", "10csbrn\n\n[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\ni4n1uo\n\n1rp0h4f");
add("selser", "Render invalid page names as plain text (T53090) [2,0,4]", "158r1cg\n\n[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\ns1jz83");
add("selser", "Render invalid page names as plain text (T53090) [0,3,[3,0,0,0,3,0,3,0,0,0,4,0,4,0,4,0,3,0,3,0,0,0,0]]", "[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\n{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}{{echo|foo/..}}{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}s22hvo{{echo|foo././bar}}17lkehc{{echo|foo{bar}}y1ju18{{echo|foo}bar}}{{echo|foo[bar}}{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("selser", "Render invalid page names as plain text (T53090) [2,2,2]", "1rpga8w\n\n[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\nri5tqo\n\n1e10bgp\n\n[[{{echo|./../foo}}|bar]]\n[[{{echo|foo/.}}|bar]]\n[[{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}]]\n[[{{echo|foo>bar}}]]\n[[{{echo|foo././bar}}]]\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}]]\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("selser", "Render invalid page names as plain text (T53090) [2,0,[0,0,4,0,4,0,0,0,4,0,2,0,2,0,0,0,2,0,0,0,0,0,0]]", "17b1tuo\n\n[[./../foo|bar]]\n[[foo�|bar]]\n[[foo/.|bar]]\n[[foo/..|bar]]\n[[foo~~~bar]]\n[[foo>bar]]\n[[foo[bar]]\n[[.]]\n[[..]]\n[[foo././bar]]\n[[foo[http://example.com]xyz]]\n\n[[{{echo|./../foo}}p19qe8{{echo|foo/.}}apvawf{{echo|foo/..}}|bar]]\n[[{{echo|foo~~~~bar}}mf1van{{echo|foo>bar}}<nowiki>j21h93]]</nowiki>\n[[{{echo|foo././bar}}<nowiki>n9j1lg]]</nowiki>\n[[{{echo|foo{bar}}]]\n[[{{echo|foo}bar}}<nowiki>zgbtc6]]</nowiki>\n[[{{echo|foo[bar}}]]\n[[{{echo|foo]bar}}]]\n[[{{echo|foo<bar}}]]");
add("selser", "Section headings with TOC [3,4,0,0,3,2,[3],3,0,4,3,3,0]", "1f5c88n\n\n===Subheadline 1===\n1dnv4v5\n\n======<nowiki/>======\n\n==Headline 2==\n1ys4axr\n\n===Another headline===");
add("selser", "Header with space, plus and underscore as entity [0,2,2,0,0,0,0,0,[4],0,4,4,1,0,[2,2,0,0,0,3],0,2,2,4,4,1,0,3,0,3,4,[2,0,3,0,[3],0,2,0,[2],2,3]]", "Id should not contain + for spaces\n\n3ir1co\n\n1t8pmwl\n\n==Space between Text==\nsection 1\n\n==Space-Entity&#32;between&#32;Text==\npb5duw\n\nulz2aj\n\n1mp9rc1\n\nsection 3\n\n==185zontp248nvPlus-Entity&#43;between&#43;==\nhz0os9\n\nsection 4\n\n19a4ypq\n\nv65vs0\n\n181rqnj\n\nsection 5\n\n1utqc8q\n\nhm0p27[[#Space between Text]]\n\n[[#Plus+between+Text|<nowiki/>]]\n7mbntg[[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text|3uedxo#Underscore_between_Text]]<nowiki/>dzz23z\n");
add("selser", "Header with space, plus and underscore as entity [[2],4,3,4,0,0,[0,0,2,0,4],0,4,3,[1,0],0,3,3,3,0,0,3,4,0,1,0,[0,0,4,0,3],0,3,0,[[3],0,3,2,[2],0,2,2,3,2,1]]", "em9vq2Id should not contain + for spaces\n\n11u79b3\n\n1j1ocfp\n\nsection 1\n\n==Space-Entity&#32;gtghgmbetween&#32;1izhovp==\n1or9hep\n\n==Plus+between+Text==\n\nsection 4\n\n1f9wz00\n\nsection 5\n\n==Underscore-Entity&#95;1hf5b0i&#95;==\n\n[[#Space between Text|<nowiki/>]]\n5fnpym\n[[#Plus+between+Text|67826t#Plus+between+Text]]\n3c7izz[[#Plus-Entity+between+Text]]1uy3vhx\nhumk19\n[[#Underscore-Entity_between_Text]]");
add("selser", "Header with space, plus and underscore as entity [1,0,3,2,2,2,2,4,3,2,[0,2],4,3,0,2,3,4,0,2,0,0,4,[3,0,0,0,0],0,4,0,[[3],0,0,0,4,4,3,0,1,0,[4]]]", "Id should not contain + for spaces\n\n5kevtu\n\n2esg0m\n\nsection 1\n\nwf6glo\n\n1yxktuo\n\n==Space-Entity&#32;between&#32;Text==\n19vfvkl\n\n1d2w4tf\n\n==ih0g8sPlus+between+Text==\n1aezqen\n\nxhca0g\n\n==Plus-Entity&#43;between&#43;Text==\n1bs42nn\n\ngi9to0\n\n==Underscore_between_Text==\nsection 5\n\n1cmbpbo\n\n==&#95;between&#95;Text==\nnnsyio\n\n[[#Space between Text|<nowiki/>]]\n[[#Space-Entity between Text]]\n1n8mp0n1i120xo\n[[#Underscore_between_Text]]\n[[#Underscore-Entity&#95;between&#95;Text|1cc32z2]]");
add("selser", "Header with space, plus and underscore as entity [[3],4,2,0,3,0,2,3,1,0,[0,4],3,2,0,0,0,2,2,0,0,0,0,[0,0,0,0,2],0,1,4,[0,0,2,4,4,2,0,0,0,0,0]]", "\n2h3nr5\n\n1ctenob\n\n==Space between Text==\n\n1ikay21\n\n==Space-Entity&#32;between&#32;Text==\nsection 2\n\n==1beca9r==\n1txd1u7\n\nsection 3\n\n==Plus-Entity&#43;between&#43;Text==\n14vaqzc\n\nsection 4\n\nocx309\n\n==Underscore_between_Text==\nsection 5\n\n==Underscore-Entity&#95;between&#95;75gu4vText==\nsection 6\n\n1651xsj\n\n[[#Space between Text]]\n1779rad[[#Space-Entity between Text]]<nowiki/>m1yxsv7asld4162dnp6\n[[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity_between_Text]]");
add("selser", "Header with space, plus and underscore as entity [0,2,3,3,4,0,4,3,2,4,[0,2],0,1,3,[2,0,0,2,0,2],3,3,0,2,0,0,4,[0,0,4,0,0],0,[2],4,1]", "Id should not contain + for spaces\n\nrjwidb\n\nx7kjqd\n\nj5o8cz\n\nmqawr\n\nsection 2\n\n1rvzgsl\n\n==iyg1woPlus+between+Text==\nsection 3\n==1doip83Plus-Entity&#43;19gpgjgbetween&#43;18r6gzfText==\n\n14ly7ox\n\n==Underscore_between_Text==\nsection 5\n\n1ny3aa5\n\n==Underscore-Entity&#95;dmb6bo&#95;Text==\nbwghvysection 6\n\n1pr61kx\n\n[[#Space between Text]]\n[[#Space-Entity between Text]]\n[[#Plus+between+Text]]\n[[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity_between_Text]]");
add("selser", "Header with space, plus and underscore as entity [2,2,[2],3,[3],0,4,3,[2],0,4,3,[2],4,[0,3,0,0,0,0],0,0,2,4,0,0,3,2,0,3,0,[[2],0,1,0,[3],0,[4],0,0,3,2]]", "1elrhjq\n\nId should not contain + for spaces\n\nkd7ak0\n\n==1ur9z8qSpace between Text==\n\ne17eln\n\n1yqrsisection 2\n\nq87kqn\n\n199397vsection 3\n\n985piw\n\n==&#43;between&#43;Text==\nsection 4\n\n1tq76xf\n\n14fu6cr\n\nsection 5\n\nvfjymh\n\n==Underscore-Entity&#95;between&#95;Text==\n\n[[#Space between Text|eaa1r8#Space between Text]]\n[[#Space-Entity between Text]]\n[[#Plus+between+Text|<nowiki/>]]\n[[#Plus-Entity&#43;between&#43;Text|13mhn19]]\n[[#Underscore_between_Text]]<nowiki/>ti3ojo[[#Underscore-Entity_between_Text]]");
add("selser", "Header with space, plus and underscore as entity [0,0,[4],4,0,0,[3,0,2,0,2],3,[3],4,[2,3],0,[3],0,3,3,0,3,0,0,0,4,4,0,4,0,1]", "Id should not contain + for spaces\n\n==avkvbk==\nixmzq6\n\nsection 1\n\n==&#32;dga27hbetween&#32;6rmkoyText==\n\nofgkpq\n\n==18ncfaa==\n\nsection 4\n==Underscore_between_Text==\nsection 5\n\nt4w3d7\n\ntcfuzl\n\n14lut95\n\n[[#Space between Text]]\n[[#Space-Entity between Text]]\n[[#Plus+between+Text]]\n[[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity_between_Text]]");
add("selser", "Header with space, plus and underscore as entity [0,2,0,0,1,0,1,2,1,0,1,2,4,3,[0,0,0,0,0,4],3,1,4,1,0,[2],0,4,0,[3],0,[0,0,0,4,4,0,4,0,4,0,4]]", "Id should not contain + for spaces\n\na0fh49\n\n==Space between Text==\nsection 1\n\n==Space-Entity&#32;between&#32;Text==\nyceo0j\nsection 2\n\n==Plus+between+Text==\ndf5oq\n1779ald\n\n==Plus-Entity&#43;between655ae6==\nsection 4\n\n3xajcp\n\n==Underscore_between_Text==\n1qyve5osection 5\n\n4kt9en\n\n[[#Space between Text]]\n[[#Space-Entity between Text]]<nowiki/>ru7382c63bph\n1jilfpc\n5bzunt\n1yxib9l");
add("selser", "Header with space, plus and underscore as entity [[4],0,1,4,3,0,3,2,0,2,[0,2],3,[2],0,[4,2,0,4,0,4],4,0,3,1,0,2,0,[2,0,0,0,3],0,4,4,[[3],0,2,0,[2],3,0,0,[4],0,3]]", "afrp9t\n\n==Space between Text==\n1csack2\n\n1mfg72p\n\nsection 2\n\n2ni9lm\n\n==1kjcgabPlus+between+Text==\n1tq4mhfsection 3\n\n==7ecohu1w11llrPlus-Entity&#43;1oqwrxi&#43;1qv6qsp==\n149vwfo\n\nsection 4\n==Underscore_between_Text==\nerjbmw\n\nsection 5\n\n==1yferp9Underscore-Entity&#95;between&#95;==\n19rdqwl\n\n17tc93k\n\n[[#Space between Text|<nowiki/>]]\n9cehx3[[#Space-Entity between Text]]\n[[#Plus+between+Text|rn56yq#Plus+between+Text]][[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text|16arbj7]]\n");
add("selser", "Header with space, plus and underscore as entity [2,0,4,2,0,2,4,2,[2],0,2,4,[4],0,1,0,4,0,[2],0,3,4,[3,0,4,0,4],0,3,4,1]", "1m7x3zt\n\nId should not contain + for spaces\n\nx7jpg6\n\n6usbdi\n\nsection 1\n\nyy6ofo\n\n1jv2cuv\n\n1ibcmgq\n\n1m5rlbnsection 2\n\nmxkd3p\n\n==Plus+between+Text==\nno7y9f\n\nbk2gh9\n\n==Plus-Entity&#43;between&#43;Text==\nlsgxos\n\n==1wvgkrxUnderscore_between_Text==\n33bjoz\n\n==&#95;12gs666&#95;1uhoar7==\n1u1zzda\n\n[[#Space between Text]]\n[[#Space-Entity between Text]]\n[[#Plus+between+Text]]\n[[#Plus-Entity+between+Text]]\n[[#Underscore_between_Text]]\n[[#Underscore-Entity_between_Text]]");
add("selser", "Single-line or multiline-comments can follow headings [2,4,3,1,0,4,[2],3]", "1npqox2\n\n==foo==\nr66agm\n\n==bar==<!--c1-->\n1xe9og4\n\n==1b85eb3baz==<!--\nc2\nc3-->");
add("selser", "div with single-quoted attribute [2]", "1gyc55g<div id='rock'>HTML rocks</div>");
add("selser", "div with single-quoted attribute [[4]]", "<div id='rock'>101l59q</div>");
add("selser", "div with single-quoted attribute [[2]]", "<div id='rock'>12qbrmoHTML rocks</div>");
add("selser", "div with single-quoted attribute [[3]]", "<div id='rock'></div>");
add("selser", "div with unquoted attribute [2]", "1ekny6u<div id=rock>HTML rocks</div>");
add("selser", "div with unquoted attribute [[4]]", "<div id=rock>7kn9g0</div>");
add("selser", "div with unquoted attribute [[3]]", "<div id=rock></div>");
add("selser", "div with unquoted attribute [[2]]", "<div id=rock>qc1zeiHTML rocks</div>");
add("selser", "div with illegal double attributes [2]", "1p0jqrx<div id=\"a\" id=\"b\">HTML rocks</div>");
add("selser", "div with illegal double attributes [[4]]", "<div id=\"a\" id=\"b\">vin0ct</div>");
add("selser", "div with illegal double attributes [[3]]", "<div id=\"a\" id=\"b\"></div>");
add("selser", "div with illegal double attributes [[2]]", "<div id=\"a\" id=\"b\">1ohwliqHTML rocks</div>");
add("selser", "HTML multiple attributes correction [2]", "1r8depl<p class=\"error\" class=\"awesome\">Awesome!</p>");
add("selser", "HTML multiple attributes correction [[3]]", "<p class=\"error\" class=\"awesome\"></p>");
add("selser", "HTML multiple attributes correction [[4]]", "<p class=\"error\" class=\"awesome\">197x789</p>");
add("selser", "HTML multiple attributes correction [[2]]", "<p class=\"error\" class=\"awesome\">1aauuqbAwesome!</p>");
add("selser", "Table multiple attributes correction [2]", "1wg3nsv\n{|\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [1]", "{| data-foobar=\"1x93ju9\"\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[4,[[[2]],0]]]", "{|<!--f53dfb-->\n!+ class=\"error\" class=\"awesome\"|106kz1istatus\n|}");
add("selser", "Table multiple attributes correction [[0,2]]", "{|\n<!--c4lea7-->!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[0,[1,3]]]", "{|\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[3,1]]", "{|\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[4,1]]", "{|<!--ywvzfq-->\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[3,2]]", "{|<!--81mt7f-->\n!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "Table multiple attributes correction [[0,[2,0]]]", "{|\n<!--13tms3c-->!+ class=\"error\" class=\"awesome\"|status\n|}");
add("selser", "DIV IN UPPERCASE [2]", "1fzyex9<DIV ID=\"x\">HTML ROCKS</DIV>");
add("selser", "DIV IN UPPERCASE [[2]]", "<DIV ID=\"x\">16dz2cHTML ROCKS</DIV>");
add("selser", "DIV IN UPPERCASE [[4]]", "<DIV ID=\"x\">ki4tby</DIV>");
add("selser", "DIV IN UPPERCASE [[3]]", "<DIV ID=\"x\"></DIV>");
add("selser", "Media link with nasty text 5", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [[[3]],[2]]", "[[Media:Foobar.jpg|<nowiki/>]]<div style=display:none>nmm45h\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [2,2]", "1eidzch\n\n[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]\n\nmz58vk<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [[[2]],[4]]", "[[Media:Foobar.jpg|b4hkk5Safe Link]]<div style=display:none>26vage</div>");
add("selser", "Media link with nasty text [[[4]],2]", "[[Media:Foobar.jpg|mmhmym]]\n\nrgnzmv<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [0,2]", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]\n\nabkks5<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [0,[1]]", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=display:none>[[Media:Foobar.jpg|\" onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>");
add("selser", "Media link with nasty text [4,0]", "1yohhqu<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [1,0]", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [[4],[3]]", "t5h09i<div style=display:none></div>");
add("selser", "Media link with nasty text [[[3]],[[2]]]", "[[Media:Foobar.jpg|<nowiki/>]]<div style=display:none>[[Media:Foobar.jpg|91xizd\" onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>");
add("selser", "Media link with nasty text [[2],[3]]", "6kgnt1[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=display:none></div>");
add("selser", "Media link with nasty text [3,0]", "<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [2,1]", "1fo3rs1\n\n[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=\"display:none\" data-foobar=\"n29cs2\">\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Media link with nasty text [1,4]", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]\n\ncckae5");
add("selser", "Media link with nasty text [[[4]],[[4]]]", "[[Media:Foobar.jpg|bi8lng]]<div style=display:none>[[Media:Foobar.jpg|zs3c5s]]</div>");
add("selser", "Media link with nasty text [0,4]", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]\n\nabptjt");
add("selser", "Media link with nasty text [[3],2]", "\nnd30o1<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
add("selser", "Empty attribute crash test single-quotes (T4067) [1]", "<font color=''>foo</font>");
add("selser", "Empty attribute crash test single-quotes (T4067) [2]", "1xfq6b7\n\n<font color=''>foo</font>");
add("selser", "Empty attribute crash test single-quotes (T4067) [[2]]", "fg6mo9<font color=''>foo</font>");
add("selser", "Empty attribute crash test single-quotes (T4067) [[[3]]]", "<font color=''></font>");
add("selser", "Empty attribute crash test single-quotes (T4067) [[[4]]]", "<font color=''>1qkewqo</font>");
add("selser", "Empty attribute crash test single-quotes (T4067) [[[2]]]", "<font color=''>1firl43foo</font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [[2]]", "les4r2<font color=#x>foo</font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [1]", "<font color=#x>foo</font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [[[2]]]", "<font color=#x>gdyex8foo</font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [2]", "uncluv\n\n<font color=#x>foo</font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [[[3]]]", "<font color=#x></font>");
add("selser", "Attribute test: unquoted but illegal value (hash) [[[4]]]", "<font color=#x>1kz07xr</font>");
add("selser", "T4095: link with pipe and three closing brackets, version 2 [1]", "[[Main Page|[http://example.com/]]]");
add("selser", "T4095: link with pipe and three closing brackets, version 2 [2]", "1ok6w86\n\n[[Main Page|[http://example.com/]]]");
add("selser", "T4095: link with pipe and three closing brackets, version 2 [[2]]", "m0slw0[[Main Page|[http://example.com/]]]");
add("selser", "MSIE 6 CSS safety test: Repetition markers (T57332) [0,4,1,3,0,2,4,4,1,3,0,0,1]", "<p style=\"font-size: 100px; color: expres〱ion((title='XSSed'),'red')\">A</p>m2m2ud<p style=\"font-size: 100px; color: expresゝion((title='XSSed'),'red')\" data-foobar=\"x7ilry\">B</p>\n<p style=\"font-size: 100px; color: expresーion((title='XSSed'),'red')\">C</p>ie1orv\n6knado\n\n1h1hykj<p style=\"font-size: 100px; color: expresﹽion((title='XSSed'),'red')\" data-foobar=\"1pu1sh0\">E</p>\n<p style=\"font-size: 100px; color: expresﹼion((title='XSSed'),'red')\">F</p>\n<p style=\"font-size: 100px; color: expresーion((title='XSSed'),'red')\" data-foobar=\"1nlf9gx\">G</p>");
add("selser", "Table attribute legitimate extension [[0,1]]", "{|\n!+ style=\"<nowiki>color:blue</nowiki>\"|status\n|}");
add("selser", "Table attribute legitimate extension [[0,[1,4]]]", "{|\n!+ style=\"<nowiki>color:blue</nowiki>\"|status<!--i4xvef-->\n|}");
add("selser", "Table attribute legitimate extension [2]", "1muagvc\n{|\n!+ style=\"<nowiki>color:blue</nowiki>\"|status\n|}");
add("selser", "Table attribute legitimate extension [[3,2]]", "{|<!--krwics-->\n!+ style=\"<nowiki>color:blue</nowiki>\"|status\n|}");
add("selser", "Table attribute legitimate extension [1]", "{| data-foobar=\"1nsv8le\"\n!+ style=\"<nowiki>color:blue</nowiki>\"|status\n|}");
add("selser", "Table attribute legitimate extension [[0,[[[2]],2]]]", "{|\n!+ style=\"<nowiki>color:blue</nowiki>\"|1j53ltlstatus<!--1mk28t-->\n|}");
add("selser", "Table attribute safety [[4,1]]", "{|<!--24wg5p-->\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [[4,[0,2]]]", "{|<!--eqm0n4-->\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status<!--10y12sm-->\n|}");
add("selser", "Table attribute safety [[3,2]]", "{|<!--2lfn7d-->\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [1]", "{| data-foobar=\"19xisx6\"\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [2]", "1yu2uhf\n{|\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [[0,2]]", "{|\n<!--h3znyk-->!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [[0,[[[2]],0]]]", "{|\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|myiayjstatus\n|}");
add("selser", "Table attribute safety [[0,[2,0]]]", "{|\n<!--ywao1f-->!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [[0,[0,3]]]", "{|\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status\n|}");
add("selser", "Table attribute safety [[0,[1,2]]]", "{|\n!+ style=\"<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>\"|status<!--1ke7x4h-->\n|}");
add("selser", "Parser hook: nested tags [0,2]", "<tag><tag></tag>zx3dlc\n</tag>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,1,4]]", "<div itemscope>\n\t<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\niyk2lr</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[2,0,2]]", "<div itemscope>3lokbp\n\t<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n\n144xrgg\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [2]", "1hze8ou<div itemscope>\n\t<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,[2],2]]", "<div itemscope>\n\t8am96<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\n9arh5u\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[4,1,0]]", "<div itemscope>1knu5wp\n<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[4,[3],0]]", "<div itemscope>iat86p\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,0,4]]", "<div itemscope>\n\t<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n\ntdrjvc</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,[4],3]]", "<div itemscope>\n\t1kzeqgo\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,3,4]]", "<div itemscope>\n\td29d1c</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[2,1,0]]", "<div itemscope>1f50zss\n\t<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,1,0]]", "<div itemscope>\n\t<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,[2],0]]", "<div itemscope>\n\t1taw09h<nowiki><meta itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [1]", "<div itemscope=\"\" data-foobar=\"1fr5o2e\">\n\t<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[2,2,0]]", "<div itemscope>1mm6ro0\n\t1xx5uhj\n<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[2,4,0]]", "<div itemscope>1jopkvo\n\t94zkc5\n</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[3,0,4]]", "<div itemscope>\n<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\nl711yq</div>");
add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for Microdata [[0,2,0]]", "<div itemscope>\n\t1fetx3z\n<meta itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
add("selser", "HTML bullet list, closed tags (T7497) [[4,[3],3,0,3]]", "<ul><li>j0tr6b</li><li></li>\n<li>Two</li></ul>");
add("selser", "HTML bullet list, closed tags (T7497) [[4,[2],3,0,0]]", "<ul><li>1ll4gfg</li><li>wnpb5dOne</li>\n<li>Two</li>\n</ul>");
add("selser", "HTML nested ordered list, open tags (T7497) [[2,3,4,[2,1],3]]", "<ol><li>1ph637d</li>\n<li>l97dbh</li><li>1lg6gmxTwo:\n<ol data-foobar=\"1pegvwc\">\n<li>Sub-one\n<li>Sub-two\n</ol>\n</ol>");
add("selser", "Fuzz testing: Parser13 [2]", "1s3ei1s\n{| \n| http://a|");
add("selser", "Fuzz testing: Parser13 [1]", "{| data-foobar=\"13wllqe\" \n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[2,2]]", "{|<!--1cxzpcg--> \n<!--qebzjb-->| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[4,2]]", "{|<!--bch54l--><!--14d1sbn-->\n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[0,1]]", "{| \n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[0,2]]", "{| \n<!--l3hcbe-->| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[0,[1]]]", "{| \n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[4,[1]]]", "{|<!--mdbo58-->\n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[4,0]]", "{|<!--mfod94-->\n| http://a|\n|}");
add("selser", "Fuzz testing: Parser13 [[2,0]]", "{|<!--upaz27--> \n| http://a|\n|}");
add("selser", "Fuzz testing: Parser16 [2]", "1jeb7ja\n{|\n!https://||||||");
add("selser", "Fuzz testing: Parser21 [2]", "13y1bui\n{|\n!irc://{{ftp://a\" onmouseover=\"alert('hello world');\"\n|");
add("selser", "Fuzz testing: Parser22 [[4],0,0]", "nr0us7\n\n{|");
add("selser", "Fuzz testing: Parser22 [1,2,2]", "http://===r:::https://b\n\nfa9uov\n\n1qnwe6o\n{|");
add("selser", "Fuzz testing: Parser22 [1,3,0]", "http://===r:::https://b\n{|");
add("selser", "Fuzz testing: Parser22 [[1],0,0]", "http://===r:::https://b\n\n{|");
add("selser", "Fuzz testing: Parser22 [[[3]],0,0]", "[http://===r:::https://b]\n\n{|");
add("selser", "Fuzz testing: Parser22 [2,0,0]", "1cmf7ss\n\nhttp://===r:::https://b\n\n{|");
add("selser", "Fuzz testing: Parser22 [3,2,2]", "162vtq0\n\n18bnmuq\n{|");
add("selser", "Fuzz testing: Parser22 [[4],0,2]", "34r2ry\n\n9f7hao\n{|");
add("selser", "Fuzz testing: Parser22 [[2],0,0]", "qnque5<nowiki/>http://===r:::https://b\n\n{|");
add("selser", "Fuzz testing: Parser22 [[1],4,2]", "http://===r:::https://b\n\n1ey66js\n\n1d6vpkt\n{|");
add("selser", "Fuzz testing: Parser22 [3,0,0]", "\n{|");
add("selser", "Fuzz testing: Parser22 [1,0,2]", "http://===r:::https://b\n\n7djt13\n{|");
add("selser", "Correct handling of <td>, <tr> (T8171) [[4,[[4,1,0,[2],0,[4],3],2]]]", "<table><!--teder3--><tr><td>1t7juc9</td><td data-foobar=\"1riscnv\"> Some tabular data</td>\n <td>1v8vgy7 More tabular data ...</td>\n <td>frwh76</td>\n </tr><!--vml5rh-->\n</table>");
add("selser", "Correct handling of <td>, <tr> (T8171) [[2,[[3,[2],4,[3],3,[4],0],3]]]", "<table><!--pxk5of-->\n <tr><td>qi89q6 Some tabular data</td><td>15tp3q5</td><td></td><td>9rw052</td>\n </tr>\n</table>");
add("selser", "Inline wiki vs wiki block nesting [2,0,1]", "1v929o9\n\n'''Bold paragraph\n\nNew wiki paragraph");
add("selser", "Inline wiki vs wiki block nesting [1,3,[3]]", "'''Bold paragraph\n\n");
add("selser", "Inline wiki vs wiki block nesting [0,0,4]", "'''Bold paragraph\n\n3ordw7");
add("selser", "Inline wiki vs wiki block nesting [0,3,[4]]", "'''Bold paragraph\n\njhneyb");
add("selser", "Inline wiki vs wiki block nesting [[2],4,2]", "w5bvwb'''Bold paragraph\n\n1vkxi42\n\n16dcumw\n\nNew wiki paragraph");
add("selser", "Inline wiki vs wiki block nesting [0,0,2]", "'''Bold paragraph\n\njqx9hl\n\nNew wiki paragraph");
add("selser", "Mixing markup for italics and bold [1]", "'<nowiki/>''bold''''''bold''bolditalics'''''");
add("selser", "Mixing markup for italics and bold [2]", "1l5cb3q\n\n'''bold''''''bold''bolditalics'''''");
add("selser", "Mixing markup for italics and bold [[0,0,[4,[4]]]]", "'<nowiki/>''bold''''''1c7y5sl''1tr8qis'''''");
add("selser", "Mixing markup for italics and bold [[0,2,1]]", "'es094g''bold''''''bold''bolditalics'''''");
add("selser", "Illegal character references (T106578) [[[3],[3,0],2,[2],1,4,1,2,4,3,3,0,[4],[3,0,3,0],0,[3],1,2,4,4]]", ";:&#00;\n: sk41ya\n;1ony4eq FF: &#xC;\n: lkzsik\n; CR\n: t80d7b: &#xD;\n: gcjvm6\n;3zv4s3:&#x7F;&#x9F;\n;: &#xD83D;&#xDCA9;\n: wwt15t\n: 1vr314u\n: 2bc28z");
add("selser", "Illegal character references (T106578) [[4,0,0,[4],[2,0],3,[4],0,0,0,0,3,[3],[4,0,0,0],2,4,0,4,2,2]]", ": 9abxrc: &#00;\n;rhdk0x:1yo0ym7 &#xC;\n;1sc3k62: &#xD;\n; Control (low): &#8;\n;:t4d2jb&#x7F; &#x9F;\n: 8f1ytk\n: fm5zp9: &#xD83D;&#xDCA9;\n: 12sn30y\n: musw6o\n; This is an okay astral character\n: 1h36qjw: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [2]", "1pzz5ng\n\n; Null: &#00;\n; FF: &#xC;\n; CR: &#xD;\n; Control (low): &#8;\n; Control (high): &#x7F; &#x9F;\n; Surrogate: &#xD83D;&#xDCA9;\n; This is an okay astral character: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [[[4],0,2,3,0,3,0,0,4,2,3,3,0,1,0,0,[4,0,0],4,0,[4,0]]]", ";14gamor: &#00;\n: 1s3kfem: &#xC;\n; CR: &#xD;\n: 1d7dylt\n: xnpfuy\n; Control (low)\n; Control (high): &#x7F; &#x9F;\n; Surrogate:t99t45&#xD83D;&#xDCA9;\n: 149wpaq\n; This is an okay astral character:1jjpfp8&#x1F4A9;");
add("selser", "Illegal character references (T106578) [1]", "; Null: &#00;\n; FF: &#xC;\n; CR: &#xD;\n; Control (low): &#8;\n; Control (high): &#x7F; &#x9F;\n; Surrogate: &#xD83D;&#xDCA9;\n; This is an okay astral character: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [[3,2,0,2,[4,0],0,0,0,0,0,3,0,[4],[0,0,4,0],0,[2],4,0,0,0]]", ": 1nijh0k: &#00;\n: 1du33yk\n; FF:1s7r9el&#xC;\n; CR: &#xD;\n; Control (low)\n;b4fxhz: &#x7F;a9617s&#x9F;\n;1ri2ysu Surrogate\n: 15juh9u\n; This is an okay astral character: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [[0,0,2,4,1,2,[3],0,2,4,[3,0],0,[4],[4,0,3,0],4,[2],2,0,[4],1]]", "; Null: &#00;\n: 6hfj6v\n: i9slal: &#xC;\n: 1fanc3n\n;: &#xD;\n: lp8krq\n: ftnrln:&#8;\n;74e5xk:1ego74f&#x7F;&#x9F;\n: sm828x\n;1tee0ys Surrogate\n: 176owtu: &#xD83D;&#xDCA9;\n;mbelro: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [[4,0,4,1,0,0,2,0,2,4,3,0,0,2,3,0,0,0,4,[4,0]]]", ": xlpg99: &#00;\n: 1wwacff\n; FF: &#xC;\n: 1qhtchf\n; CR: &#xD;\n: lxdybf\n: 14yfods\n; Control (high)\n: e41tx7: &#x7F; &#x9F;\n; Surrogate: &#xD83D;&#xDCA9;\n: 181btqc:165hwum&#x1F4A9;");
add("selser", "Illegal character references (T106578) [[1,0,0,2,[4,0],0,0,2,0,2,2,0,2,4,0,3,[2,0,0],2,2,3]]", "; Null: &#00;\n: 1s86sxw\n; FF:1l9oavt&#xC;\n; CR\n: 778k4k: &#xD;\n: 35lo7h\n; Control (low)\n: senhqa: &#8;\n: wl73ou\n; Control (high)\n: 1u2mi6z:awh8bs &#xD83D;&#xDCA9;\n: 5hy2t0\n: 1i0pyn8\n; This is an okay astral character");
add("selser", "Illegal character references (T106578) [[3,3,4,2,[3,0],0,3,2,2,0,1,0,0,2,0,0,2,0,1,3]]", ": 1hudr4p\n: spbiwt\n; FF:&#xC;\n: ci2g0o: &#xD;\n: 11cbf6v\n; Control (low): &#8;\n; Control (high)\n: 18ilm4v: &#x7F; &#x9F;\n; Surrogate\n: 1u0r7vy: &#xD83D;&#xDCA9;\n; This is an okay astral character");
add("selser", "Illegal character references (T106578) [[2,0,3,3,[4,0],3,2,[2,0],0,2,[2,0],0,2,[2,0,3,0],0,[2],0,0,[3],0]]", ": 5blrc8\n; Null: &#00;:230ifg&#xC;\n: 1mumjc1\n; CR:z1bzr0 &#xD;\n: m1u6x6\n; Control (low):11e08na &#8;\n: xp949a\n; Control (high):x9i4bd &#x7F;&#x9F;\n;1kzw03l Surrogate: &#xD83D;&#xDCA9;\n;: &#x1F4A9;");
add("selser", "Illegal character references (T106578) [[0,4,2,4,0,3,2,0,4,2,[3,0],0,4,[2,0,0,0],0,2,2,4,0,4]]", "; Null\n: imnkql\n: 120vfx8\n: m8l04u: &#xC;\n: 1v6wt8e\n; CR: &#xD;\n: 5etm76\n: xso31u\n; Control (low):&#8;\n: 1dzblzq:1turqk0 &#x7F; &#x9F;\n: 172rddo\n; Surrogate\n: a1t77b: &#xD83D;&#xDCA9;\n: 1reix6m\n; This is an okay astral character\n: 1vq8tro");
add("selser", "Illegal character references (T106578) [[[2],0,0,[4],[2,0],0,[2],0,0,1,4,0,[3],0,0,2,4,4,0,3]]", ";1ypjyuj Null: &#00;\n;ajh2va:1enykrc &#xC;\n;1ur0ifg CR: &#xD;\n; Control (low)\n: f1dnvq\n;: &#x7F; &#x9F;\n: iuy797\n; Surrogate\n: 1fww35h\n: 1eaehui\n; This is an okay astral character");
add("selser", "Illegal character references (T106578) [[1,3,0,1,4,3,2,0,0,2,[4,0],0,[2],2,4,1,3,0,2,1]]", "; Null\n; FF\n: 1txuuys\n: f07k2q\n; CR: &#xD;\n: 1o4hp5z\n; Control (low):1h3h8zy&#8;\n;ng6t7 Control (high)\n: ck469g: &#x7F; &#x9F;\n: 1l0mmyh\n; Surrogate\n: 1ocxsih\n; This is an okay astral character: &#x1F4A9;");
add("selser", "Don't fall for the self-closing div [[4]]", "<div>u0dvch</div/>");
add("selser", "Don't fall for the self-closing div [[3]]", "<div></div/>");
add("selser", "Don't fall for the self-closing div [2]", "70q99<div>hello world</div/>");
add("selser", "Don't fall for the self-closing div [[2]]", "<div>678mmhhello world</div/>");
add("selser", "Parsing of overlapping (improperly nested) inline html tags [2]", "1vlht1h\n\n<span><s>x</span></s>");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[[2]]],0]]", "**1pl13b\n*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[2]],0]]", "** 1h4yepo\n*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[2,0]]", "* 1f07d16\n*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [1]", "*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[1],0]]", "*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [2]", "17hphu8\n\n*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[1]],0]]", "*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[2],0]]", "*cbbb7\n*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[1,0]]", "*******Foo {{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[[4]]],0]]", "**124emu1{{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[[[[[[4]]]]]]],0]]", "****cunljc{{bullet}}");
add("selser", "T2529: Uncovered bullet in a deeply nested list [[[[[[[1]]]]],0]]", "*******Foo {{bullet}}");
add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures [0,2,4]", "{{foo|\n\n53lg8t\n\n1ed7lwl");
add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures [0,4,2]", "{{foo|\n\nq9h86q\n\nq817pl\n\n=heading=");
add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical structures [0,4,[4]]", "{{foo|\n\njvou3\n\n=x11ftw=");
add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures [0,4,3]", "{{foo|\n\nzc90rq");
add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures [0,4,2]", "{{foo|\n\nj6r6g8\n\n97yjhs\n\n==heading==");
add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures [0,3,[4]]", "{{foo|\n==fcodkw==");
add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures [0,0,3]", "{{foo|\n");
add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical structures [0,0,[4]]", "{{foo|\n==hxhkvc==");
add("selser", "Play a bit with r67090 and T5158 [0,2,1,3,0,0,1]", "<div style=\"width:50% !important\">&nbsp;</div>2furaf\n<div style=\"width:50%&nbsp;!important\" data-foobar=\"1qc5dv3\">&nbsp;</div>\n<div style=\"width:50%&#160;!important\">&nbsp;</div>\n<div style=\"border : solid;\" data-foobar=\"1l7lc6r\">&nbsp;</div>");
add("selser", "percent-encoding and + signs in internal links (T28410) [[[3],2,0,4,[2],3,1,0,4,4,0,0,1,0,1,3,0,3,3,3,1]]", "[[User:+%|<nowiki/>]]1knuzp0 [[Page+title%]]<nowiki/>tecpqf[[%+|mmkufk%+]][[%+|%20]] b3wipsvi8sgk[[%+r]]\n[[%]] [[+]][[File:%+abc%39|foo|[[bar]]]][[3E+]]");
add("selser", "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links [2]", "19d4m8s\n\n[http://www.example.org/ ideograms]");
add("selser", "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links [[2]]", "5ai0ar[http://www.example.org/ ideograms]");
add("selser", "T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links [1]", "[http://www.example.org/ ideograms]");
add("selser", "span tags with directionality in TOC [0,3,4,2,[0,[3]],0,[[3]],3,0,3,3]", "__TOC__\n\n27h2x6\n\n1944b19\n\n==<span dir=\"rtl\"></span>==\n\n==<span style=\"font-style: italic\"></span>==\n\n==<span style=\"font-style: italic\" dir=\"ltr\">All attributes on these span tags must be deleted from the TOC</span>==\n");
add("selser", "Ignore pipe between table row attributes [1]", "{| data-foobar=\"1xu4slq\"\n|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "Ignore pipe between table row attributes [[0,1]]", "{|\n|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "Ignore pipe between table row attributes [2]", "11vejpd\n{|\n|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "Ignore pipe between table row attributes [[2,2]]", "{|<!--xh56y0-->\n<!--1i0qtyj-->|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "Ignore pipe between table row attributes [[4,2]]", "{|<!--1ykeaku--><!--3augql-->\n|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "Ignore pipe between table row attributes [[3,2]]", "{|<!--1tai2qk-->\n|quux\n|- id=foo | style='color: red'\n|bar\n|}");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [[[3]],[0,3],2,3,2]", "'''<nowiki/>'''[[File:Foobar.jpg|thumb]]wziohv\n\nbar'''\n\n1plafwz<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [3,[0,3],2,0,0]", "[[File:Foobar.jpg|thumb]]18byyu2\n\nbar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [2,[0,[[4]]],1,4,4]", "1a0mqqu\n\n'''foo[[File:Foobar.jpg|thumb|'''rxocnj''']]bar'''\n\nzmuvb2\n\ne0hid6");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [[3],[0,[[3]]],[2],0,2]", "[[File:Foobar.jpg|thumb|'''<nowiki/>''']]wkzwq3bar'''\n\nna38wv<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [1,[0,[[2]]],[[3]],0,0]", "'''foo[[File:Foobar.jpg|thumb|'''awvu10caption''']]'''<nowiki/>'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [4,0,3,0,0]", "1yql7hi[[File:Foobar.jpg|thumb|caption]]\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [4,[0,[2]],0,4,0]", "1v80qwy[[File:Foobar.jpg|thumb|1ikv31o'''caption''']]bar'''\n\n1bxj4by<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [[4],[0,1],2,3,0]", "t1wj9a[[File:Foobar.jpg|thumb|'''caption''']]1osve9t\n\nbar'''<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [0,[0,[4]],2,3,0]", "'''foo[[File:Foobar.jpg|thumb|hp6vyd]]18h73n\n\nbar'''<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [3,[0,2],1,0,0]", "[[File:Foobar.jpg|thumb|'''caption''']]bar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [0,[0,[[4]]],0,2,0]", "'''foo[[File:Foobar.jpg|thumb|'''k60vni''']]bar'''\n\nst74ug\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [[2],[0,[[2]]],[[4]],0,0]", "nvkt9y'''foo[[File:Foobar.jpg|thumb|'''5m7ylycaption''']]'''1jsypt7'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [[3],0,[1],0,4]", "[[File:Foobar.jpg|thumb|caption]]'''bar'''\n\n10pv7lg");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [4,[0,1],2,0,0]", "1ax3zwr[[File:Foobar.jpg|thumb|'''caption''']]t992ut\n\nbar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
add("selser", "2. Bad treebuilder fixup of formatting elt is cleaned up [1,[0,[2]],[1],0,3]", "'''foo[[File:Foobar.jpg|thumb|788xw5'''caption''']]'''bar'''\n");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [1,[0,1],3]", "<small>'''foo[[File:Foobar.jpg|thumb|'''caption''']]");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [2,[0,3],4]", "1vhvf30\n\n<small>'''foo[[File:Foobar.jpg|thumb]]m6e92h");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[[[3]]],[0,2],1]", "<small>'''<nowiki/>'''[[File:Foobar.jpg|thumb|'''caption''']]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[[1]],[0,[[1]]],[1]]", "<small>'''foo'''[[File:Foobar.jpg|thumb|'''caption''']]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[1],[0,3],2]", "<small data-foobar=\"cj4d28\">'''foo[[File:Foobar.jpg|thumb]]1sc5wd2\n\nbar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [4,[0,[[4]]],1]", "15jdhws[[File:Foobar.jpg|thumb|1hzbr2e]]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[3],[0,[1]],[2]]", "[[File:Foobar.jpg|thumb|'''caption''']]xa90w8bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[2],[0,2],3]", "r95rc<small>'''foo[[File:Foobar.jpg|thumb|'''caption''']]");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[[4]],[0,[4]],1]", "<small>f2cj50[[File:Foobar.jpg|thumb|kide7m]]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [0,[0,[[1]]],[1]]", "<small>'''foo[[File:Foobar.jpg|thumb|'''caption''']]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [1,[0,[[[4]]]],[2]]", "<small>'''foo[[File:Foobar.jpg|thumb|'''en19xs''']]pjyctfbar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [2,[0,3],1]", "16j602p\n\n<small>'''foo[[File:Foobar.jpg|thumb]]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [4,[0,1],[1]]", "1gkumd3[[File:Foobar.jpg|thumb|'''caption''']]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [2,[0,2],4]", "1ldw1py\n\n<small>'''foo[[File:Foobar.jpg|thumb|'''caption''']]192jpue");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [1,0,[1]]", "<small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [2,[0,4],[[1]]]", "1hfs81w\n\n<small>'''foo[[File:Foobar.jpg|thumb]]'''bar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [[[1]],[0,[1]],2]", "<small>'''foo'''[[File:Foobar.jpg|thumb|'''caption''']]ewq9gi\n\nbar'''</small>");
add("selser", "3. Bad treebuilder fixup of formatting elt is cleaned up [0,[0,3],[[4]]]", "<small>'''foo[[File:Foobar.jpg|thumb]]mkqvdf</small>");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out [2,4,2]", "1d6jtvt\n{|\n|<small>foo\nbar\n|}\nnbu4un\n\nzkk2lv\n{|\n|<small>foo<small>\n|}");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out [[0,[[1],4]],3,[0,[[[[4,0]]],0]]]", "{|\n| data-foobar=\"cndk9h\" |<small>foo\nbar<!--1lrkxx2-->\n|}\n{|\n|<small>8xmbk1<small>\n|}");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out [2,0,3]", "1yv9opq\n{|\n|<small>foo\nbar\n|}\n");
add("selser", "Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out [2,0,[2,[2,0]]]", "100cgyt\n{|\n|<small>foo\nbar\n|}\n\n{|<!--kxm96t-->\n<!--28meuw-->|<small>foo<small>\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [1]", "{| data-foobar=\"12eabk2\"\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [2]", "1hok75r\n{|\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,[[2,0,0,0],0]]]", "{|\n|-\n|2izy4a\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,[1,4]]]", "{|\n|- data-foobar=\"a18gd\"\n|\n|{{echo|style='color:red'}}|foo<!--1mhcfla-->\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,2]]", "{|\n<!--l0jph7-->|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[4,2]]", "{|<!--7ul0wr--><!--o3xuy3-->\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[4,[2,0]]]", "{|<!--4lhlq6--><!--xh8ox7-->\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[0,1]]", "{|\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[3,[[0,2,0,0],2]]]", "{|\n|-\n|1lab92f\n|\n|{{echo|style='color:red'}}|foo<!--1p2o1fy-->\n|}");
add("selser", "Empty TD followed by TD with tpl-generated attribute [[4,1]]", "{|<!--1k187m5-->\n|-\n|\n|{{echo|style='color:red'}}|foo\n|}");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[0,2],2,0,1,2]]", "<span> l5rmhw<s>x</span>z3jn5s </s>\n''' ''x'''8w414u ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [1]", "<span> <s>x</span> </s>\n''' ''x''' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[0,1,2,[0,2],0]]", "<span> <s>x</span> </s>15iw3qy\n''' h1vxth''x''' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[3,[4],4,0,3]]", "xf2mu6</s>71wk7h''' ''x'''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [2]", "1r763q9\n\n<span> <s>x</span> </s>\n''' ''x''' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[1,4,2,2,3]]", "<span data-foobar=\"wd5btd\"> <s>x</span>srkdk31n565l8\nrljud''' ''x'''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[2,[4]],3,0,[0,4],0]]", "<span>kq5t8c <s>13y9ir9</span>\n''' dutf6g''' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[3,1],4,3,2,1]]", "<span><s data-foobar=\"1wrblit\">x</span>vw6bf0120t5t4''' ''x'''<nowiki/>'' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[0,2],[3],0,3,0]]", "<span> vavhba<s>x</span></s>\n ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[3,2,0,[3,2],4]]", "1oe1h5z </s>\n'''xp77j0''x'''1p9451v");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[3,0,4,3,0]]", " </s>1th09x3 ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[1,3,0,2,1]]", "<span data-foobar=\"1vjf6ey\"> <s>x</span>\n1bjsc5w''' ''x'''<nowiki/>'' ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[3,4,4,0,2]]", "1ymqtq3z79hy4''' ''x'''tpt1co ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[0,3],[3],0,3,0]]", "<span> </span></s>\n ''");
add("selser", "Improperly nested inline or quotes tags with whitespace in between [[[2,1],[3],3,[0,3],0]]", "<span>101p464 <s data-foobar=\"1uh7la9\">x</span></s>''' ''' ''");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,4,[2,[[4]]]]", "\n\ntj8pal<table><!--1w5lbu4-->\n<tr><td>ntgtkm</td></table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [3,4,1]", "1brg7da<table data-foobar=\"174u6dg\">\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [3,2,2]", "1hpk2q8\n138ne4f<table>\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [3,2,1]", "18ibe7g\n<table data-foobar=\"11vqz9i\">\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,3,[2,2]]", "<table><!--3zxyja-->\n<!--102fhti--><tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,3,[4,4]]", "<table><!--fgfarg--><!--4laohe--></table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [2,3,3]", "1l18gdh\n\n");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,4,4]", "\n\nd785w4\n\n1wkvcj7");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [[4],2,2]", "vllav1\n\n1xxfv5o\n1cf5yak<table>\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [2,0,[3,[[4]]]]", "15sg61d\n\n\n<table><tr><td>ydxvdy</td></table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,3,4]", "\n\niur10n");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [[3],0,2]", "\necmowj<table>\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [0,0,2]", "\n2dqapu<table>\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [1,0,1]", "<nowiki> </nowiki><nowiki>||</nowiki> <nowiki>||</nowiki>\n<table data-foobar=\"dzem7s\">\n<tr> || ||\n<td> a\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [2,0,[0,3]]", "1xjp6ge\n\n\n<table></table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [2,2,[2,[3]]]", "99ylce\n\n\n\na0r7et\n<table><!--1ng353h-->\n</table>");
add("selser", "2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost) [3,4,[2,0]]", "1ha2njr<table><!--1aia805-->\n<tr> || ||\n<td> a\n</table>");
add("selser", "T73074: More fostering fun [0,4]", "\nhmcyfe");
add("selser", "T73074: More fostering fun [0,1]", "<table data-foobar=\"jbyczr\"><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [2,[[[3],0]]]", "11qdyh8\n<table>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [2,[4]]", "7mbaak\n<table><!--86l7s5-->");
add("selser", "T73074: More fostering fun [2,4]", "11dsepf\n\noz1jbv");
add("selser", "T73074: More fostering fun [1,[2]]", "[[Category:Two]]<table><!--8h50zd--><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [0,[1]]", "<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [0,2]", "\nwxr3yj<table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [0,3]", "");
add("selser", "T73074: More fostering fun [2,1]", "1sg8o2l\n<table data-foobar=\"mvg81u\"><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [0,[[[4],0]]]", "<table><td>z28tg0</td>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "T73074: More fostering fun [0,[[[3],0]]]", "<table>{{echo|<tr>}}<!--c-->[[Category:Two]]");
add("selser", "Image: upright option is ignored on inline and frame images (parsoid) [1]", "[[File:Foobar.jpg|500x500px|upright=0.5|caption]]");
add("selser", "Image: upright option is ignored on inline and frame images (parsoid) [2]", "15di39b\n\n[[File:Foobar.jpg|500x500px|upright=0.5|caption]]");
add("selser", "Normalizations should be restricted to edited content [0,4,0,3,0]", "a\n\n4x23u0\n\n= =\nb");
add("selser", "Normalizations should be restricted to edited content [0,4,0,0,[4]]", "a\n\nnyady0\n\n= =\n6n8lhf");
add("selser", "Normalizations should be restricted to edited content [[4],0,2,2,4]", "3izdel\n\n39av1d\n\n= =\n19zejoe\n1lhiigu");
add("selser", "Normalizations should be restricted to edited content [0,0,2,0,[3]]", "a\n\nyd7rm3\n\n= =\n");
add("selser", "Normalizations should be restricted to edited content [0,0,0,0,[2]]", "a\n= =\nw5yx2db");
add("selser", "Normalizations should be restricted to edited content [1,2,0,0,0]", "a\n\nhg3nd9\n\n= =\nb");
add("selser", "Normalizations should be restricted to edited content [1,2,2,3,0]", "a\n\ngerlhn\n\n1gcvetf\n\n= =\nb");
add("selser", "4a. Table cells without escapable prefixes after edits manual", "{|\n| id=\"x\" | -\n|}");
add("selser", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) [3,2,1]", "1u6lyes\n\n[[#A&B&C&amp;amp;D&amp;amp;amp;E]]");
add("selser", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) [3,2,[1]]", "1iftwuv\n\n[[#A&B&C&amp;amp;D&amp;amp;amp;E]]");
add("selser", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) [4,2,1]", "14cl05o\n\n1tpp5tp\n\n[[#A&B&C&amp;amp;D&amp;amp;amp;E]]");
add("selser", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) [1,2,[2]]", "==A&B&amp;C&amp;amp;D&amp;amp;amp;E==\nf9l1j6\n1hxsfg3[[#A&B&C&amp;amp;D&amp;amp;amp;E]]");
add("selser", "Decoding of HTML entities in headings and links for IDs and link fragments (T103714) [[0,2,0,3,0,0,0,0],4,[1]]", "==rqcvx3A&B&amp;&amp;amp;D&amp;amp;amp;E==\n3ca3lr\n\n[[#A&B&C&amp;amp;D&amp;amp;amp;E]]");
add("selser", "HTML5 ids: fallback to legacy [[2],2,4,0,4,0,[2,0],2,2,0,[0,0,1,0],2,[2,4,3,4,4,0,[2],0,0],0,2,0,2,0,[0,2,2],3]", "==3hnt60Foo bar==\n184koul\n\n1fv0pae\n\n9c9e0j\n\n==1wo5c5qТест==\ncyyr2u\n\n1uqus6p\n\n==тест==\n\n==Hey < # \" > % : '==\ndxd67q\n6rcl3m[[#Foo bar]]1iy5wy11kixd7uw85nrn [[#тест|d8wmuz#тест]] [[#Hey < # \" > % : ']]\n\ne9n5lv\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n1edwq4w<!-- These two links should produce identical HTML -->\n\n[[#啤酒]]1jhmhuh i2ro5v[[#啤酒]]\n");
add("selser", "HTML5 ids: fallback to legacy [3,3,[3],0,[0,3],0,0,0,0,0,[3,0,4,0],3,1,0,0,0,2,0,[0,2,0],3]", "==<nowiki/>==\n\n====\n\n==Тест==\n\n==тест==\n\n==Hey < # \" > %1ouzyy5: '==\n[[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n1qdjmpd<!-- These two links should produce identical HTML -->\n\n[[#啤酒]]11p8tqy [[#啤酒]]\n");
add("selser", "HTML5 ids: fallback to legacy [[4],4,1,0,4,0,2,0,0,4,1,3,[2,0,2,2,[3],0,[4],3,1],0,2,0,2,4,1,2]", "==2o3guf==\nnf84o1\n\n==foo Bar==\n\n1mm0lvb\n\n18mfizm\n\n==Тест==\n\n==тест==\n1c7c0qj\n\n==Hey < # \" > % : '==\n7fbkl2[[#Foo bar]] uf14nc[[#foo Bar]]<nowiki/>ap3m9t [[#Тест|<nowiki/>]] [[#тест|1b71g57]][[#Hey < # \" > % : ']]\n\nlshgb0\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\nnjmp0l<!-- These two links should produce identical HTML -->\n\n1o9abpi\n\n[[#啤酒]] [[#啤酒]]\n\nvqd7t3\n");
add("selser", "HTML5 ids: fallback to legacy [0,2,3,2,1,0,[3,0],4,4,2,[0,4,2,3],0,[0,0,4,3,1,0,2,3,1],3,1,4,0,2,1,3]", "==Foo bar==\nhm8l7c\n\nwv0y8k\n\n==Тест==\n\n==Тест==\n11v9tfj\n\n1yxfqmn\n\nf72bhl\n\n==1qzpr5w17z3tk3 ==\n[[#Foo bar]] 1ienm87[[#Тест]] 1mzglam[[#тест]][[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\njycmxz<!-- These two links should produce identical HTML -->\n\njxq09\n\n[[#啤酒]] [[#啤酒]]\n");
add("selser", "HTML5 ids: fallback to legacy [0,0,[4],4,[3,0],0,0,0,[4,2],0,[0,0,0,4],0,[4,4,0,0,[3],2,0,3,[3]],0,4,4,2,3,[[4],4,1],4]", "==Foo bar==\n\n==isob9s==\nbemhh6\n\n==Тест==\n\n==Тест==\n\n==frstalzzk9c4тест==\n\n==Hey < # \" > % f2odap==\n9xzf0xha707r[[#foo Bar]] [[#Тест|<nowiki/>]]1u74jsp [[#тест]][[#Hey < # \" > % : '|<nowiki/>]]\n\n1cibaxn\n\n1ui61ms\n\n18yz9fq<!-- These two links should produce identical HTML -->\n\n[[#啤酒|1l0qjvc]]<nowiki/>j9kv6y[[#啤酒]]\n\n1kc242j");
add("selser", "HTML5 ids: fallback to legacy [2,4,2,2,[0,4],4,4,0,4,4,2,2,[4,2,[3],0,0,0,0,2,0],0,0,4,3,0,1,0]", "1314i9s\n\n==Foo bar==\niv3wi2\n\n1cgl04v\n\n==foo Bar==\n1ujol8r\n\n==1b74zyi==\nilshdm\n\n16r0tlw\n\n3zvio\n\nwvq3bd\n\n47s36g\n\n==Hey < # \" > % : '==\n3esomh\ngv5nsk11rsorm [[#foo Bar|<nowiki/>]] [[#Тест]] [[#тест]]1whhqbq [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n1nl67t3\n\n[[#啤酒]] [[#啤酒]]\n");
add("selser", "HTML5 ids: fallback to legacy [0,0,2,4,1,0,[4,3],0,[1,0],3,0,0,[2,2,[4],0,0,3,[3],2,0],3,0,0,4,3,3,0]", "==Foo bar==\n\nl3beyp\n\n==foo Bar==\nqkzffc\n\n==Тест==\n\n==1r9sd00==\n\n==тест==\n\n==Hey < # \" > % : '==\ntga6q3[[#Foo bar]]1uidjoh [[#foo Bar|xlw38e]] [[#Тест]][[#тест|<nowiki/>]]1ag3h0w [[#Hey < # \" > % : ']]\n\n{{anchorencode:💩}} <span id=\"{{anchorencode:💩}}\"></span>\n\n1ei6pgl\n");
add("selser", "T90902: Normalize weird characters in section IDs [3,4,[1],4]", "1nz21r6\n\n[[#Foo bar]]\n\n15rebhj");
add("selser", "T90902: Normalize weird characters in section IDs [3,2,1,0]", "16btgmm\n\n[[#Foo bar]]\n");
add("selser", "Section wrapping with template-generated sections (bad nesting 3) [3,0,0,[3,0,0]]", "=1=\na\n\n{{echo|1=\n==1.2==\nb\n=2=\nc\n}}\n\nd\n\n\ne");
add("selser", "Section wrapping with editable lead section + div overlapping multiple sections [[4,3],[4,2,[2],0],[1,4,1,2],[4,0,1,3,0]]", "hrfp19\n\nn5dm7x\n\n1euy0ph\n\n1o3yomza\n<div style=\"border:1px solid red;\" data-foobar=\"188ni0p\">\nb\n\n==1.1==\nc\n\n=2=\nd\n</div>o4asuo\ne\n1dh6a6e\n\n13vv0lg\n\nf\n\n==3.1==\ng");
add("selser", "Selser preserves lack of newline before list and allows newline after the list [[4],0,[[4],0,3]]", "ai8wub\n*78uxxn\n");
add("selser", "Selser preserves lack of newline before list and allows newline after the list [0,0,[1,0,3]]", "header\n*foo\n");
add("selser", "Selser preserves lack of newline before list and allows newline after the list [0,0,[[2],0,1]]", "header\n*o87mwvfoo\n*bar");
add("selser", "Selser preserves lack of newline before list and allows newline after the list [1,0,1]", "header\n*foo\n*bar");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [2]", "1bik3rl\n{|\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[0,[1,0]]]", "{|\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [1]", "{| data-foobar=\"1ghipod\"\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[4,1]]", "{|<!--1k2zyfv-->\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[3,2]]", "{|<!--o0yhk-->\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[3,[[1],0]]]", "{|\n| data-foobar=\"qdcuk6\" |\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[0,1]]", "{|\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[0,2]]", "{|\n<!--bfpw9r-->|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[3,[2,2]]]", "{|<!--778afi-->\n|\nheader\n*foo\n*bar\nfooter<!--1oxrpao-->\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph preceding the list [[4,2]]", "{|<!--3f9hti--><!--1gehcfn-->\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [1]", "{| data-foobar=\"1ycou3g\"\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [[2,2]]", "{|<!--15nkjtu-->\n<!--g0g84r-->|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [2]", "1alza04\n{|\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [[4,[[[0,0,0,1,0,0]],0]]]", "{|<!--1bq72t1-->\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [[4,2]]", "{|<!--1fzape3--><!--8nqx1h-->\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Selser does not introduce newlines between unedited paragraph following the list [[0,1]]", "{|\n|\nheader\n*foo\n*bar\nfooter\n|}");
add("selser", "Remove a list item but do not insert newline above list manual", "header\n*foo\n\nfooter");
add("selser", "Remove a list item but do not insert newline above list [3,0,2,0,0]", "\n1uqq4t7\n\n*foo\n*bar\nfooter");
add("selser", "Remove a list item but do not insert newline above list [1,0,[0,2,0],3,1]", "header\n*foo\n* 9d7jse\n*bar\n\nfooter");
add("selser", "Remove a list item but do not insert newline above list [1,0,1,4,2]", "header\n*foo\n*bar\n\n5dgv1d\n\n1fwdvp9\n\nfooter");
add("selser", "Remove a list item but do not insert newline above list [[2],0,[1,2,[2]],4,[2]]", "khki70header\n*foo\n* 1uqzyh9\n*7awra1bar\n\nwp0vht\n\n1bvbd0nfooter");
add("selser", "Remove a list item but do not insert newline above list [3,2,2,0,1]", "142gxih\n\n1d8ke5h\n\n*foo\n*bar\nfooter");
add("selser", "Remove a list item but do not insert newline above list [2,0,2,0,0]", "1q127jb\n\nheader\n\nwq2c29\n\n*foo\n*bar\nfooter");
// ### DO NOT REMOVE THIS LINE ### (end of automatically-generated section)
if (typeof module === 'object') {
module.exports.testBlackList = testBlackList;
}

Event Timeline