summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/ModernTimeline/tests/System/JsonScript/escaping.json
blob: d26547d1cb9188eb4c69461094968290de4b3945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
	"description": "Modern Timeline - escaping",
	"setup": [
		{
			"page": "News date",
			"namespace": "SMW_NS_PROPERTY",
			"contents": "[[Has type::Date]]"
		},
		{
			"page": "Description",
			"namespace": "SMW_NS_PROPERTY",
			"contents": "[[Has type::Text]]"
		},
		{
			"page": "Evil page",
			"contents": "[[News date::August 11, 2019]] [[Description::<script></script>]]"
		},
		{
			"page": "Query page",
			"contents": "{{ #ask: [[Description::+]] | format=moderntimeline | ?News date | ?Description }}"
		}
	],
	"tests": [
		{
			"about": "Evil descriptions are escaped",
			"type": "parser",
			"subject": "Query page",
			"assert-output": {
				"include-head-items": true,
				"to-contain": [
					"Evil page",
					"2019",
					"Description: &amp;lt;script&amp;gt;&amp;lt;\\/script&amp;gt"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"wgLang": "en",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}