From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- .../SyntaxHighlight_GeSHi/tests/parserTests.txt | 156 +++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt (limited to 'extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt') diff --git a/extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt b/extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt new file mode 100644 index 00000000..c6aaa9a4 --- /dev/null +++ b/extensions/SyntaxHighlight_GeSHi/tests/parserTests.txt @@ -0,0 +1,156 @@ +!! hooks +source +!! endhooks + +!! test +Non-existent language +!!input + +foobar + +!! result +
foobar
+ +!! end + +!! test +No language specified +!! wikitext + +foo + +!! html +
foo
+ +!! end + +!! test +No language specified (no wellformed xml) +!! config +wgWellFormedXml=false +!! wikitext + +bar + +!! html +
bar
+ +!! end + +!! test +XSS is escaped +!!input + + + + +%253cscript%253ealert(document.cookie)%253c/script%253e + +!! result +
<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
+ +!! end + +!! test +XSS is escaped (inline) +!!input + + + + +%253cscript%253ealert(document.cookie)%253c/script%253e + +!! result +

<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 +

+!! end + +!! test +Default behaviour (inner is pre) +!!input + +var a; + +!! result +
var a;
+
+ +!! end + +!! test +Multiline in lists +!!input +* a +b + +* foo a +b +!! html + + + +!! html+tidy + + +!! end + +!! test +Custom attributes +!!input +var a; +!! result +
var a;
+
+ +!! end + +!! test +Inline attribute (inline code) +!!input +Text var a;. +!! result +

Text var a;. +

+!! end + +!! test +Enclose none (inline code) +!!input +Text var a;. +!! result +

Text var a;. +

+!! end -- cgit v1.2.2