1<?php 2namespace enshrined\svgSanitize\data; 3 4/** 5 * Class AllowedAttributes 6 * 7 * @package enshrined\svgSanitize\data 8 */ 9class AllowedAttributes implements AttributeInterface 10{ 11 12 /** 13 * Returns an array of attributes 14 * 15 * @return array 16 */ 17 public static function getAttributes() 18 { 19 return array( 20 // HTML 21 'about', 22 'accept', 23 'action', 24 'align', 25 'alt', 26 'autocomplete', 27 'background', 28 'bgcolor', 29 'border', 30 'cellpadding', 31 'cellspacing', 32 'checked', 33 'cite', 34 'class', 35 'clear', 36 'color', 37 'cols', 38 'colspan', 39 'coords', 40 'crossorigin', 41 'datetime', 42 'default', 43 'dir', 44 'disabled', 45 'download', 46 'enctype', 47 'encoding', 48 'face', 49 'for', 50 'headers', 51 'height', 52 'hidden', 53 'high', 54 'href', 55 'hreflang', 56 'id', 57 'integrity', 58 'ismap', 59 'label', 60 'lang', 61 'list', 62 'loop', 63 'low', 64 'max', 65 'maxlength', 66 'media', 67 'method', 68 'min', 69 'multiple', 70 'name', 71 'noshade', 72 'novalidate', 73 'nowrap', 74 'open', 75 'optimum', 76 'pattern', 77 'placeholder', 78 'poster', 79 'preload', 80 'pubdate', 81 'radiogroup', 82 'readonly', 83 'rel', 84 'required', 85 'rev', 86 'reversed', 87 'role', 88 'rows', 89 'rowspan', 90 'spellcheck', 91 'scope', 92 'selected', 93 'shape', 94 'size', 95 'sizes', 96 'span', 97 'srclang', 98 'start', 99 'src', 100 'srcset', 101 'step', 102 'style', 103 'summary', 104 'tabindex', 105 'title', 106 'type', 107 'usemap', 108 'valign', 109 'value', 110 'version', 111 'width', 112 'xmlns', 113 114 // SVG 115 'accent-height', 116 'accumulate', 117 'additivive', 118 'alignment-baseline', 119 'ascent', 120 'attributename', 121 'attributetype', 122 'azimuth', 123 'basefrequency', 124 'baseline-shift', 125 'begin', 126 'bias', 127 'by', 128 'class', 129 'clip', 130 'clip-path', 131 'clip-rule', 132 'color', 133 'color-interpolation', 134 'color-interpolation-filters', 135 'color-profile', 136 'color-rendering', 137 'cx', 138 'cy', 139 'd', 140 'dx', 141 'dy', 142 'diffuseconstant', 143 'direction', 144 'display', 145 'divisor', 146 'dur', 147 'edgemode', 148 'elevation', 149 'end', 150 'fill', 151 'fill-opacity', 152 'fill-rule', 153 'filter', 154 'filterUnits', 155 'flood-color', 156 'flood-opacity', 157 'font-family', 158 'font-size', 159 'font-size-adjust', 160 'font-stretch', 161 'font-style', 162 'font-variant', 163 'font-weight', 164 'fx', 165 'fy', 166 'g1', 167 'g2', 168 'glyph-name', 169 'glyphref', 170 'gradientunits', 171 'gradienttransform', 172 'height', 173 'href', 174 'id', 175 'image-rendering', 176 'in', 177 'in2', 178 'k', 179 'k1', 180 'k2', 181 'k3', 182 'k4', 183 'kerning', 184 'keypoints', 185 'keysplines', 186 'keytimes', 187 'lang', 188 'lengthadjust', 189 'letter-spacing', 190 'kernelmatrix', 191 'kernelunitlength', 192 'lighting-color', 193 'local', 194 'marker-end', 195 'marker-mid', 196 'marker-start', 197 'markerheight', 198 'markerunits', 199 'markerwidth', 200 'maskcontentunits', 201 'maskunits', 202 'max', 203 'mask', 204 'media', 205 'method', 206 'mode', 207 'min', 208 'name', 209 'numoctaves', 210 'offset', 211 'operator', 212 'opacity', 213 'order', 214 'orient', 215 'orientation', 216 'origin', 217 'overflow', 218 'paint-order', 219 'path', 220 'pathlength', 221 'patterncontentunits', 222 'patterntransform', 223 'patternunits', 224 'points', 225 'preservealpha', 226 'preserveaspectratio', 227 'r', 228 'rx', 229 'ry', 230 'radius', 231 'refx', 232 'refy', 233 'repeatcount', 234 'repeatdur', 235 'restart', 236 'result', 237 'rotate', 238 'scale', 239 'seed', 240 'shape-rendering', 241 'specularconstant', 242 'specularexponent', 243 'spreadmethod', 244 'stddeviation', 245 'stitchtiles', 246 'stop-color', 247 'stop-opacity', 248 'stroke-dasharray', 249 'stroke-dashoffset', 250 'stroke-linecap', 251 'stroke-linejoin', 252 'stroke-miterlimit', 253 'stroke-opacity', 254 'stroke', 255 'stroke-width', 256 'style', 257 'surfacescale', 258 'tabindex', 259 'targetx', 260 'targety', 261 'transform', 262 'text-anchor', 263 'text-decoration', 264 'text-rendering', 265 'textlength', 266 'type', 267 'u1', 268 'u2', 269 'unicode', 270 'values', 271 'viewbox', 272 'visibility', 273 'vert-adv-y', 274 'vert-origin-x', 275 'vert-origin-y', 276 'width', 277 'word-spacing', 278 'wrap', 279 'writing-mode', 280 'xchannelselector', 281 'ychannelselector', 282 'x', 283 'x1', 284 'x2', 285 'xmlns', 286 'y', 287 'y1', 288 'y2', 289 'z', 290 'zoomandpan', 291 292 // MathML 293 'accent', 294 'accentunder', 295 'align', 296 'bevelled', 297 'close', 298 'columnsalign', 299 'columnlines', 300 'columnspan', 301 'denomalign', 302 'depth', 303 'dir', 304 'display', 305 'displaystyle', 306 'fence', 307 'frame', 308 'height', 309 'href', 310 'id', 311 'largeop', 312 'length', 313 'linethickness', 314 'lspace', 315 'lquote', 316 'mathbackground', 317 'mathcolor', 318 'mathsize', 319 'mathvariant', 320 'maxsize', 321 'minsize', 322 'movablelimits', 323 'notation', 324 'numalign', 325 'open', 326 'rowalign', 327 'rowlines', 328 'rowspacing', 329 'rowspan', 330 'rspace', 331 'rquote', 332 'scriptlevel', 333 'scriptminsize', 334 'scriptsizemultiplier', 335 'selection', 336 'separator', 337 'separators', 338 'slope', 339 'stretchy', 340 'subscriptshift', 341 'supscriptshift', 342 'symmetric', 343 'voffset', 344 'width', 345 'xmlns', 346 347 // XML 348 'xlink:href', 349 'xml:id', 350 'xlink:title', 351 'xml:space', 352 'xmlns:xlink', 353 ); 354 } 355} 356