lib/sanitize/config/relaxed.rb in sanitize-6.1.3 vs lib/sanitize/config/relaxed.rb in sanitize-7.0.0

- old
+ new

@@ -1,48 +1,46 @@ -# encoding: utf-8 +# frozen_string_literal: true class Sanitize module Config RELAXED = freeze_config( - :elements => BASIC[:elements] + %w[ + elements: BASIC[:elements] + %w[ address article aside bdi bdo body caption col colgroup data del div figcaption figure footer h1 h2 h3 h4 h5 h6 head header hgroup hr html img ins main nav rp rt ruby section span style summary table tbody td tfoot th thead title tr wbr ], - :allow_doctype => true, + allow_doctype: true, - :attributes => merge(BASIC[:attributes], - :all => %w[class dir hidden id lang style tabindex title translate], - 'a' => %w[href hreflang name rel], - 'col' => %w[span width], - 'colgroup' => %w[span width], - 'data' => %w[value], - 'del' => %w[cite datetime], - 'img' => %w[align alt border height src srcset width], - 'ins' => %w[cite datetime], - 'li' => %w[value], - 'ol' => %w[reversed start type], - 'style' => %w[media scoped type], - 'table' => %w[align bgcolor border cellpadding cellspacing frame rules sortable summary width], - 'td' => %w[abbr align axis colspan headers rowspan valign width], - 'th' => %w[abbr align axis colspan headers rowspan scope sorted valign width], - 'ul' => %w[type] - ), + attributes: merge(BASIC[:attributes], + :all => %w[class dir hidden id lang style tabindex title translate], + "a" => %w[href hreflang name rel], + "col" => %w[span width], + "colgroup" => %w[span width], + "data" => %w[value], + "del" => %w[cite datetime], + "img" => %w[align alt border height src srcset width], + "ins" => %w[cite datetime], + "li" => %w[value], + "ol" => %w[reversed start type], + "style" => %w[media scoped type], + "table" => %w[align bgcolor border cellpadding cellspacing frame rules sortable summary width], + "td" => %w[abbr align axis colspan headers rowspan valign width], + "th" => %w[abbr align axis colspan headers rowspan scope sorted valign width], + "ul" => %w[type]), - :protocols => merge(BASIC[:protocols], - 'del' => {'cite' => ['http', 'https', :relative]}, - 'img' => {'src' => ['http', 'https', :relative]}, - 'ins' => {'cite' => ['http', 'https', :relative]} - ), + protocols: merge(BASIC[:protocols], + "del" => {"cite" => ["http", "https", :relative]}, + "img" => {"src" => ["http", "https", :relative]}, + "ins" => {"cite" => ["http", "https", :relative]}), - :css => { - :allow_comments => true, - :allow_hacks => true, + css: { + allow_comments: true, + allow_hacks: true, - :at_rules_with_properties => %w[ + at_rules_with_properties: %w[ bottom-center bottom-left bottom-left-corner bottom-right bottom-right-corner @@ -59,23 +57,24 @@ top-left-corner top-right top-right-corner ], - :at_rules_with_styles => %w[ + at_rules_with_styles: %w[ -moz-keyframes -o-keyframes -webkit-keyframes + container document keyframes media supports ], - :protocols => ['http', 'https', :relative], + protocols: ["http", "https", :relative], - :properties => %w[ + properties: %w[ -moz-appearance -moz-background-inline-policy -moz-box-sizing -moz-column-count -moz-column-fill @@ -331,10 +330,11 @@ -webkit-tap-highlight-color -webkit-text-decoration -webkit-text-decoration-color -webkit-text-decoration-line -webkit-text-decoration-style + -webkit-text-fill-color -webkit-text-size-adjust -webkit-touch-callout -webkit-transform -webkit-transform-origin -webkit-transform-origin-x @@ -347,68 +347,111 @@ -webkit-transition-property -webkit-transition-timing-function -webkit-user-drag -webkit-wrap-flow -webkit-wrap-through + accent-color align-content align-items align-self alignment-adjust alignment-baseline all anchor-point + anchor-name + anchor-scope animation + animation-composition animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state + animation-range + animation-range-end + animation-range-start + animation-timeline animation-timing-function + appearance + aspect-ratio azimuth backface-visibility background background-attachment + background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size baseline-shift binding bleed + baseline-source + block-ellipsis + block-size bookmark-label bookmark-level bookmark-state border + border-block + border-block-color + border-block-end + border-block-end-color + border-block-end-style + border-block-end-width + border-block-start + border-block-start-color + border-block-start-style + border-block-start-width + border-block-style + border-block-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width + border-boundary border-collapse border-color + border-end-end-radius + border-end-start-radius border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width + border-inline + border-inline-color + border-inline-end + border-inline-end-color + border-inline-end-style + border-inline-end-width + border-inline-start + border-inline-start-color + border-inline-start-style + border-inline-start-width + border-inline-style + border-inline-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing + border-start-end-radius + border-start-start-radius border-style border-top border-top-color border-top-left-radius border-top-right-radius @@ -424,19 +467,24 @@ break-after break-before break-inside caption-side chains + caret + caret-color + caret-shape clear clip clip-path clip-rule color color-interpolation + color-adjust color-interpolation-filters color-profile color-rendering + color-scheme column-count column-fill column-gap column-rule column-rule-color @@ -444,11 +492,21 @@ column-rule-width column-span column-width columns contain + contain-intrinsic-block-size + contain-intrinsic-height + contain-intrinsic-inline-size + contain-intrinsic-size + contain-intrinsic-width + container + container-name + container-type content + content-visibility + continue counter-increment counter-reset counter-set crop cue @@ -484,24 +542,37 @@ font font-family font-feature-settings font-kerning font-language-override + font-optical-sizing + font-palette font-size font-size-adjust font-stretch font-style font-synthesis + font-synthesis-position + font-synthesis-small-caps + font-synthesis-style + font-synthesis-weight font-variant font-variant-alternates font-variant-caps font-variant-east-asian + font-variant-emoji font-variant-ligatures font-variant-numeric font-variant-position + font-variation-settings font-weight glyph-orientation-horizontal + font-width + footnote-display + footnote-policy + forced-color-adjust + gap glyph-orientation-vertical grid grid-area grid-auto-columns grid-auto-flow @@ -656,50 +727,77 @@ stroke-opacity stroke-width tab-size table-layout text-align + text-align-all text-align-last text-anchor text-combine-horizontal + text-autospace + text-box + text-box-edge + text-box-trim text-combine-upright text-decoration text-decoration-color text-decoration-line text-decoration-skip + text-decoration-skip-box text-decoration-skip-ink + text-decoration-skip-inset + text-decoration-skip-self + text-decoration-skip-spaces text-decoration-style text-decoration-thickness text-emphasis text-emphasis-color text-emphasis-position + text-emphasis-skip text-emphasis-style text-height + text-group-align text-indent text-justify text-orientation text-overflow text-rendering text-shadow text-size-adjust text-space-collapse + text-spacing + text-spacing-trim text-transform + text-underline-offset text-underline-position text-wrap + text-wrap-mode + text-wrap-style + timeline-scope top touch-action transform + transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function + translate unicode-bidi unicode-range + user-select vertical-align + view-timeline + view-timeline-axis + view-timeline-inset + view-timeline-name + view-transition-class + view-transition-group + view-transition-name visibility voice-balance voice-duration voice-family voice-pitch @@ -707,16 +805,22 @@ voice-rate voice-stress voice-volume volume white-space + white-space-collapse + white-space-trim widows width will-change word-break + word-space-transform word-spacing word-wrap + wrap-after + wrap-before wrap-flow + wrap-inside wrap-through writing-mode z-index ] }