MediaWiki  1.29.1
extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt File Reference

Functions

script alert ("pwnd") &lt
 
&& alert ('XSS')
 
</source > ! result< div id="foo" class="bar mw-highlight mw-content-rtl" dir="rtl" style="font-size: larger;">< pre >< span ></span >< span class="kd"> var</span >< span class="nx"> a</span >< span class="p"></span ></pre ></div > ! end ! test Inline attribute (inline code) !!input Text< source lang
 
</p > ! end ! test Default behaviour (inner is pre) !!input< source lang
 
</source > ! result< p > Text< code class="mw-highlight" dir="ltr">< span class="kd"> var</span >< span class="nx"> a</span >< span class="p"></span ></code ></p > ! end ! test Enclose none (inline code) !!input Text< source lang
 
 script (document.cookie)%253c/script%253e</pre ></div > !! end !! test XSS is escaped(inline) !!input< source lang
 
! hooks source ! endhooks ! test Non existent language !input< source lang="doesnotexist"> foobar</source > ! result< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > foobar</pre ></div > ! end ! test No language specified ! wikitext< source > foo</source > ! html< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > foo</pre ></div > ! end ! test No language specified (no wellformed xml) !! config !! wikitext< source > bar</source > !! html< div class
 

Variables

</source > ! result< div class="mw-highlight mw-content-ltr" dir="ltr">< pre >< span ></span >< span class="kd"> var</span >< span class="nx"> a</span >< span class="p"></span ></pre ></div > ! end ! test Multiline< source/> in lists !input *< source > a b</source > *foo< source > a b</source > ! html< ul >< li >< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul >< ul >< li > foo< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul > ! html tidy< ul >< li >< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul >< ul >< li > foo< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul > ! end ! test Custom attributes !input< source lang="javascript" id="foo" class="bar" dir="rtl" style="font-size: larger;"> var a
 
amp
 
scriptgt
 
</script > document cookie script</source > ! result< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > & lt
 
IMG SRC
 

Function Documentation

◆ alert() [1/2]

alert ( "pwnd"  ) &

◆ alert() [2/2]

</script >< script > alert ( 'XSS'  )

◆ attribute()

</source> ! result<div id="foo" class="bar mw-highlight mw-content-rtl" dir="rtl" style="font-size: larger;"><pre><span></span><span class="kd"> var</span><span class="nx"> a</span><span class="p"></span></pre></div> ! end ! test Inline attribute ( inline  code)

◆ behaviour()

</p> ! end ! test Default behaviour ( inner is  pre)

◆ none()

</source> ! result<p> Text<code class="mw-highlight" dir="ltr"><span class="kd"> var</span><span class="nx"> a</span><span class="p"></span></code></p> ! end ! test Enclose none ( inline  code)

◆ script()

◆ specified()

! hooks source ! endhooks ! test Non existent language !input<source lang="doesnotexist"> foobar</source> ! result<div class="mw-highlight mw-content-ltr" dir="ltr"><pre> foobar</pre></div> ! end ! test No language specified ! wikitext<source> foo</source> ! html<div class="mw-highlight mw-content-ltr" dir="ltr"><pre> foo</pre></div> ! end ! test No language specified ( no wellformed  xml)

Variable Documentation

◆ a

</source> ! result<div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="kd"> var</span><span class="nx"> a</span><span class="p"></span></pre></div> ! end ! test Multiline<source/> in lists !input*<source> a b</source>* foo<source> a b</source> ! html<ul><li><div class="mw-highlight mw-content-ltr" dir="ltr"><pre> a b</pre></div></li></ul><ul><li> foo<div class="mw-highlight mw-content-ltr" dir="ltr"><pre> a b</pre></div></li></ul> ! html tidy<ul><li><div class="mw-highlight mw-content-ltr" dir="ltr"><pre> a b</pre></div></li></ul><ul><li> foo<div class="mw-highlight mw-content-ltr" dir="ltr"><pre> a b</pre></div></li></ul> ! end ! test Custom attributes !input<source lang="javascript" id="foo" class="bar" dir="rtl" style="font-size: larger;"> var a

◆ amp

List redirects & amp

Definition at line 57 of file parserTests.txt.

◆ gt

script& gt

Definition at line 78 of file parserTests.txt.

◆ lt

& lt

Definition at line 53 of file parserTests.txt.

◆ SRC

IMG SRC
Initial value:
=`javascript:alert("RSnake says, 'XSS'")`>

Definition at line 54 of file parserTests.txt.

lt
</script > document cookie script</source > ! result< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > & lt
Definition: parserTests.txt:53
alert
&& alert('XSS')