More SVG Elements and Attributes

Added <tspan> and <marker>, as well as a slew of related SVG attributes.
Also an SVG-related stylesheet tweak
This commit is contained in:
Jacques Distler 2007-04-27 21:52:29 -05:00
parent 6ca6525ff7
commit 9b55a75570
2 changed files with 22 additions and 16 deletions

View file

@ -27,9 +27,9 @@ module Sanitize
svg_elements = ['a', 'animate', 'animateColor', 'animateMotion', svg_elements = ['a', 'animate', 'animateColor', 'animateMotion',
'animateTransform', 'circle', 'defs', 'desc', 'ellipse', 'font-face', 'animateTransform', 'circle', 'defs', 'desc', 'ellipse', 'font-face',
'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern', 'image', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern', 'image',
'linearGradient', 'line', 'metadata', 'missing-glyph', 'mpath', 'path', 'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph',
'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'stop', 'svg', 'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect',
'switch', 'text', 'title', 'use'] 'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use']
acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey', acceptable_attributes = ['abbr', 'accept', 'accept-charset', 'accesskey',
'action', 'align', 'alt', 'axis', 'border', 'cellpadding', 'action', 'align', 'alt', 'axis', 'border', 'cellpadding',
@ -58,21 +58,23 @@ module Sanitize
svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic', svg_attributes = ['accent-height', 'accumulate', 'additive', 'alphabetic',
'arabic-form', 'ascent', 'attributeName', 'attributeType', 'arabic-form', 'ascent', 'attributeName', 'attributeType',
'baseProfile', 'bbox', 'begin', 'by', 'calcMode', 'cap-height', 'baseProfile', 'bbox', 'begin', 'by', 'calcMode', 'cap-height',
'class', 'color', 'color-rendering', 'content', 'cx', 'cy', 'd', 'class', 'color', 'color-rendering', 'content', 'cx', 'cy', 'd', 'dx',
'descent', 'display', 'dur', 'end', 'fill', 'fill-rule', 'font-family', 'dy', 'descent', 'display', 'dur', 'end', 'fill', 'fill-rule',
'font-size', 'font-stretch', 'font-style', 'font-variant', 'font-family', 'font-size', 'font-stretch', 'font-style', 'font-variant',
'font-weight', 'from', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'font-weight', 'from', 'fx', 'fy', 'g1', 'g2', 'glyph-name',
'gradientUnits', 'hanging', 'height', 'horiz-adv-x', 'horiz-origin-x', 'gradientUnits', 'hanging', 'height', 'horiz-adv-x', 'horiz-origin-x',
'id', 'ideographic', 'k', 'keyPoints', 'keySplines', 'keyTimes', 'id', 'ideographic', 'k', 'keyPoints', 'keySplines', 'keyTimes',
'lang', 'mathematical', 'max', 'min', 'name', 'offset', 'opacity', 'lang', 'marker-end', 'marker-mid', 'marker-start', 'markerHeight',
'origin', 'overline-position', 'overline-thickness', 'panose-1', 'markerUnits', 'markerWidth', 'mathematical', 'max', 'min', 'name',
'path', 'pathLength', 'points', 'preserveAspectRatio', 'r', 'offset', 'opacity', 'orient', 'origin', 'overline-position',
'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'overline-thickness', 'panose-1', 'path', 'pathLength', 'points',
'restart', 'rotate', 'rx', 'ry', 'slope', 'stemh', 'stemv', 'preserveAspectRatio', 'r', 'refX', 'refY', 'repeatCount', 'repeatDur',
'stop-color', 'stop-opacity', 'strikethrough-position', 'requiredExtensions', 'requiredFeatures', 'restart', 'rotate', 'rx',
'strikethrough-thickness', 'stroke', 'stroke-dasharray', 'ry', 'slope', 'stemh', 'stemv', 'stop-color', 'stop-opacity',
'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'strikethrough-position', 'strikethrough-thickness', 'stroke',
'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'systemLanguage', 'target', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap',
'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity',
'stroke-width', 'systemLanguage', 'target',
'text-anchor', 'to', 'transform', 'type', 'u1', 'u2', 'text-anchor', 'to', 'transform', 'type', 'u1', 'u2',
'underline-position', 'underline-thickness', 'unicode', 'underline-position', 'underline-thickness', 'unicode',
'unicode-range', 'units-per-em', 'values', 'version', 'viewBox', 'unicode-range', 'units-per-em', 'values', 'version', 'viewBox',

View file

@ -386,4 +386,8 @@ span.keyboard {
margin-left:5px; margin-left:5px;
padding:1px 2px; padding:1px 2px;
} }
.centeredfigure {
position:relative;
margin:auto;
text-align:center;
}