MediaWiki REL1_33
tests/parser/parserTests.txt File Reference

Variables

div cla</p > !end !test Don t break on in extension attribute in template !wikitext
 
__pad0__
 
span about
 
div cla
 
 div
 
 f9f9f9
 
with space after ! wikitext< div style="width:50% ! important"> important</div > ! html< div style="width:50%&#32;! important"> important</div > !end !test HTML bullet list
 
</p > !end !test Punctuation
 
div ss
 
Bar style ='color:brown
 
needs investigation !test T4304
 
!article Main Page !text blah blah !endarticle !article Foo !text FOO !endarticle !article Foo s bar s !text Article titles can contain single quotes !endarticle !article Template
 
 title
 
 width
 

Variable Documentation

◆ !wikitext

div cla</p > !end !test Don t break on in extension attribute in template html2html !wikitext

Definition at line 6855 of file parserTests.txt.

◆ __pad0__

i __pad0__

Definition at line 6850 of file parserTests.txt.

◆ about

span about
Initial value:
=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid=&#39;{\"pi\":[[]],\"dsr\":[12,41,null,null]}&#39; data-mw=&#39;{\"parts\":[{\"template\":{\"target\":{\"wt\":\"dangerous style attribute\",\"href\":\"./Template:Dangerous_style_attribute\"},\"params\":{},\"i\":0}}]}&#39;>border-size: expression(alert(document.cookie))&lt;/span>"}]]}'></div>
!! end
!! test
T4304: HTML attribute safety (safe parameter; 2309)
!! wikitext
{{div style|width: 200px}}
!! html/php
<div style="float: right; width: 200px">Magic div</div>
!! html/parsoid
<div style="float: right; width: 200px" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"float: right; width: 200px"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: 200px"}},"i":0}}]}'>Magic div</div>
!! end
!! test
T4304: HTML attribute safety (unsafe parameter; 2309)
!! wikitext
{{div style|width: expression(alert(document.cookie))}}
!! html/php
<div style="/* insecure input */">Magic div</div>
!! html/parsoid
<div style="/* insecure input */" about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"float: right; {{{1}}}"},"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"div style","href":"./Template:Div_style"},"params":{"1":{"wt":"width: expression(alert(document.cookie))"}},"i":0}}]}'>Magic div</div>
!! end
## Parsoid output here differs

Definition at line 18481 of file parserTests.txt.

◆ cla

div cla

Definition at line 6850 of file parserTests.txt.

◆ div

◆ f9f9f9

f9f9f9

Definition at line 183 of file parserTests.txt.

◆ list

with space after ! wikitext<div style="width:50% ! important"> important</div> ! html<div style="width:50%&#32;! important"> important</div> !end !test HTML bullet list

Definition at line 19384 of file parserTests.txt.

◆ Punctuation

</p> !end !test Punctuation

Definition at line 19368 of file parserTests.txt.

◆ ss

div ss

Definition at line 6850 of file parserTests.txt.

◆ style

◆ T4304

needs investigation !test T4304

Definition at line 18506 of file parserTests.txt.

◆ Template

Foo and Baz !endarticle !article Template

Definition at line 66 of file parserTests.txt.

◆ title

title

Definition at line 245 of file parserTests.txt.

