mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 10:39:53 +00:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
|
!! hooks
|
||
|
source
|
||
|
!! endhooks
|
||
|
|
||
|
!! test
|
||
|
Non-existent language
|
||
|
!!input
|
||
|
<source lang="doesnotexist">
|
||
|
foobar
|
||
|
</source>
|
||
|
!! result
|
||
|
<div class="mw-highlight"><pre>foobar</pre></div>
|
||
|
|
||
|
!! end
|
||
|
|
||
|
!! test
|
||
|
XSS is escaped
|
||
|
!!input
|
||
|
<source lang="doesnotexist">
|
||
|
<script>alert("pwnd")</script>
|
||
|
<IMG SRC=`javascript:alert("RSnake says, 'XSS'")`>
|
||
|
<IMG
|
||
|
SRC=javascript:alert(
|
||
|
'XSS')
|
||
|
\";alert('XSS');//
|
||
|
</script><script>alert('XSS');</script>
|
||
|
%253cscript%253ealert(document.cookie)%253c/script%253e
|
||
|
</source>
|
||
|
!! result
|
||
|
<div class="mw-highlight"><pre><script>alert("pwnd")</script>
|
||
|
<IMG SRC=`javascript:alert("RSnake says, 'XSS'")`>
|
||
|
<IMG
|
||
|
SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;
|
||
|
&#39;&#88;&#83;&#83;&#39;&#41;
|
||
|
\";alert('XSS');//
|
||
|
</script><script>alert('XSS');</script>
|
||
|
%253cscript%253ealert(document.cookie)%253c/script%253e</pre></div>
|
||
|
|
||
|
!! end
|