Version Description
- Library update
- role, aria- and data- attributes are now whitelisted to improve accessibility
Download this release
Release Info
Developer | enshrined |
Plugin | Safe SVG |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.5.0
- lib/composer.lock +5 -5
- lib/vendor/composer/installed.json +6 -6
- lib/vendor/enshrined/svg-sanitize/src/Sanitizer.php +37 -1
- lib/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php +359 -50
- lib/vendor/enshrined/svg-sanitize/tests/SanitizerTest.php +15 -0
- lib/vendor/enshrined/svg-sanitize/tests/data/ariaDataClean.svg +56 -0
- lib/vendor/enshrined/svg-sanitize/tests/data/ariaDataTest.svg +56 -0
- lib/vendor/enshrined/svg-sanitize/tests/data/externalClean.svg +1 -0
- lib/vendor/enshrined/svg-sanitize/tests/data/svgCleanOne.svg +1 -0
- readme.txt +5 -1
- safe-svg.php +1 -1
lib/composer.lock
CHANGED
@@ -9,16 +9,16 @@
|
|
9 |
"packages": [
|
10 |
{
|
11 |
"name": "enshrined/svg-sanitize",
|
12 |
-
"version": "0.
|
13 |
"source": {
|
14 |
"type": "git",
|
15 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
16 |
-
"reference": "
|
17 |
},
|
18 |
"dist": {
|
19 |
"type": "zip",
|
20 |
-
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/
|
21 |
-
"reference": "
|
22 |
"shasum": ""
|
23 |
},
|
24 |
"require-dev": {
|
@@ -42,7 +42,7 @@
|
|
42 |
}
|
43 |
],
|
44 |
"description": "An SVG sanitizer for PHP",
|
45 |
-
"time": "2017-06-
|
46 |
}
|
47 |
],
|
48 |
"packages-dev": [],
|
9 |
"packages": [
|
10 |
{
|
11 |
"name": "enshrined/svg-sanitize",
|
12 |
+
"version": "0.7.0",
|
13 |
"source": {
|
14 |
"type": "git",
|
15 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
16 |
+
"reference": "0bdbbd15b9ca501c33c9373968922d055e7064db"
|
17 |
},
|
18 |
"dist": {
|
19 |
"type": "zip",
|
20 |
+
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/0bdbbd15b9ca501c33c9373968922d055e7064db",
|
21 |
+
"reference": "0bdbbd15b9ca501c33c9373968922d055e7064db",
|
22 |
"shasum": ""
|
23 |
},
|
24 |
"require-dev": {
|
42 |
}
|
43 |
],
|
44 |
"description": "An SVG sanitizer for PHP",
|
45 |
+
"time": "2017-06-20 16:13:01"
|
46 |
}
|
47 |
],
|
48 |
"packages-dev": [],
|
lib/vendor/composer/installed.json
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "enshrined/svg-sanitize",
|
4 |
-
"version": "0.
|
5 |
-
"version_normalized": "0.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
18 |
"codeclimate/php-test-reporter": "^0.1.2",
|
19 |
"phpunit/phpunit": "^4.7"
|
20 |
},
|
21 |
-
"time": "2017-06-
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"autoload": {
|
1 |
[
|
2 |
{
|
3 |
"name": "enshrined/svg-sanitize",
|
4 |
+
"version": "0.7.0",
|
5 |
+
"version_normalized": "0.7.0.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/darylldoyle/svg-sanitizer.git",
|
9 |
+
"reference": "0bdbbd15b9ca501c33c9373968922d055e7064db"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/0bdbbd15b9ca501c33c9373968922d055e7064db",
|
14 |
+
"reference": "0bdbbd15b9ca501c33c9373968922d055e7064db",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require-dev": {
|
18 |
"codeclimate/php-test-reporter": "^0.1.2",
|
19 |
"phpunit/phpunit": "^4.7"
|
20 |
},
|
21 |
+
"time": "2017-06-20 16:13:01",
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"autoload": {
|
lib/vendor/enshrined/svg-sanitize/src/Sanitizer.php
CHANGED
@@ -260,7 +260,7 @@ class Sanitizer
|
|
260 |
$attrName = $element->attributes->item($x)->name;
|
261 |
|
262 |
// Remove attribute if not in whitelist
|
263 |
-
if (!in_array(strtolower($attrName), $this->allowedAttrs)) {
|
264 |
$element->removeAttribute($attrName);
|
265 |
}
|
266 |
|
@@ -324,4 +324,40 @@ class Sanitizer
|
|
324 |
{
|
325 |
$this->minifyXML = (bool) $shouldMinify;
|
326 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
}
|
260 |
$attrName = $element->attributes->item($x)->name;
|
261 |
|
262 |
// Remove attribute if not in whitelist
|
263 |
+
if (!in_array(strtolower($attrName), $this->allowedAttrs) && !$this->isAriaAttribute(strtolower($attrName)) && !$this->isDataAttribute(strtolower($attrName))) {
|
264 |
$element->removeAttribute($attrName);
|
265 |
}
|
266 |
|
324 |
{
|
325 |
$this->minifyXML = (bool) $shouldMinify;
|
326 |
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Check to see if an attribure is an aria attribute or not
|
330 |
+
*
|
331 |
+
* @param $attributeName
|
332 |
+
*
|
333 |
+
* @return bool
|
334 |
+
*/
|
335 |
+
protected function isAriaAttribute( $attributeName )
|
336 |
+
{
|
337 |
+
$position = strpos($attributeName, 'aria-');
|
338 |
+
|
339 |
+
if($position === 0) {
|
340 |
+
return true;
|
341 |
+
}
|
342 |
+
|
343 |
+
return false;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Check to see if an attribure is an data attribute or not
|
348 |
+
*
|
349 |
+
* @param $attributeName
|
350 |
+
*
|
351 |
+
* @return bool
|
352 |
+
*/
|
353 |
+
protected function isDataAttribute( $attributeName )
|
354 |
+
{
|
355 |
+
$position = strpos($attributeName, 'data-');
|
356 |
+
|
357 |
+
if($position === 0) {
|
358 |
+
return true;
|
359 |
+
}
|
360 |
+
|
361 |
+
return false;
|
362 |
+
}
|
363 |
}
|
lib/vendor/enshrined/svg-sanitize/src/data/AllowedAttributes.php
CHANGED
@@ -21,66 +21,375 @@ class AllowedAttributes implements AttributeInterface
|
|
21 |
{
|
22 |
return array(
|
23 |
// HTML
|
24 |
-
'accept',
|
25 |
-
'
|
26 |
-
'
|
27 |
-
'
|
28 |
-
'
|
29 |
-
'
|
30 |
-
'
|
31 |
-
'
|
32 |
-
'
|
33 |
-
'
|
34 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
// SVG
|
37 |
-
'accent-height',
|
38 |
-
'
|
39 |
-
'
|
40 |
-
'
|
41 |
-
'
|
42 |
-
'
|
43 |
-
'
|
44 |
-
'
|
45 |
-
'
|
46 |
-
'
|
47 |
-
'
|
48 |
-
'
|
49 |
-
'
|
50 |
-
'
|
51 |
-
'
|
52 |
-
'
|
53 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
// MathML
|
56 |
-
'accent',
|
57 |
-
'
|
58 |
-
'
|
59 |
-
'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
'
|
63 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
'voffset',
|
65 |
|
66 |
// XML
|
67 |
-
'xlink:href',
|
|
|
|
|
|
|
|
|
68 |
|
69 |
|
70 |
// Camel Case
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
);
|
85 |
}
|
86 |
}
|
21 |
{
|
22 |
return array(
|
23 |
// HTML
|
24 |
+
'accept',
|
25 |
+
'action',
|
26 |
+
'align',
|
27 |
+
'alt',
|
28 |
+
'autocomplete',
|
29 |
+
'background',
|
30 |
+
'bgcolor',
|
31 |
+
'border',
|
32 |
+
'cellpadding',
|
33 |
+
'cellspacing',
|
34 |
+
'checked',
|
35 |
+
'cite',
|
36 |
+
'class',
|
37 |
+
'clear',
|
38 |
+
'color',
|
39 |
+
'cols',
|
40 |
+
'colspan',
|
41 |
+
'coords',
|
42 |
+
'datetime',
|
43 |
+
'default',
|
44 |
+
'dir',
|
45 |
+
'disabled',
|
46 |
+
'download',
|
47 |
+
'enctype',
|
48 |
+
'face',
|
49 |
+
'for',
|
50 |
+
'headers',
|
51 |
+
'height',
|
52 |
+
'hidden',
|
53 |
+
'high',
|
54 |
+
'href',
|
55 |
+
'hreflang',
|
56 |
+
'id',
|
57 |
+
'ismap',
|
58 |
+
'label',
|
59 |
+
'lang',
|
60 |
+
'list',
|
61 |
+
'loop',
|
62 |
+
'low',
|
63 |
+
'max',
|
64 |
+
'maxlength',
|
65 |
+
'media',
|
66 |
+
'method',
|
67 |
+
'min',
|
68 |
+
'multiple',
|
69 |
+
'name',
|
70 |
+
'noshade',
|
71 |
+
'novalidate',
|
72 |
+
'nowrap',
|
73 |
+
'open',
|
74 |
+
'optimum',
|
75 |
+
'pattern',
|
76 |
+
'placeholder',
|
77 |
+
'poster',
|
78 |
+
'preload',
|
79 |
+
'pubdate',
|
80 |
+
'radiogroup',
|
81 |
+
'readonly',
|
82 |
+
'rel',
|
83 |
+
'required',
|
84 |
+
'rev',
|
85 |
+
'reversed',
|
86 |
+
'role',
|
87 |
+
'rows',
|
88 |
+
'rowspan',
|
89 |
+
'spellcheck',
|
90 |
+
'scope',
|
91 |
+
'selected',
|
92 |
+
'shape',
|
93 |
+
'size',
|
94 |
+
'span',
|
95 |
+
'srclang',
|
96 |
+
'start',
|
97 |
+
'src',
|
98 |
+
'step',
|
99 |
+
'style',
|
100 |
+
'summary',
|
101 |
+
'tabindex',
|
102 |
+
'title',
|
103 |
+
'type',
|
104 |
+
'usemap',
|
105 |
+
'valign',
|
106 |
+
'value',
|
107 |
+
'width',
|
108 |
+
'xmlns',
|
109 |
|
110 |
// SVG
|
111 |
+
'accent-height',
|
112 |
+
'accumulate',
|
113 |
+
'additivive',
|
114 |
+
'alignment-baseline',
|
115 |
+
'ascent',
|
116 |
+
'attributename',
|
117 |
+
'attributetype',
|
118 |
+
'azimuth',
|
119 |
+
'basefrequency',
|
120 |
+
'baseline-shift',
|
121 |
+
'begin',
|
122 |
+
'bias',
|
123 |
+
'by',
|
124 |
+
'clip',
|
125 |
+
'clip-path',
|
126 |
+
'clip-rule',
|
127 |
+
'color',
|
128 |
+
'color-interpolation',
|
129 |
+
'color-interpolation-filters',
|
130 |
+
'color-profile',
|
131 |
+
'color-rendering',
|
132 |
+
'cx',
|
133 |
+
'cy',
|
134 |
+
'd',
|
135 |
+
'dx',
|
136 |
+
'dy',
|
137 |
+
'diffuseconstant',
|
138 |
+
'direction',
|
139 |
+
'display',
|
140 |
+
'divisor',
|
141 |
+
'dur',
|
142 |
+
'edgemode',
|
143 |
+
'elevation',
|
144 |
+
'end',
|
145 |
+
'fill',
|
146 |
+
'fill-opacity',
|
147 |
+
'fill-rule',
|
148 |
+
'filter',
|
149 |
+
'flood-color',
|
150 |
+
'flood-opacity',
|
151 |
+
'font-family',
|
152 |
+
'font-size',
|
153 |
+
'font-size-adjust',
|
154 |
+
'font-stretch',
|
155 |
+
'font-style',
|
156 |
+
'font-variant',
|
157 |
+
'font-weight',
|
158 |
+
'fx',
|
159 |
+
'fy',
|
160 |
+
'g1',
|
161 |
+
'g2',
|
162 |
+
'glyph-name',
|
163 |
+
'glyphref',
|
164 |
+
'gradientunits',
|
165 |
+
'gradienttransform',
|
166 |
+
'image-rendering',
|
167 |
+
'in',
|
168 |
+
'in2',
|
169 |
+
'k',
|
170 |
+
'k1',
|
171 |
+
'k2',
|
172 |
+
'k3',
|
173 |
+
'k4',
|
174 |
+
'kerning',
|
175 |
+
'keypoints',
|
176 |
+
'keysplines',
|
177 |
+
'keytimes',
|
178 |
+
'lengthadjust',
|
179 |
+
'letter-spacing',
|
180 |
+
'kernelmatrix',
|
181 |
+
'kernelunitlength',
|
182 |
+
'lighting-color',
|
183 |
+
'local',
|
184 |
+
'marker-end',
|
185 |
+
'marker-mid',
|
186 |
+
'marker-start',
|
187 |
+
'markerheight',
|
188 |
+
'markerunits',
|
189 |
+
'markerwidth',
|
190 |
+
'maskcontentunits',
|
191 |
+
'maskunits',
|
192 |
+
'max',
|
193 |
+
'mask',
|
194 |
+
'mode',
|
195 |
+
'min',
|
196 |
+
'numoctaves',
|
197 |
+
'offset',
|
198 |
+
'operator',
|
199 |
+
'opacity',
|
200 |
+
'order',
|
201 |
+
'orient',
|
202 |
+
'orientation',
|
203 |
+
'origin',
|
204 |
+
'overflow',
|
205 |
+
'paint-order',
|
206 |
+
'path',
|
207 |
+
'pathlength',
|
208 |
+
'patterncontentunits',
|
209 |
+
'patterntransform',
|
210 |
+
'patternunits',
|
211 |
+
'points',
|
212 |
+
'preservealpha',
|
213 |
+
'r',
|
214 |
+
'rx',
|
215 |
+
'ry',
|
216 |
+
'radius',
|
217 |
+
'refx',
|
218 |
+
'refy',
|
219 |
+
'repeatcount',
|
220 |
+
'repeatdur',
|
221 |
+
'restart',
|
222 |
+
'result',
|
223 |
+
'rotate',
|
224 |
+
'scale',
|
225 |
+
'seed',
|
226 |
+
'shape-rendering',
|
227 |
+
'specularconstant',
|
228 |
+
'specularexponent',
|
229 |
+
'spreadmethod',
|
230 |
+
'stddeviation',
|
231 |
+
'stitchtiles',
|
232 |
+
'stop-color',
|
233 |
+
'stop-opacity',
|
234 |
+
'stroke-dasharray',
|
235 |
+
'stroke-dashoffset',
|
236 |
+
'stroke-linecap',
|
237 |
+
'stroke-linejoin',
|
238 |
+
'stroke-miterlimit',
|
239 |
+
'stroke-opacity',
|
240 |
+
'stroke',
|
241 |
+
'stroke-width',
|
242 |
+
'surfacescale',
|
243 |
+
'targetx',
|
244 |
+
'targety',
|
245 |
+
'transform',
|
246 |
+
'text-anchor',
|
247 |
+
'text-decoration',
|
248 |
+
'text-rendering',
|
249 |
+
'textlength',
|
250 |
+
'u1',
|
251 |
+
'u2',
|
252 |
+
'unicode',
|
253 |
+
'values',
|
254 |
+
'viewbox',
|
255 |
+
'visibility',
|
256 |
+
'vert-adv-y',
|
257 |
+
'vert-origin-x',
|
258 |
+
'vert-origin-y',
|
259 |
+
'word-spacing',
|
260 |
+
'wrap',
|
261 |
+
'writing-mode',
|
262 |
+
'xchannelselector',
|
263 |
+
'ychannelselector',
|
264 |
+
'x',
|
265 |
+
'x1',
|
266 |
+
'x2',
|
267 |
+
'y',
|
268 |
+
'y1',
|
269 |
+
'y2',
|
270 |
+
'z',
|
271 |
+
'zoomandpan',
|
272 |
|
273 |
// MathML
|
274 |
+
'accent',
|
275 |
+
'accentunder',
|
276 |
+
'bevelled',
|
277 |
+
'close',
|
278 |
+
'columnsalign',
|
279 |
+
'columnlines',
|
280 |
+
'columnspan',
|
281 |
+
'denomalign',
|
282 |
+
'depth',
|
283 |
+
'display',
|
284 |
+
'displaystyle',
|
285 |
+
'fence',
|
286 |
+
'frame',
|
287 |
+
'largeop',
|
288 |
+
'length',
|
289 |
+
'linethickness',
|
290 |
+
'lspace',
|
291 |
+
'lquote',
|
292 |
+
'mathbackground',
|
293 |
+
'mathcolor',
|
294 |
+
'mathsize',
|
295 |
+
'mathvariant',
|
296 |
+
'maxsize',
|
297 |
+
'minsize',
|
298 |
+
'movablelimits',
|
299 |
+
'notation',
|
300 |
+
'numalign',
|
301 |
+
'open',
|
302 |
+
'rowalign',
|
303 |
+
'rowlines',
|
304 |
+
'rowspacing',
|
305 |
+
'rowspan',
|
306 |
+
'rspace',
|
307 |
+
'rquote',
|
308 |
+
'scriptlevel',
|
309 |
+
'scriptminsize',
|
310 |
+
'scriptsizemultiplier',
|
311 |
+
'selection',
|
312 |
+
'separator',
|
313 |
+
'separators',
|
314 |
+
'stretchy',
|
315 |
+
'subscriptshift',
|
316 |
+
'supscriptshift',
|
317 |
+
'symmetric',
|
318 |
'voffset',
|
319 |
|
320 |
// XML
|
321 |
+
'xlink:href',
|
322 |
+
'xml:id',
|
323 |
+
'xlink:title',
|
324 |
+
'xml:space',
|
325 |
+
'xmlns:xlink',
|
326 |
|
327 |
|
328 |
// Camel Case
|
329 |
+
'allowreorder',
|
330 |
+
'attributename',
|
331 |
+
'attributetype',
|
332 |
+
'autoreverse',
|
333 |
+
'basefrequency',
|
334 |
+
'baseprofile',
|
335 |
+
'calcmode',
|
336 |
+
'clippathunits',
|
337 |
+
'contentscripttype',
|
338 |
+
'contentstyletype',
|
339 |
+
'diffuseconstant',
|
340 |
+
'edgemode',
|
341 |
+
'externalresourcesrequired',
|
342 |
+
'filterres',
|
343 |
+
'filterunits',
|
344 |
+
'glyphref',
|
345 |
+
'gradienttransform',
|
346 |
+
'gradientunits',
|
347 |
+
'kernelmatrix',
|
348 |
+
'kernelunitlength',
|
349 |
+
'keypoints',
|
350 |
+
'keysplines',
|
351 |
+
'keytimes',
|
352 |
+
'lengthadjust',
|
353 |
+
'limitingconeangle',
|
354 |
+
'markerheight',
|
355 |
+
'markerunits',
|
356 |
+
'markerwidth',
|
357 |
+
'maskcontentunits',
|
358 |
+
'maskunits',
|
359 |
+
'numoctaves',
|
360 |
+
'pathlength',
|
361 |
+
'patterncontentunits',
|
362 |
+
'patterntransform',
|
363 |
+
'patternunits',
|
364 |
+
'pointsatx',
|
365 |
+
'pointsaty',
|
366 |
+
'pointsatz',
|
367 |
+
'preservealpha',
|
368 |
+
'preserveaspectratio',
|
369 |
+
'primitiveunits',
|
370 |
+
'refx',
|
371 |
+
'refy',
|
372 |
+
'repeatcount',
|
373 |
+
'repeatdur',
|
374 |
+
'requiredextensions',
|
375 |
+
'requiredfeatures',
|
376 |
+
'specularconstant',
|
377 |
+
'specularexponent',
|
378 |
+
'spreadmethod',
|
379 |
+
'startoffset',
|
380 |
+
'stddeviation',
|
381 |
+
'stitchtiles',
|
382 |
+
'surfacescale',
|
383 |
+
'systemlanguage',
|
384 |
+
'tablevalues',
|
385 |
+
'targetx',
|
386 |
+
'targety',
|
387 |
+
'textlength',
|
388 |
+
'viewbox',
|
389 |
+
'viewtarget',
|
390 |
+
'xchannelselector',
|
391 |
+
'ychannelselector',
|
392 |
+
'zoomandpan',
|
393 |
);
|
394 |
}
|
395 |
}
|
lib/vendor/enshrined/svg-sanitize/tests/SanitizerTest.php
CHANGED
@@ -148,4 +148,19 @@ class SanitizerTest extends PHPUnit_Framework_TestCase
|
|
148 |
|
149 |
$this->assertXmlStringEqualsXmlString($expected, $cleanData);
|
150 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
148 |
|
149 |
$this->assertXmlStringEqualsXmlString($expected, $cleanData);
|
150 |
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Test that ARIA and Data Attributes are allowed
|
154 |
+
*/
|
155 |
+
public function testThatAriaAndDataAttributesAreAllowed()
|
156 |
+
{
|
157 |
+
$initialData = file_get_contents('tests/data/ariaDataTest.svg');
|
158 |
+
$expected = file_get_contents('tests/data/ariaDataClean.svg');
|
159 |
+
|
160 |
+
$this->class->minify(false);
|
161 |
+
$cleanData = $this->class->sanitize($initialData);
|
162 |
+
$this->class->minify(false);
|
163 |
+
|
164 |
+
$this->assertXmlStringEqualsXmlString($expected, $cleanData);
|
165 |
+
}
|
166 |
}
|
lib/vendor/enshrined/svg-sanitize/tests/data/ariaDataClean.svg
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg id="cat" viewBox="0 0 720 800" aria-labelledby="catTitle catDesc" role="img">
|
2 |
+
<title id="catTitle">Pixels, My Super-friendly Cat</title>
|
3 |
+
<desc id="catDesc">An illustrated gray cat with bright green blinking eyes.</desc>
|
4 |
+
<path id="tail" data-name="tail" class="cls-1" d="M545.9,695.9c8,28.2,23.2,42.3,27.2,46.9,21.4,24.1,41.5,40.2,81.1,42.9s65.4-14.2,60.8-26.8-23.1-9.1-51.3-8.3c-35.2.9-66.6-31.3-74.8-63.9s-7.9-63.8-36.8-85.5c-44.1-33-135.6-7.1-159.8-3.4s-48.4,52.5-9.6,45.1,91.4-23.1,123.2-12.7C537.8,640.4,537.9,667.7,545.9,695.9Z" transform="translate(-9.7 -9.3)"/>
|
5 |
+
<g id="body">
|
6 |
+
<path id="bg" class="cls-2" d="M447.9,502.1c2.1,151.7-108.3,167-216.5,167S9.7,663.8,9.7,510.9,85,242.9,231.3,241,445.8,350.4,447.9,502.1h0Z" transform="translate(-9.7 -9.3)"/>
|
7 |
+
<g id="leftleg">
|
8 |
+
<path id="leg" class="cls-1" d="M195.6,671.5c-34.2-7.7-40.6-95.6-53.3-191-12-90-90.1-177.2-55.1-177.2s145.7,12,151.4,87.7S261.5,686.5,195.6,671.5Z" transform="translate(-9.7 -9.3)"/>
|
9 |
+
<path id="foot" class="cls-3" d="M172.2,688.1c31.6,2.1,56.6-8.7,59.8-32.4s-22.1-49.5-27.3-24.3c25-16.4-39.1-29.4-27.6-3.9,14-24.9-49.6-19.2-31.9-.1-6.5-27.2-35.6,8.2-30.1,29.3C121.5,681.8,140.5,686,172.2,688.1Z" transform="translate(-9.7 -9.3)"/>
|
10 |
+
</g>
|
11 |
+
<g id="rightleg">
|
12 |
+
<path id="leg-2" data-name="leg" class="cls-1" d="M260.4,670.4c42.4-9.2,48.7-87.7,53.9-185.2,5.1-96,98.2-176.1,63.1-176.1s-164,15.7-164,111.8C213.4,420.9,199.1,683.7,260.4,670.4Z" transform="translate(-9.7 -9.3)"/>
|
13 |
+
<path id="foot-2" data-name="foot" class="cls-3" d="M279.4,689.8c-31.7,2-56.6-9-59.6-32.6s22.3-49.4,27.4-24.1c-24.9-16.5,39.2-29.2,27.6-3.8-13.9-25,49.7-18.9,31.9,0,6.6-27.1,35.6,8.4,30,29.4-6.7,25-25.7,29.1-57.3,31.1h0Z" transform="translate(-9.7 -9.3)"/>
|
14 |
+
</g>
|
15 |
+
<path id="tuft" aria-haspopup="false" class="cls-3" d="M80,331.2c3.5,9.5,1.2,28.9,4.3,32.7s31.5-30,43-20.6c10.7,8.7,1.7,55.9,12.9,64.5,10.1,7.7,32.1-50.6,52.5-38.7,24.9,14.6,34.1,49.9,49,49.9,18.3,0,7.5-49.5,24.1-53.3s46.1,52.6,60.2,45.6c4.8-2.4,3-50.4,12-57.6,8.7-6.9,30.5,22.4,33.5,18.9,3.7-4.1.1-23.1,8.6-36.1,3.4-5.2,18.9-2.6,28.8-.4a3.46,3.46,0,0,0,3.7-5.2c-19.6-30.8-100-147.4-184.2-147.4-93.3,0-150.9,86.8-178.1,141.6a3.43,3.43,0,0,0,3.6,4.9C63,328.4,78.4,326.6,80,331.2Z" transform="translate(-9.7 -9.3)"/>
|
16 |
+
</g>
|
17 |
+
<g id="head">
|
18 |
+
<path id="collar" class="cls-4" d="M367,231.1c5.7,36.1-4.7,71-97.8,85.6s-184-18.5-189.7-54.5,16.7-17.3,109.8-31.9,172-35.3,177.7.8" transform="translate(-9.7 -9.3)"/>
|
19 |
+
<g id="bg-2" data-name="bg">
|
20 |
+
<path class="cls-1" d="M362.5,229.5C339.7,279,273.1,299.4,225,300c-60.6.7-134.7-29.5-153.5-86.4C45.6,135.4,132.2,32.6,225,35.8c96.1,3.4,171.7,119.4,137.5,193.7" transform="translate(-9.7 -9.3)"/>
|
21 |
+
<path class="cls-5" d="M362.5,229.5C339.7,279,273.1,299.4,225,300c-60.6.7-134.7-29.5-153.5-86.4C45.6,135.4,132.2,32.6,225,35.8,321.1,39.2,396.7,155.2,362.5,229.5Z" transform="translate(-9.7 -9.3)"/>
|
22 |
+
</g>
|
23 |
+
<g id="leftear" aria-label="Left Ear">
|
24 |
+
<path id="outer" class="cls-1" d="M92.7,117c-2.6,4.7-14.7-16.1-16.5-45-3.3-27.7,3.7-63.4,5.4-62C80.7,8,117,10,143,20c27.5,8.9,44.7,25.7,39.5,27.1-30,23.4-59.9,46.6-89.8,69.9" transform="translate(-9.7 -9.3)"/>
|
25 |
+
<path id="inner" class="cls-6" d="M105.8,106.9C103.9,110.3,95.3,95.5,94,75c-2.3-19.6,2.6-44.9,3.8-44-0.6-1.4,25.1,0,43.6,7.1,19.5,6.3,31.7,18.2,28,19.2q-31.8,24.9-63.6,49.6" transform="translate(-9.7 -9.3)"/>
|
26 |
+
</g>
|
27 |
+
<path id="mask" class="cls-2" d="M338.4,142.5c-2.2,3.3,19.4,19.6,17.2,23.2s-24.3-7.8-25.8-5.2c-1.9,3.3,33.4,24.1,31,29.2-2.3,4.9-34-14.4-84.3-18.1a141.76,141.76,0,0,1-16.4-2.1,91.21,91.21,0,0,1-13.7-3.9c-19.8-6.9-27.7-10.6-32.7-12-19.3-5.7-26.8,11.3-68.1,22.4-18.8,5-37.9,9.7-54.4,0-2.1-1.3-13.6-8.3-16.7-21.1-0.9-3.6-2.8-15.2,10.5-34C146.3,34.3,216.5,34,217.3,34a131.52,131.52,0,0,1,58.4,14.3c-7.6,4.9-11.2,9.5-9,10.1,21.5,16.5,43.1,33,64.6,49.5,0.9,1.7,3.6-1.3,6.3-7.3,19.3,30.5,22.1,41.5,18.9,44.3-3.8,3.6-16.4-4.8-18.1-2.4" transform="translate(-9.7 -9.3)"/>
|
28 |
+
<g id="rightear">
|
29 |
+
<path id="outer-2" data-name="outer" class="cls-2" d="M344.9,119.9c2.6,4.7,14.7-16.1,16.5-45,3.3-27.7-3.7-63.4-5.4-62,0.9-2-35.4,0-61.4,10-27.5,8.9-44.7,25.7-39.5,27.1q44.85,35,89.8,69.9" transform="translate(-9.7 -9.3)"/>
|
30 |
+
<path id="inner-2" data-name="inner" class="cls-6" d="M343.5,76.2a77.83,77.83,0,0,1-5.6,24.6c-15.1-20.3-36-39.8-61-52.4a82,82,0,0,1,19.2-9.1c18.5-7.1,44.2-8.5,43.6-7.1,1.2-.9,6.1,24.4,3.8,44" transform="translate(-9.7 -9.3)"/>
|
31 |
+
</g>
|
32 |
+
<g id="nose">
|
33 |
+
<path class="cls-7" d="M205.1,201.8l-10.6-18.3a9,9,0,0,1,7.7-13.4h21.2a8.9,8.9,0,0,1,7.7,13.4l-10.6,18.3a8.91,8.91,0,0,1-15.4,0" transform="translate(-9.7 -9.3)"/>
|
34 |
+
<path class="cls-6" d="M194.2,175.1a9,9,0,0,0,.3,8.4l10.6,18.3a8.92,8.92,0,0,0,15.5,0l8.7-15c-5.8-6.2-19.3-10.1-35.1-11.7" transform="translate(-9.7 -9.3)"/>
|
35 |
+
</g>
|
36 |
+
<g id="mouth">
|
37 |
+
<path class="cls-8" d="M166.7,260.4c-24.4,0-44.1-25-44.1-55.9m88.2,0c0,30.9-19.7,55.9-44.1,55.9m89.9,0c24.4,0,44.1-25,44.1-55.9m-88.2,0c0,30.9,19.7,55.9,44.1,55.9" transform="translate(-9.7 -9.3)"/>
|
38 |
+
<path class="cls-9" d="M300.7,204.5a65.16,65.16,0,0,1-8,32" transform="translate(-9.7 -9.3)"/>
|
39 |
+
</g>
|
40 |
+
<path id="wiskers" class="cls-10" d="M188.7,198.4c0-12.9-72.7-23.3-162.6-23.3m162.6,36.2c0-7.1-65.8-12.9-147.1-12.9m196,1.3c1.4-12.8,74.8-15.6,164.1-6.2m-165.4,19c0.7-7.1,66.8-5.9,147.6,2.6" transform="translate(-9.7 -9.3)"/>
|
41 |
+
<g id="lefteye" class="eye">
|
42 |
+
<path id="iris" class="cls-4" d="M188.6,141.5s-18.3,12.3-35.8,7.9-30-15.2-27.7-24c1.5-6,9.6-9.6,20.2-9.8a59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,60,60,0,0,1,15.1,17.8" transform="translate(-9.7 -9.3)"/>
|
43 |
+
<path class="cls-11" d="M125.1,123.6c1.5-6,9.6-9.6,20.1-9.8a59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,59.47,59.47,0,0,1,15.2,17.8" transform="translate(-9.7 -9.3)"/>
|
44 |
+
<path id="pupil" class="cls-12" d="M172.9,124.3c-2.3,9.2-10.7,15-18.7,13s-12.5-11.1-10.2-20.4a22.39,22.39,0,0,1,1.1-3.1,59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,8.6,8.6,0,0,1-.4,2.4" transform="translate(-9.7 -9.3)"/>
|
45 |
+
<path id="eyelash" class="cls-13" d="M124.9,121.5c-7.6,2.6-17.1-4.7-21.1-16.3m33.6,9.5c-7.5,2.9-17.3-4-21.7-15.5m36.7,14.6c-8.1-.1-14.5-10.2-14.3-22.6" transform="translate(-9.7 -9.3)"/>
|
46 |
+
<path id="reflection" class="cls-14" d="M156.8,122c0,3.6-2.6,6.4-5.8,6.4s-5.8-2.9-5.8-6.4,2.6-6.4,5.8-6.4,5.8,2.9,5.8,6.4" transform="translate(-9.7 -9.3)"/>
|
47 |
+
</g>
|
48 |
+
<g id="righteye" class="eye">
|
49 |
+
<path id="iris-2" data-name="iris" class="cls-4" d="M241.4,143.6s18.5,11.9,36,7.1,29.6-15.8,27.2-24.6c-1.7-6-9.8-9.4-20.3-9.4a59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,60.14,60.14,0,0,0-14.9,18.3" transform="translate(-9.7 -9.3)"/>
|
50 |
+
<path id="lid" class="cls-11" d="M304.5,124.4c-1.7-6-9.8-9.4-20.3-9.4a59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,61.21,61.21,0,0,0-14.9,18.1" transform="translate(-9.7 -9.3)"/>
|
51 |
+
<path id="pupil-2" data-name="pupil" class="cls-12" d="M256.7,126.1c2.5,9.2,11,14.8,18.9,12.6s12.3-11.4,9.8-20.6a16.59,16.59,0,0,0-1.2-3.1,59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,9.23,9.23,0,0,0,.5,2.5" transform="translate(-9.7 -9.3)"/>
|
52 |
+
<path id="eyelash-2" data-name="eyelash" class="cls-13" d="M302.9,122.3c7.7,2.5,17-5,20.8-16.8M292,115.7c7.6,2.8,17.2-4.4,21.4-16M277,115.1c8.1-.3,14.3-10.5,13.9-22.8" transform="translate(-9.7 -9.3)"/>
|
53 |
+
<path id="reflection-2" data-name="reflection" class="cls-14" d="M271.1,127.1c0,3.6-2.6,6.5-5.8,6.5s-5.8-2.9-5.8-6.5,2.6-6.4,5.8-6.4,5.8,2.9,5.8,6.4" transform="translate(-9.7 -9.3)"/>
|
54 |
+
</g>
|
55 |
+
</g>
|
56 |
+
</svg>
|
lib/vendor/enshrined/svg-sanitize/tests/data/ariaDataTest.svg
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg version="1" id="cat" viewBox="0 0 720 800" aria-labelledby="catTitle catDesc" role="img">
|
2 |
+
<title id="catTitle" arial-dontallow="nope">Pixels, My Super-friendly Cat</title>
|
3 |
+
<desc id="catDesc">An illustrated gray cat with bright green blinking eyes.</desc>
|
4 |
+
<path id="tail" data-name="tail" class="cls-1" d="M545.9,695.9c8,28.2,23.2,42.3,27.2,46.9,21.4,24.1,41.5,40.2,81.1,42.9s65.4-14.2,60.8-26.8-23.1-9.1-51.3-8.3c-35.2.9-66.6-31.3-74.8-63.9s-7.9-63.8-36.8-85.5c-44.1-33-135.6-7.1-159.8-3.4s-48.4,52.5-9.6,45.1,91.4-23.1,123.2-12.7C537.8,640.4,537.9,667.7,545.9,695.9Z" transform="translate(-9.7 -9.3)"/>
|
5 |
+
<g id="body">
|
6 |
+
<path id="bg" class="cls-2" d="M447.9,502.1c2.1,151.7-108.3,167-216.5,167S9.7,663.8,9.7,510.9,85,242.9,231.3,241,445.8,350.4,447.9,502.1h0Z" transform="translate(-9.7 -9.3)"/>
|
7 |
+
<g id="leftleg" datas-dontallow="nope">
|
8 |
+
<path id="leg" class="cls-1" d="M195.6,671.5c-34.2-7.7-40.6-95.6-53.3-191-12-90-90.1-177.2-55.1-177.2s145.7,12,151.4,87.7S261.5,686.5,195.6,671.5Z" transform="translate(-9.7 -9.3)"/>
|
9 |
+
<path id="foot" class="cls-3" d="M172.2,688.1c31.6,2.1,56.6-8.7,59.8-32.4s-22.1-49.5-27.3-24.3c25-16.4-39.1-29.4-27.6-3.9,14-24.9-49.6-19.2-31.9-.1-6.5-27.2-35.6,8.2-30.1,29.3C121.5,681.8,140.5,686,172.2,688.1Z" transform="translate(-9.7 -9.3)"/>
|
10 |
+
</g>
|
11 |
+
<g id="rightleg">
|
12 |
+
<path id="leg-2" data-name="leg" class="cls-1" d="M260.4,670.4c42.4-9.2,48.7-87.7,53.9-185.2,5.1-96,98.2-176.1,63.1-176.1s-164,15.7-164,111.8C213.4,420.9,199.1,683.7,260.4,670.4Z" transform="translate(-9.7 -9.3)"/>
|
13 |
+
<path id="foot-2" data-name="foot" class="cls-3" d="M279.4,689.8c-31.7,2-56.6-9-59.6-32.6s22.3-49.4,27.4-24.1c-24.9-16.5,39.2-29.2,27.6-3.8-13.9-25,49.7-18.9,31.9,0,6.6-27.1,35.6,8.4,30,29.4-6.7,25-25.7,29.1-57.3,31.1h0Z" transform="translate(-9.7 -9.3)"/>
|
14 |
+
</g>
|
15 |
+
<path id="tuft" aria-haspopup="false" class="cls-3" d="M80,331.2c3.5,9.5,1.2,28.9,4.3,32.7s31.5-30,43-20.6c10.7,8.7,1.7,55.9,12.9,64.5,10.1,7.7,32.1-50.6,52.5-38.7,24.9,14.6,34.1,49.9,49,49.9,18.3,0,7.5-49.5,24.1-53.3s46.1,52.6,60.2,45.6c4.8-2.4,3-50.4,12-57.6,8.7-6.9,30.5,22.4,33.5,18.9,3.7-4.1.1-23.1,8.6-36.1,3.4-5.2,18.9-2.6,28.8-.4a3.46,3.46,0,0,0,3.7-5.2c-19.6-30.8-100-147.4-184.2-147.4-93.3,0-150.9,86.8-178.1,141.6a3.43,3.43,0,0,0,3.6,4.9C63,328.4,78.4,326.6,80,331.2Z" transform="translate(-9.7 -9.3)"/>
|
16 |
+
</g>
|
17 |
+
<g id="head">
|
18 |
+
<path id="collar" class="cls-4" d="M367,231.1c5.7,36.1-4.7,71-97.8,85.6s-184-18.5-189.7-54.5,16.7-17.3,109.8-31.9,172-35.3,177.7.8" transform="translate(-9.7 -9.3)"/>
|
19 |
+
<g id="bg-2" data-name="bg">
|
20 |
+
<path class="cls-1" d="M362.5,229.5C339.7,279,273.1,299.4,225,300c-60.6.7-134.7-29.5-153.5-86.4C45.6,135.4,132.2,32.6,225,35.8c96.1,3.4,171.7,119.4,137.5,193.7" transform="translate(-9.7 -9.3)"/>
|
21 |
+
<path class="cls-5" d="M362.5,229.5C339.7,279,273.1,299.4,225,300c-60.6.7-134.7-29.5-153.5-86.4C45.6,135.4,132.2,32.6,225,35.8,321.1,39.2,396.7,155.2,362.5,229.5Z" transform="translate(-9.7 -9.3)"/>
|
22 |
+
</g>
|
23 |
+
<g id="leftear" aria-label="Left Ear">
|
24 |
+
<path id="outer" class="cls-1" d="M92.7,117c-2.6,4.7-14.7-16.1-16.5-45-3.3-27.7,3.7-63.4,5.4-62C80.7,8,117,10,143,20c27.5,8.9,44.7,25.7,39.5,27.1-30,23.4-59.9,46.6-89.8,69.9" transform="translate(-9.7 -9.3)"/>
|
25 |
+
<path id="inner" class="cls-6" d="M105.8,106.9C103.9,110.3,95.3,95.5,94,75c-2.3-19.6,2.6-44.9,3.8-44-0.6-1.4,25.1,0,43.6,7.1,19.5,6.3,31.7,18.2,28,19.2q-31.8,24.9-63.6,49.6" transform="translate(-9.7 -9.3)"/>
|
26 |
+
</g>
|
27 |
+
<path id="mask" class="cls-2" d="M338.4,142.5c-2.2,3.3,19.4,19.6,17.2,23.2s-24.3-7.8-25.8-5.2c-1.9,3.3,33.4,24.1,31,29.2-2.3,4.9-34-14.4-84.3-18.1a141.76,141.76,0,0,1-16.4-2.1,91.21,91.21,0,0,1-13.7-3.9c-19.8-6.9-27.7-10.6-32.7-12-19.3-5.7-26.8,11.3-68.1,22.4-18.8,5-37.9,9.7-54.4,0-2.1-1.3-13.6-8.3-16.7-21.1-0.9-3.6-2.8-15.2,10.5-34C146.3,34.3,216.5,34,217.3,34a131.52,131.52,0,0,1,58.4,14.3c-7.6,4.9-11.2,9.5-9,10.1,21.5,16.5,43.1,33,64.6,49.5,0.9,1.7,3.6-1.3,6.3-7.3,19.3,30.5,22.1,41.5,18.9,44.3-3.8,3.6-16.4-4.8-18.1-2.4" transform="translate(-9.7 -9.3)"/>
|
28 |
+
<g id="rightear">
|
29 |
+
<path id="outer-2" data-name="outer" class="cls-2" d="M344.9,119.9c2.6,4.7,14.7-16.1,16.5-45,3.3-27.7-3.7-63.4-5.4-62,0.9-2-35.4,0-61.4,10-27.5,8.9-44.7,25.7-39.5,27.1q44.85,35,89.8,69.9" transform="translate(-9.7 -9.3)"/>
|
30 |
+
<path id="inner-2" data-name="inner" class="cls-6" d="M343.5,76.2a77.83,77.83,0,0,1-5.6,24.6c-15.1-20.3-36-39.8-61-52.4a82,82,0,0,1,19.2-9.1c18.5-7.1,44.2-8.5,43.6-7.1,1.2-.9,6.1,24.4,3.8,44" transform="translate(-9.7 -9.3)"/>
|
31 |
+
</g>
|
32 |
+
<g id="nose">
|
33 |
+
<path class="cls-7" d="M205.1,201.8l-10.6-18.3a9,9,0,0,1,7.7-13.4h21.2a8.9,8.9,0,0,1,7.7,13.4l-10.6,18.3a8.91,8.91,0,0,1-15.4,0" transform="translate(-9.7 -9.3)"/>
|
34 |
+
<path class="cls-6" d="M194.2,175.1a9,9,0,0,0,.3,8.4l10.6,18.3a8.92,8.92,0,0,0,15.5,0l8.7-15c-5.8-6.2-19.3-10.1-35.1-11.7" transform="translate(-9.7 -9.3)"/>
|
35 |
+
</g>
|
36 |
+
<g id="mouth">
|
37 |
+
<path class="cls-8" d="M166.7,260.4c-24.4,0-44.1-25-44.1-55.9m88.2,0c0,30.9-19.7,55.9-44.1,55.9m89.9,0c24.4,0,44.1-25,44.1-55.9m-88.2,0c0,30.9,19.7,55.9,44.1,55.9" transform="translate(-9.7 -9.3)"/>
|
38 |
+
<path class="cls-9" d="M300.7,204.5a65.16,65.16,0,0,1-8,32" transform="translate(-9.7 -9.3)"/>
|
39 |
+
</g>
|
40 |
+
<path id="wiskers" class="cls-10" d="M188.7,198.4c0-12.9-72.7-23.3-162.6-23.3m162.6,36.2c0-7.1-65.8-12.9-147.1-12.9m196,1.3c1.4-12.8,74.8-15.6,164.1-6.2m-165.4,19c0.7-7.1,66.8-5.9,147.6,2.6" transform="translate(-9.7 -9.3)"/>
|
41 |
+
<g id="lefteye" class="eye">
|
42 |
+
<path id="iris" class="cls-4" d="M188.6,141.5s-18.3,12.3-35.8,7.9-30-15.2-27.7-24c1.5-6,9.6-9.6,20.2-9.8a59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,60,60,0,0,1,15.1,17.8" transform="translate(-9.7 -9.3)"/>
|
43 |
+
<path class="cls-11" d="M125.1,123.6c1.5-6,9.6-9.6,20.1-9.8a59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,59.47,59.47,0,0,1,15.2,17.8" transform="translate(-9.7 -9.3)"/>
|
44 |
+
<path id="pupil" class="cls-12" d="M172.9,124.3c-2.3,9.2-10.7,15-18.7,13s-12.5-11.1-10.2-20.4a22.39,22.39,0,0,1,1.1-3.1,59.5,59.5,0,0,1,15.7,1.9,35.75,35.75,0,0,1,12.5,6.2,8.6,8.6,0,0,1-.4,2.4" transform="translate(-9.7 -9.3)"/>
|
45 |
+
<path id="eyelash" class="cls-13" d="M124.9,121.5c-7.6,2.6-17.1-4.7-21.1-16.3m33.6,9.5c-7.5,2.9-17.3-4-21.7-15.5m36.7,14.6c-8.1-.1-14.5-10.2-14.3-22.6" transform="translate(-9.7 -9.3)"/>
|
46 |
+
<path id="reflection" class="cls-14" d="M156.8,122c0,3.6-2.6,6.4-5.8,6.4s-5.8-2.9-5.8-6.4,2.6-6.4,5.8-6.4,5.8,2.9,5.8,6.4" transform="translate(-9.7 -9.3)"/>
|
47 |
+
</g>
|
48 |
+
<g id="righteye" class="eye">
|
49 |
+
<path id="iris-2" data-name="iris" class="cls-4" d="M241.4,143.6s18.5,11.9,36,7.1,29.6-15.8,27.2-24.6c-1.7-6-9.8-9.4-20.3-9.4a59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,60.14,60.14,0,0,0-14.9,18.3" transform="translate(-9.7 -9.3)"/>
|
50 |
+
<path id="lid" class="cls-11" d="M304.5,124.4c-1.7-6-9.8-9.4-20.3-9.4a59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,61.21,61.21,0,0,0-14.9,18.1" transform="translate(-9.7 -9.3)"/>
|
51 |
+
<path id="pupil-2" data-name="pupil" class="cls-12" d="M256.7,126.1c2.5,9.2,11,14.8,18.9,12.6s12.3-11.4,9.8-20.6a16.59,16.59,0,0,0-1.2-3.1,59.21,59.21,0,0,0-15.6,2.2,37.44,37.44,0,0,0-12.4,6.4,9.23,9.23,0,0,0,.5,2.5" transform="translate(-9.7 -9.3)"/>
|
52 |
+
<path id="eyelash-2" data-name="eyelash" class="cls-13" d="M302.9,122.3c7.7,2.5,17-5,20.8-16.8M292,115.7c7.6,2.8,17.2-4.4,21.4-16M277,115.1c8.1-.3,14.3-10.5,13.9-22.8" transform="translate(-9.7 -9.3)"/>
|
53 |
+
<path id="reflection-2" data-name="reflection" class="cls-14" d="M271.1,127.1c0,3.6-2.6,6.5-5.8,6.5s-5.8-2.9-5.8-6.5,2.6-6.4,5.8-6.4,5.8,2.9,5.8,6.4" transform="translate(-9.7 -9.3)"/>
|
54 |
+
</g>
|
55 |
+
</g>
|
56 |
+
</svg>
|
lib/vendor/enshrined/svg-sanitize/tests/data/externalClean.svg
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
2 |
<rect x="0" y="0" width="1000" height="1000"></rect>
|
3 |
<rect x="0" y="0" width="1000" height="1000"></rect>
|
1 |
+
<?xml version="1.0" encoding="utf-8" ?>
|
2 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
3 |
<rect x="0" y="0" width="1000" height="1000"></rect>
|
4 |
<rect x="0" y="0" width="1000" height="1000"></rect>
|
lib/vendor/enshrined/svg-sanitize/tests/data/svgCleanOne.svg
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" x="0px" y="0px" width="600px" height="600px" viewBox="0 0 600 600" xml:space="preserve">
|
2 |
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="119" y1="84.5" x2="454" y2="84.5"/>
|
3 |
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="111.212" y1="102.852" x2="112.032" y2="476.623"/>
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" x="0px" y="0px" width="600px" height="600px" viewBox="0 0 600 600" xml:space="preserve">
|
3 |
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="119" y1="84.5" x2="454" y2="84.5"/>
|
4 |
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="111.212" y1="102.852" x2="112.032" y2="476.623"/>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpsvg.com/
|
|
4 |
Tags: svg, sanitize, upload, sanitise, security, svg upload, image, vector, file, graphic, media, mime
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8.0
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -39,6 +39,10 @@ Install through the WordPress directory or download, unzip and upload the files
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
|
|
42 |
= 1.4.5 =
|
43 |
* Fixes some issues with defining the size of an SVG.
|
44 |
* Library update
|
4 |
Tags: svg, sanitize, upload, sanitise, security, svg upload, image, vector, file, graphic, media, mime
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.8.0
|
7 |
+
Stable tag: 1.5.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
= 1.5.0 =
|
43 |
+
* Library update
|
44 |
+
* role, aria- and data- attributes are now whitelisted to improve accessibility
|
45 |
+
|
46 |
= 1.4.5 =
|
47 |
* Fixes some issues with defining the size of an SVG.
|
48 |
* Library update
|
safe-svg.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Safe SVG
|
4 |
Plugin URI: https://wpsvg.com/
|
5 |
Description: Allows SVG uploads into WordPress and sanitizes the SVG before saving it
|
6 |
-
Version: 1.
|
7 |
Author: Daryll Doyle
|
8 |
Author URI: http://enshrined.co.uk
|
9 |
Text Domain: safe-svg
|
3 |
Plugin Name: Safe SVG
|
4 |
Plugin URI: https://wpsvg.com/
|
5 |
Description: Allows SVG uploads into WordPress and sanitizes the SVG before saving it
|
6 |
+
Version: 1.5.0
|
7 |
Author: Daryll Doyle
|
8 |
Author URI: http://enshrined.co.uk
|
9 |
Text Domain: safe-svg
|