Referenced by Job::__construct(), FileDeleteForm::__construct(), Exif::__construct(), SearchUpdate::__construct(), ImageHistoryList::__construct(), PPFuzzTest::__construct(), FeedItem::__construct(), ArchivedFile::__construct(), ErrorPageError::__construct(), File::__construct(), PageArchive::__construct(), CategoryViewer::__construct(), UnregisteredLocalFile::__construct(), JobSpecification::__construct(), CleanupInvalidDbKeys::__construct(), UpdateCollation::__construct(), MediaWiki\Widget\ComplexTitleInputWidget::__construct(), ChangesListFilterGroup::__construct(), RevisionListBase::__construct(), MergeHistoryPager::__construct(), BacklinkCache::__construct(), MediaWiki\EditPage\TextConflictHelper::__construct(), MediaWiki\Revision\RenderedRevision::__construct(), EmailNotification::actuallyNotifyOnPageChange(), CategoryMembershipChangeJobTest::addDBDataOnce(), SpecialChangeContentModel::alterForm(), LogFormatterTest::assertIRCComment(), File::assertTitleDefined(), DerivativeContext::canUseWikiPage(), EmailNotification::composeCommonMailtext(), CategoryViewer::doCategoryQuery(), RevDelFileList::doPostCommitUpdates(), RevDelRevisionList::doPostCommitUpdates(), RevDelRevisionList::doPreCommitUpdates(), ChangeTagsRevisionList::doQuery(), RevDelArchivedFileList::doQuery(), RevDelArchiveList::doQuery(), RevDelFileList::doQuery(), RevDelRevisionList::doQuery(), RevisionList::doQuery(), WebRequest::doSecurityRedirect(), SearchUpdate::doUpdate(), CategoryMembershipChangeJobTest::editPageText(), SpecialCiteThisPage::execute(), FileDeleteForm::execute(), BenchmarkTitleValue::execute(), ConvertLinks::execute(), PPFuzzTest::execute(), ApiQueryRevisionsBase::extractDeprecatedContent(), CategoryViewer::formatList(), BacklinkCache::get(), FileDeleteForm::getAction(), BacklinkCache::getCascadeProtectedLinks(), BacklinkCache::getConditions(), RevDelRevisionList::getCurrent(), ForeignDBFile::getDescriptionShortUrl(), LocalFile::getDescriptionShortUrl(), ForeignDBFile::getDescriptionText(), LocalFile::getDescriptionText(), LocalFile::getDescriptionTouched(), LocalFile::getDescriptionUrl(), MediaWiki\EditPage\TextConflictHelper::getEditConflictMainTextBox(), SpecialChangeContentModel::getFormFields(), LocalFile::getHistory(), PHPVersionCheck::getIndexErrorOutput(), PageArchive::getLastRevisionId(), File::getName(), SearchUpdate::getNormalizedTitle(), BacklinkCache::getNumLinks(), BenchmarkTitleValue::getPrefixedTextTitle(), PageArchive::getPreviousRevision(), ImportTest::getRedirectXML(), PPFuzzTest::getReport(), PageArchive::getRevisionByConditions(), MediaWiki\Revision\RenderedRevision::getSlotParserOutputUncached(), MediaWiki\Block\Restriction\PageRestriction::getTitle(), DerivativeContext::getTitle(), RequestContext::getTitle(), FeedItem::getTitle(), ArchivedFile::getTitle(), ImportTest::getUnknownTagsXML(), RequestContext::hasTitle(), ImageHistoryList::imageHistoryLine(), MediaWiki\EditPage\TextConflictHelper::incrementConflictStats(), MediaWiki\EditPage\TextConflictHelper::incrementResolvedStats(), PageArchive::isDeleted(), LogPager::limitTitle(), PageArchive::listFiles(), PageArchive::listRevisions(), ArchivedFile::load(), ArchivedFile::loadFromRow(), BacklinkCache::makeCheckKey(), LocalFile::move(), LogFormatterTest::newLogEntry(), LocalFile::nextHistoryLine(), SpecialCiteThisPage::onSubmit(), SpecialChangeContentModel::onSubmit(), SpecialChangeContentModel::onSuccess(), WebInstallerOutput::outputFooter(), WebInstallerOutput::outputHeader(), WebInstallerOutput::outputShortHeader(), CoreParserFunctions::pagesincategory(), CategoryViewer::pagingLinks(), Message::parseText(), BacklinkCache::partition(), SpecialJavaScriptTest::plainQUnit(), SpecialChangeContentModel::postText(), FileDeleteForm::prepareMessage(), Preprocessor_Hash::preprocessToObj(), ParserOutputTest::provideGetText(), PathRouterTest::provideParse(), ErrorPageError::report(), CreatePdfThumbnailsJob::run(), ReplaceTextJob::run(), DeleteLinksJob::run(), DoubleRedirectJob::run(), EnotifNotifyJob::run(), RefreshLinksJob::run(), ThumbnailRenderJob::run(), MediaWiki\Tests\Permissions\PermissionManagerTest::runConfigEditPermissions(), TitlePermissionTest::runConfigEditPermissions(), MediaWiki\Tests\Permissions\PermissionManagerTest::runGroupPermissions(), TitlePermissionTest::runGroupPermissions(), Message::serialize(), Message::setContext(), FileDeleteForm::setHeaders(), SpecialChangeContentModel::setParameter(), MediaWiki\Tests\Permissions\PermissionManagerTest::setTitle(), TitlePermissionTest::setTitle(), WikiRevision::setTitle(), MediaWiki\Block\Restriction\PageRestriction::setTitle(), DerivativeContext::setTitle(), RequestContext::setTitle(), RecentChangeTest::setUp(), LogFormatterTest::setUp(), ArticleTest::setUp(), ParserPreloadTest::setUp(), MediaWiki\Tests\Permissions\PermissionManagerTest::setUp(), TitlePermissionTest::setUp(), RevDelList::setVisibility(), FileDeleteForm::showForm(), FileDeleteForm::showLogEntries(), ArticleTest::tearDown(), ParserPreloadTest::tearDown(), MediaWiki\Tests\Permissions\PermissionManagerTest::testActionPermissions(), TitlePermissionTest::testActionPermissions(), MediaWiki\Tests\Permissions\PermissionManagerTest::testCascadingSourcesRestrictions(), TitlePermissionTest::testCascadingSourcesRestrictions(), RecentChangeTest::testHiddenCategoryChange(), LogFormatterTest::testLogParamsTypeRaw(), LogFormatterTest::testLogParamsTypeTitleLink(), LogFormatterTest::testNormalLogParams(), MediaWiki\Tests\Permissions\PermissionManagerTest::testPageRestrictions(), TitlePermissionTest::testPageRestrictions(), MediaWiki\Tests\Permissions\PermissionManagerTest::testQuickPermissions(), TitlePermissionTest::testQuickPermissions(), MediaWiki\Tests\Permissions\PermissionManagerTest::testSpecialsAndNSPermissions(), TitlePermissionTest::testSpecialsAndNSPermissions(), SideBarTest::testTrickyPipe(), ImportTest::testUnknownUserHandling(), MediaWiki\Tests\Permissions\PermissionManagerTest::testUserBlock(), TitlePermissionTest::testUserBlock(), MediaWiki\Tests\Permissions\PermissionManagerTest::testUserBlockAction(), TitlePermissionTest::testUserBlockAction(), Message::title(), MediaWiki\EditPage\TextConflictHelper::toEditContent(), JobSpecification::toSerializableArray(), Job::toString(), Message::transformText(), PageArchive::undelete(), PageArchive::undeleteRevisions(), Message::unserialize(), and wfThumbError().

