| 1 |
<?php |
| 2 |
// If this file is called directly, abort. |
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
$whitelist_elems = array( |
| 8 |
"a", |
| 9 |
"altGlyph", |
| 10 |
"altGlyphDef", |
| 11 |
"altGlyphItem", |
| 12 |
"animate", |
| 13 |
"animateColor", |
| 14 |
"animateMotion", |
| 15 |
"animateTransform", |
| 16 |
"circle", |
| 17 |
"clipPath", |
| 18 |
"color-profile", |
| 19 |
"cursor", |
| 20 |
"defs", |
| 21 |
"desc", |
| 22 |
"ellipse", |
| 23 |
"feBlend", |
| 24 |
"feColorMatrix", |
| 25 |
"feComponentTransfer", |
| 26 |
"feComposite", |
| 27 |
"feConvolveMatrix", |
| 28 |
"feDiffuseLighting", |
| 29 |
"feDisplacementMap", |
| 30 |
"feDistantLight", |
| 31 |
"feFlood", |
| 32 |
"feFuncA", |
| 33 |
"feFuncB", |
| 34 |
"feFuncG", |
| 35 |
"feFuncR", |
| 36 |
"feGaussianBlur", |
| 37 |
"feImage", |
| 38 |
"feMerge", |
| 39 |
"feMergeNode", |
| 40 |
"feMorphology", |
| 41 |
"feOffset", |
| 42 |
"fePointLight", |
| 43 |
"feSpecularLighting", |
| 44 |
"feSpotLight", |
| 45 |
"feTile", |
| 46 |
"feTurbulence", |
| 47 |
"filter", |
| 48 |
"font", |
| 49 |
"font-face", |
| 50 |
"font-face-format", |
| 51 |
"font-face-name", |
| 52 |
"font-face-src", |
| 53 |
"font-face-uri", |
| 54 |
"foreignObject", |
| 55 |
"g", |
| 56 |
"glyph", |
| 57 |
"glyphRef", |
| 58 |
"hkern", |
| 59 |
"image", |
| 60 |
"line", |
| 61 |
"linearGradient", |
| 62 |
"marker", |
| 63 |
"mask", |
| 64 |
"metadata", |
| 65 |
"missing-glyph", |
| 66 |
"mpath", |
| 67 |
"path", |
| 68 |
"pattern", |
| 69 |
"polygon", |
| 70 |
"polyline", |
| 71 |
"radialGradient", |
| 72 |
"rect", |
| 73 |
"set", |
| 74 |
"stop", |
| 75 |
"style", |
| 76 |
"svg", |
| 77 |
"switch", |
| 78 |
"symbol", |
| 79 |
"text", |
| 80 |
"textPath", |
| 81 |
"title", |
| 82 |
"tref", |
| 83 |
"tspan", |
| 84 |
"use", |
| 85 |
"view", |
| 86 |
"vkern" |
| 87 |
); |
| 88 |
|
| 89 |
$whitelist_attrs = array( |
| 90 |
"data-borderless-svg","data-borderless-svg-custom","data-borderless-svg-morph","data-global-borderless-svg", |
| 91 |
"svgns","adobens","metans","inkns","msns", |
| 92 |
"accent-height", |
| 93 |
"accumulate", |
| 94 |
"additive", |
| 95 |
"alphabetic", |
| 96 |
"amplitude", |
| 97 |
"arabic-form", |
| 98 |
"ascent", |
| 99 |
"attributeName", |
| 100 |
"attributeType", |
| 101 |
"azimuth", |
| 102 |
"baseFrequency", |
| 103 |
"baseProfile", |
| 104 |
"bbox", |
| 105 |
"begin", |
| 106 |
"bias", |
| 107 |
"by", |
| 108 |
"calcMode", |
| 109 |
"cap-height", |
| 110 |
"class", |
| 111 |
"clipPathUnits", |
| 112 |
"contentStyleType", |
| 113 |
"cx", |
| 114 |
"cy", |
| 115 |
"d", |
| 116 |
"descent", |
| 117 |
"diffuseConstant", |
| 118 |
"divisor", |
| 119 |
"dur", |
| 120 |
"dx", |
| 121 |
"dy", |
| 122 |
"edgeMode", |
| 123 |
"elevation", |
| 124 |
"end", |
| 125 |
"exponent", |
| 126 |
"externalResourcesRequired", |
| 127 |
"fill", |
| 128 |
"filterRes", |
| 129 |
"filterUnits", |
| 130 |
"font-family", |
| 131 |
"font-size", |
| 132 |
"font-stretch", |
| 133 |
"font-style", |
| 134 |
"font-variant", |
| 135 |
"font-weight", |
| 136 |
"format", |
| 137 |
"from", |
| 138 |
"fx", |
| 139 |
"fy", |
| 140 |
"g1", |
| 141 |
"g2", |
| 142 |
"glyph-name", |
| 143 |
"glyphRef", |
| 144 |
"gradientTransform", |
| 145 |
"gradientUnits", |
| 146 |
"hanging", |
| 147 |
"height", |
| 148 |
"horiz-adv-x", |
| 149 |
"horiz-origin-x", |
| 150 |
"href", |
| 151 |
"id", |
| 152 |
"ideographic", |
| 153 |
"in", |
| 154 |
"in2", |
| 155 |
"in2", |
| 156 |
"in2", |
| 157 |
"intercept", |
| 158 |
"k", |
| 159 |
"k1", |
| 160 |
"k2", |
| 161 |
"k3", |
| 162 |
"k4", |
| 163 |
"kernelMatrix", |
| 164 |
"kernelUnitLength", |
| 165 |
"keyPoints", |
| 166 |
"keySplines", |
| 167 |
"keyTimes", |
| 168 |
"lang", |
| 169 |
"lengthAdjust", |
| 170 |
"limitingConeAngle", |
| 171 |
"local", |
| 172 |
"markerHeight", |
| 173 |
"markerUnits", |
| 174 |
"markerWidth", |
| 175 |
"maskContentUnits", |
| 176 |
"maskUnits", |
| 177 |
"mathematical", |
| 178 |
"max", |
| 179 |
"media", |
| 180 |
"method", |
| 181 |
"min", |
| 182 |
"mode", |
| 183 |
"name", |
| 184 |
"numOctaves", |
| 185 |
"offset", |
| 186 |
"operator", |
| 187 |
"order", |
| 188 |
"orient", |
| 189 |
"orientation", |
| 190 |
"origin", |
| 191 |
"overline-position", |
| 192 |
"overline-thickness", |
| 193 |
"panose-1", |
| 194 |
"path", |
| 195 |
"pathLength", |
| 196 |
"patternContentUnits", |
| 197 |
"patternTransform", |
| 198 |
"patternUnits", |
| 199 |
"points", |
| 200 |
"pointsAtX", |
| 201 |
"pointsAtY", |
| 202 |
"pointsAtZ", |
| 203 |
"preserveAlpha", |
| 204 |
"preserveAspectRatio", |
| 205 |
"primitiveUnits", |
| 206 |
"r", |
| 207 |
"radius", |
| 208 |
"refX", |
| 209 |
"refY", |
| 210 |
"rendering-intent", |
| 211 |
"repeatCount", |
| 212 |
"repeatDur", |
| 213 |
"requiredExtensions", |
| 214 |
"requiredFeatures", |
| 215 |
"restart", |
| 216 |
"result", |
| 217 |
"rotate", |
| 218 |
"rx", |
| 219 |
"ry", |
| 220 |
"scale", |
| 221 |
"seed", |
| 222 |
"slope", |
| 223 |
"spacing", |
| 224 |
"specularConstant", |
| 225 |
"specularExponent", |
| 226 |
"spreadMethod", |
| 227 |
"startOffset", |
| 228 |
"stdDeviation", |
| 229 |
"stemh", |
| 230 |
"stemv", |
| 231 |
"stitchTiles", |
| 232 |
"strikethrough-position", |
| 233 |
"strikethrough-thickness", |
| 234 |
"string", |
| 235 |
"style", |
| 236 |
"surfaceScale", |
| 237 |
"systemLanguage", |
| 238 |
"tableValues", |
| 239 |
"target", |
| 240 |
"targetX", |
| 241 |
"targetY", |
| 242 |
"textLength", |
| 243 |
"title", |
| 244 |
"to", |
| 245 |
"transform", |
| 246 |
"type", |
| 247 |
"u1", |
| 248 |
"u2", |
| 249 |
"underline-position", |
| 250 |
"underline-thickness", |
| 251 |
"unicode", |
| 252 |
"unicode-range", |
| 253 |
"units-per-em", |
| 254 |
"v-alphabetic", |
| 255 |
"v-hanging", |
| 256 |
"v-ideographic", |
| 257 |
"v-mathematical", |
| 258 |
"values", |
| 259 |
"version", |
| 260 |
"vert-adv-y", |
| 261 |
"vert-origin-x", |
| 262 |
"vert-origin-y", |
| 263 |
"viewBox", |
| 264 |
"viewTarget", |
| 265 |
"width", |
| 266 |
"widths", |
| 267 |
"x", |
| 268 |
"x-height", |
| 269 |
"x1", |
| 270 |
"x2", |
| 271 |
"xChannelSelector", |
| 272 |
"xlink:actuate", |
| 273 |
"xlink:arcrole", |
| 274 |
"xlink:href", |
| 275 |
"xlink:role", |
| 276 |
"xlink:show", |
| 277 |
"xlink:title", |
| 278 |
"xlink:type", |
| 279 |
"xml:base", |
| 280 |
"xml:lang", |
| 281 |
"xml:space", |
| 282 |
"y", |
| 283 |
"y1", |
| 284 |
"y2", |
| 285 |
"yChannelSelector", |
| 286 |
"z", |
| 287 |
"zoomAndPan", |
| 288 |
"alignment-baseline", |
| 289 |
"baseline-shift", |
| 290 |
"clip-path", |
| 291 |
"clip-rule", |
| 292 |
"clip", |
| 293 |
"color-interpolation-filters", |
| 294 |
"color-interpolation", |
| 295 |
"color-profile", |
| 296 |
"color-rendering", |
| 297 |
"color", |
| 298 |
"cursor", |
| 299 |
"direction", |
| 300 |
"display", |
| 301 |
"dominant-baseline", |
| 302 |
"enable-background", |
| 303 |
"fill-opacity", |
| 304 |
"fill-rule", |
| 305 |
"fill", |
| 306 |
"filter", |
| 307 |
"flood-color", |
| 308 |
"flood-opacity", |
| 309 |
"font-family", |
| 310 |
"font-size-adjust", |
| 311 |
"font-size", |
| 312 |
"font-stretch", |
| 313 |
"font-style", |
| 314 |
"font-variant", |
| 315 |
"font-weight", |
| 316 |
"glyph-orientation-horizontal", |
| 317 |
"glyph-orientation-vertical", |
| 318 |
"image-rendering", |
| 319 |
"kerning", |
| 320 |
"letter-spacing", |
| 321 |
"lighting-color", |
| 322 |
"marker-end", |
| 323 |
"marker-mid", |
| 324 |
"marker-start", |
| 325 |
"mask", |
| 326 |
"opacity", |
| 327 |
"overflow", |
| 328 |
"pointer-events", |
| 329 |
"shape-rendering", |
| 330 |
"stop-color", |
| 331 |
"stop-opacity", |
| 332 |
"stroke-dasharray", |
| 333 |
"stroke-dashoffset", |
| 334 |
"stroke-linecap", |
| 335 |
"stroke-linejoin", |
| 336 |
"stroke-miterlimit", |
| 337 |
"stroke-opacity", |
| 338 |
"stroke-width", |
| 339 |
"stroke", |
| 340 |
"text-anchor", |
| 341 |
"text-decoration", |
| 342 |
"text-rendering", |
| 343 |
"unicode-bidi", |
| 344 |
"visibility", |
| 345 |
"word-spacing", |
| 346 |
"writing-mode" |
| 347 |
); |
| 348 |
|