◆ width

width
Initial value:
="10px" |
!! endarticle
Template:table_attribs_5
!! text
<noinclude>
|</noinclude>style="color:red;"||Bar
!! endarticle
Template:table_attribs_6
!! text
style="background: <nowiki>
red;</nowiki>" |
!! endarticle
Template:table_attribs_7
!! text
<noinclude>
|</noinclude>style{{=}}"background:&#35;f9f9f9;"|Foo<ref>foo</ref>
!! endarticle
Template:table_header_cells
!! text
{{table_attribs}}!!style='color:red
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and local administrators to define code that will be run at certain points in the mainline and to modify the data run by that mainline code Hooks can keep mainline code and make it easier to write extensions Hooks are a principled alternative to local patches for two options in MediaWiki One reverses the order of a title before displaying the article
Definition hooks.txt:33
Further assume MyExt::onFoo needs service Bar
Bar style
!article Main Page !text blah blah !endarticle !article Foo !text FOO !endarticle !article Foo s bar s !text Article titles can contain single quotes !endarticle !article Template

Definition at line 189 of file parserTests.txt.

Referenced by Exif::__construct(), ThumbnailImage::__construct(), MediaTransformError::__construct(), ArchivedFile::__construct(), ArchivedFile::loadFromRow(), LocalFile::recordUpload2(), ThumbnailImage::toHtml(), LocalFile::upgradeRow(), and OldLocalFile::upgradeRow().