Comparing version 0.0.5 to 0.0.6
@@ -100,345 +100,348 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
function getDefaultWhiteList () { | ||
// 白名单值说明: | ||
// true: 允许该属性 | ||
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许 | ||
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许 | ||
// 除上面列出的值外均表示不允许 | ||
var whiteList = {}; | ||
// 白名单值说明: | ||
// true: 允许该属性 | ||
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许 | ||
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许 | ||
// 除上面列出的值外均表示不允许 | ||
var whiteList = {}; | ||
whiteList['align-content'] = false; // default: auto | ||
whiteList['align-items'] = false; // default: auto | ||
whiteList['align-self'] = false; // default: auto | ||
whiteList['alignment-adjust'] = false; // default: auto | ||
whiteList['alignment-baseline'] = false; // default: baseline | ||
whiteList['all'] = false; // default: depending on individual properties | ||
whiteList['anchor-point'] = false; // default: none | ||
whiteList['animation'] = false; // default: depending on individual properties | ||
whiteList['animation-delay'] = false; // default: 0 | ||
whiteList['animation-direction'] = false; // default: normal | ||
whiteList['animation-duration'] = false; // default: 0 | ||
whiteList['animation-fill-mode'] = false; // default: none | ||
whiteList['animation-iteration-count'] = false; // default: 1 | ||
whiteList['animation-name'] = false; // default: none | ||
whiteList['animation-play-state'] = false; // default: running | ||
whiteList['animation-timing-function'] = false; // default: ease | ||
whiteList['azimuth'] = false; // default: center | ||
whiteList['backface-visibility'] = false; // default: visible | ||
whiteList['background'] = true; // default: depending on individual properties | ||
whiteList['background-attachment'] = true; // default: scroll | ||
whiteList['background-clip'] = true; // default: border-box | ||
whiteList['background-color'] = true; // default: transparent | ||
whiteList['background-image'] = true; // default: none | ||
whiteList['background-origin'] = true; // default: padding-box | ||
whiteList['background-position'] = true; // default: 0% 0% | ||
whiteList['background-repeat'] = true; // default: repeat | ||
whiteList['background-size'] = true; // default: auto | ||
whiteList['baseline-shift'] = false; // default: baseline | ||
whiteList['binding'] = false; // default: none | ||
whiteList['bleed'] = false; // default: 6pt | ||
whiteList['bookmark-label'] = false; // default: content() | ||
whiteList['bookmark-level'] = false; // default: none | ||
whiteList['bookmark-state'] = false; // default: open | ||
whiteList['border'] = true; // default: depending on individual properties | ||
whiteList['border-bottom'] = true; // default: depending on individual properties | ||
whiteList['border-bottom-color'] = true; // default: current color | ||
whiteList['border-bottom-left-radius'] = true; // default: 0 | ||
whiteList['border-bottom-right-radius'] = true; // default: 0 | ||
whiteList['border-bottom-style'] = true; // default: none | ||
whiteList['border-bottom-width'] = true; // default: medium | ||
whiteList['border-collapse'] = true; // default: separate | ||
whiteList['border-color'] = true; // default: depending on individual properties | ||
whiteList['border-image'] = true; // default: none | ||
whiteList['border-image-outset'] = true; // default: 0 | ||
whiteList['border-image-repeat'] = true; // default: stretch | ||
whiteList['border-image-slice'] = true; // default: 100% | ||
whiteList['border-image-source'] = true; // default: none | ||
whiteList['border-image-width'] = true; // default: 1 | ||
whiteList['border-left'] = true; // default: depending on individual properties | ||
whiteList['border-left-color'] = true; // default: current color | ||
whiteList['border-left-style'] = true; // default: none | ||
whiteList['border-left-width'] = true; // default: medium | ||
whiteList['border-radius'] = true; // default: 0 | ||
whiteList['border-right'] = true; // default: depending on individual properties | ||
whiteList['border-right-color'] = true; // default: current color | ||
whiteList['border-right-style'] = true; // default: none | ||
whiteList['border-right-width'] = true; // default: medium | ||
whiteList['border-spacing'] = true; // default: 0 | ||
whiteList['border-style'] = true; // default: depending on individual properties | ||
whiteList['border-top'] = true; // default: depending on individual properties | ||
whiteList['border-top-color'] = true; // default: current color | ||
whiteList['border-top-left-radius'] = true; // default: 0 | ||
whiteList['border-top-right-radius'] = true; // default: 0 | ||
whiteList['border-top-style'] = true; // default: none | ||
whiteList['border-top-width'] = true; // default: medium | ||
whiteList['border-width'] = true; // default: depending on individual properties | ||
whiteList['bottom'] = false; // default: auto | ||
whiteList['box-decoration-break'] = true; // default: slice | ||
whiteList['box-shadow'] = true; // default: none | ||
whiteList['box-sizing'] = true; // default: content-box | ||
whiteList['box-snap'] = true; // default: none | ||
whiteList['box-suppress'] = true; // default: show | ||
whiteList['break-after'] = true; // default: auto | ||
whiteList['break-before'] = true; // default: auto | ||
whiteList['break-inside'] = true; // default: auto | ||
whiteList['caption-side'] = false; // default: top | ||
whiteList['chains'] = false; // default: none | ||
whiteList['clear'] = true; // default: none | ||
whiteList['clip'] = false; // default: auto | ||
whiteList['clip-path'] = false; // default: none | ||
whiteList['clip-rule'] = false; // default: nonzero | ||
whiteList['color'] = true; // default: implementation dependent | ||
whiteList['color-interpolation-filters'] = true; // default: auto | ||
whiteList['column-count'] = false; // default: auto | ||
whiteList['column-fill'] = false; // default: balance | ||
whiteList['column-gap'] = false; // default: normal | ||
whiteList['column-rule'] = false; // default: depending on individual properties | ||
whiteList['column-rule-color'] = false; // default: current color | ||
whiteList['column-rule-style'] = false; // default: medium | ||
whiteList['column-rule-width'] = false; // default: medium | ||
whiteList['column-span'] = false; // default: none | ||
whiteList['column-width'] = false; // default: auto | ||
whiteList['columns'] = false; // default: depending on individual properties | ||
whiteList['contain'] = false; // default: none | ||
whiteList['content'] = false; // default: normal | ||
whiteList['counter-increment'] = false; // default: none | ||
whiteList['counter-reset'] = false; // default: none | ||
whiteList['counter-set'] = false; // default: none | ||
whiteList['crop'] = false; // default: auto | ||
whiteList['cue'] = false; // default: depending on individual properties | ||
whiteList['cue-after'] = false; // default: none | ||
whiteList['cue-before'] = false; // default: none | ||
whiteList['cursor'] = false; // default: auto | ||
whiteList['direction'] = false; // default: ltr | ||
whiteList['display'] = true; // default: depending on individual properties | ||
whiteList['display-inside'] = true; // default: auto | ||
whiteList['display-list'] = true; // default: none | ||
whiteList['display-outside'] = true; // default: inline-level | ||
whiteList['dominant-baseline'] = false; // default: auto | ||
whiteList['elevation'] = false; // default: level | ||
whiteList['empty-cells'] = false; // default: show | ||
whiteList['filter'] = false; // default: none | ||
whiteList['flex'] = false; // default: depending on individual properties | ||
whiteList['flex-basis'] = false; // default: auto | ||
whiteList['flex-direction'] = false; // default: row | ||
whiteList['flex-flow'] = false; // default: depending on individual properties | ||
whiteList['flex-grow'] = false; // default: 0 | ||
whiteList['flex-shrink'] = false; // default: 1 | ||
whiteList['flex-wrap'] = false; // default: nowrap | ||
whiteList['float'] = false; // default: none | ||
whiteList['float-offset'] = false; // default: 0 0 | ||
whiteList['flood-color'] = false; // default: black | ||
whiteList['flood-opacity'] = false; // default: 1 | ||
whiteList['flow-from'] = false; // default: none | ||
whiteList['flow-into'] = false; // default: none | ||
whiteList['font'] = true; // default: depending on individual properties | ||
whiteList['font-family'] = true; // default: implementation dependent | ||
whiteList['font-feature-settings'] = true; // default: normal | ||
whiteList['font-kerning'] = true; // default: auto | ||
whiteList['font-language-override'] = true; // default: normal | ||
whiteList['font-size'] = true; // default: medium | ||
whiteList['font-size-adjust'] = true; // default: none | ||
whiteList['font-stretch'] = true; // default: normal | ||
whiteList['font-style'] = true; // default: normal | ||
whiteList['font-synthesis'] = true; // default: weight style | ||
whiteList['font-variant'] = true; // default: normal | ||
whiteList['font-variant-alternates'] = true; // default: normal | ||
whiteList['font-variant-caps'] = true; // default: normal | ||
whiteList['font-variant-east-asian'] = true; // default: normal | ||
whiteList['font-variant-ligatures'] = true; // default: normal | ||
whiteList['font-variant-numeric'] = true; // default: normal | ||
whiteList['font-variant-position'] = true; // default: normal | ||
whiteList['font-weight'] = true; // default: normal | ||
whiteList['grid'] = false; // default: depending on individual properties | ||
whiteList['grid-area'] = false; // default: depending on individual properties | ||
whiteList['grid-auto-columns'] = false; // default: auto | ||
whiteList['grid-auto-flow'] = false; // default: none | ||
whiteList['grid-auto-rows'] = false; // default: auto | ||
whiteList['grid-column'] = false; // default: depending on individual properties | ||
whiteList['grid-column-end'] = false; // default: auto | ||
whiteList['grid-column-start'] = false; // default: auto | ||
whiteList['grid-row'] = false; // default: depending on individual properties | ||
whiteList['grid-row-end'] = false; // default: auto | ||
whiteList['grid-row-start'] = false; // default: auto | ||
whiteList['grid-template'] = false; // default: depending on individual properties | ||
whiteList['grid-template-areas'] = false; // default: none | ||
whiteList['grid-template-columns'] = false; // default: none | ||
whiteList['grid-template-rows'] = false; // default: none | ||
whiteList['hanging-punctuation'] = false; // default: none | ||
whiteList['height'] = true; // default: auto | ||
whiteList['hyphens'] = false; // default: manual | ||
whiteList['icon'] = false; // default: auto | ||
whiteList['image-orientation'] = false; // default: auto | ||
whiteList['image-resolution'] = false; // default: normal | ||
whiteList['ime-mode'] = false; // default: auto | ||
whiteList['initial-letters'] = false; // default: normal | ||
whiteList['inline-box-align'] = false; // default: last | ||
whiteList['justify-content'] = false; // default: auto | ||
whiteList['justify-items'] = false; // default: auto | ||
whiteList['justify-self'] = false; // default: auto | ||
whiteList['left'] = false; // default: auto | ||
whiteList['letter-spacing'] = true; // default: normal | ||
whiteList['lighting-color'] = true; // default: white | ||
whiteList['line-box-contain'] = false; // default: block inline replaced | ||
whiteList['line-break'] = false; // default: auto | ||
whiteList['line-grid'] = false; // default: match-parent | ||
whiteList['line-height'] = false; // default: normal | ||
whiteList['line-snap'] = false; // default: none | ||
whiteList['line-stacking'] = false; // default: depending on individual properties | ||
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby | ||
whiteList['line-stacking-shift'] = false; // default: consider-shifts | ||
whiteList['line-stacking-strategy'] = false; // default: inline-line-height | ||
whiteList['list-style'] = true; // default: depending on individual properties | ||
whiteList['list-style-image'] = true; // default: none | ||
whiteList['list-style-position'] = true; // default: outside | ||
whiteList['list-style-type'] = true; // default: disc | ||
whiteList['margin'] = true; // default: depending on individual properties | ||
whiteList['margin-bottom'] = true; // default: 0 | ||
whiteList['margin-left'] = true; // default: 0 | ||
whiteList['margin-right'] = true; // default: 0 | ||
whiteList['margin-top'] = true; // default: 0 | ||
whiteList['marker-offset'] = false; // default: auto | ||
whiteList['marker-side'] = false; // default: list-item | ||
whiteList['marks'] = false; // default: none | ||
whiteList['mask'] = false; // default: border-box | ||
whiteList['mask-box'] = false; // default: see individual properties | ||
whiteList['mask-box-outset'] = false; // default: 0 | ||
whiteList['mask-box-repeat'] = false; // default: stretch | ||
whiteList['mask-box-slice'] = false; // default: 0 fill | ||
whiteList['mask-box-source'] = false; // default: none | ||
whiteList['mask-box-width'] = false; // default: auto | ||
whiteList['mask-clip'] = false; // default: border-box | ||
whiteList['mask-image'] = false; // default: none | ||
whiteList['mask-origin'] = false; // default: border-box | ||
whiteList['mask-position'] = false; // default: center | ||
whiteList['mask-repeat'] = false; // default: no-repeat | ||
whiteList['mask-size'] = false; // default: border-box | ||
whiteList['mask-source-type'] = false; // default: auto | ||
whiteList['mask-type'] = false; // default: luminance | ||
whiteList['max-height'] = true; // default: none | ||
whiteList['max-lines'] = false; // default: none | ||
whiteList['max-width'] = true; // default: none | ||
whiteList['min-height'] = true; // default: 0 | ||
whiteList['min-width'] = true; // default: 0 | ||
whiteList['move-to'] = false; // default: normal | ||
whiteList['nav-down'] = false; // default: auto | ||
whiteList['nav-index'] = false; // default: auto | ||
whiteList['nav-left'] = false; // default: auto | ||
whiteList['nav-right'] = false; // default: auto | ||
whiteList['nav-up'] = false; // default: auto | ||
whiteList['object-fit'] = false; // default: fill | ||
whiteList['object-position'] = false; // default: 50% 50% | ||
whiteList['opacity'] = false; // default: 1 | ||
whiteList['order'] = false; // default: 0 | ||
whiteList['orphans'] = false; // default: 2 | ||
whiteList['outline'] = false; // default: depending on individual properties | ||
whiteList['outline-color'] = false; // default: invert | ||
whiteList['outline-offset'] = false; // default: 0 | ||
whiteList['outline-style'] = false; // default: none | ||
whiteList['outline-width'] = false; // default: medium | ||
whiteList['overflow'] = false; // default: depending on individual properties | ||
whiteList['overflow-wrap'] = false; // default: normal | ||
whiteList['overflow-x'] = false; // default: visible | ||
whiteList['overflow-y'] = false; // default: visible | ||
whiteList['padding'] = true; // default: depending on individual properties | ||
whiteList['padding-bottom'] = true; // default: 0 | ||
whiteList['padding-left'] = true; // default: 0 | ||
whiteList['padding-right'] = true; // default: 0 | ||
whiteList['padding-top'] = true; // default: 0 | ||
whiteList['page'] = false; // default: auto | ||
whiteList['page-break-after'] = false; // default: auto | ||
whiteList['page-break-before'] = false; // default: auto | ||
whiteList['page-break-inside'] = false; // default: auto | ||
whiteList['page-policy'] = false; // default: start | ||
whiteList['pause'] = false; // default: implementation dependent | ||
whiteList['pause-after'] = false; // default: implementation dependent | ||
whiteList['pause-before'] = false; // default: implementation dependent | ||
whiteList['perspective'] = false; // default: none | ||
whiteList['perspective-origin'] = false; // default: 50% 50% | ||
whiteList['pitch'] = false; // default: medium | ||
whiteList['pitch-range'] = false; // default: 50 | ||
whiteList['play-during'] = false; // default: auto | ||
whiteList['position'] = false; // default: static | ||
whiteList['presentation-level'] = false; // default: 0 | ||
whiteList['quotes'] = false; // default: text | ||
whiteList['region-fragment'] = false; // default: auto | ||
whiteList['resize'] = false; // default: none | ||
whiteList['rest'] = false; // default: depending on individual properties | ||
whiteList['rest-after'] = false; // default: none | ||
whiteList['rest-before'] = false; // default: none | ||
whiteList['richness'] = false; // default: 50 | ||
whiteList['right'] = false; // default: auto | ||
whiteList['rotation'] = false; // default: 0 | ||
whiteList['rotation-point'] = false; // default: 50% 50% | ||
whiteList['ruby-align'] = false; // default: auto | ||
whiteList['ruby-merge'] = false; // default: separate | ||
whiteList['ruby-position'] = false; // default: before | ||
whiteList['shape-image-threshold'] = false; // default: 0.0 | ||
whiteList['shape-outside'] = false; // default: none | ||
whiteList['shape-margin'] = false; // default: 0 | ||
whiteList['size'] = false; // default: auto | ||
whiteList['speak'] = false; // default: auto | ||
whiteList['speak-as'] = false; // default: normal | ||
whiteList['speak-header'] = false; // default: once | ||
whiteList['speak-numeral'] = false; // default: continuous | ||
whiteList['speak-punctuation'] = false; // default: none | ||
whiteList['speech-rate'] = false; // default: medium | ||
whiteList['stress'] = false; // default: 50 | ||
whiteList['string-set'] = false; // default: none | ||
whiteList['tab-size'] = false; // default: 8 | ||
whiteList['table-layout'] = false; // default: auto | ||
whiteList['text-align'] = true; // default: start | ||
whiteList['text-align-last'] = true; // default: auto | ||
whiteList['text-combine-upright'] = true; // default: none | ||
whiteList['text-decoration'] = true; // default: none | ||
whiteList['text-decoration-color'] = true; // default: currentColor | ||
whiteList['text-decoration-line'] = true; // default: none | ||
whiteList['text-decoration-skip'] = true; // default: objects | ||
whiteList['text-decoration-style'] = true; // default: solid | ||
whiteList['text-emphasis'] = true; // default: depending on individual properties | ||
whiteList['text-emphasis-color'] = true; // default: currentColor | ||
whiteList['text-emphasis-position'] = true; // default: over right | ||
whiteList['text-emphasis-style'] = true; // default: none | ||
whiteList['text-height'] = true; // default: auto | ||
whiteList['text-indent'] = true; // default: 0 | ||
whiteList['text-justify'] = true; // default: auto | ||
whiteList['text-orientation'] = true; // default: mixed | ||
whiteList['text-overflow'] = true; // default: clip | ||
whiteList['text-shadow'] = true; // default: none | ||
whiteList['text-space-collapse'] = true; // default: collapse | ||
whiteList['text-transform'] = true; // default: none | ||
whiteList['text-underline-position'] = true; // default: auto | ||
whiteList['text-wrap'] = true; // default: normal | ||
whiteList['top'] = false; // default: auto | ||
whiteList['transform'] = false; // default: none | ||
whiteList['transform-origin'] = false; // default: 50% 50% 0 | ||
whiteList['transform-style'] = false; // default: flat | ||
whiteList['transition'] = false; // default: depending on individual properties | ||
whiteList['transition-delay'] = false; // default: 0s | ||
whiteList['transition-duration'] = false; // default: 0s | ||
whiteList['transition-property'] = false; // default: all | ||
whiteList['transition-timing-function'] = false; // default: ease | ||
whiteList['unicode-bidi'] = false; // default: normal | ||
whiteList['vertical-align'] = false; // default: baseline | ||
whiteList['visibility'] = false; // default: visible | ||
whiteList['voice-balance'] = false; // default: center | ||
whiteList['voice-duration'] = false; // default: auto | ||
whiteList['voice-family'] = false; // default: implementation dependent | ||
whiteList['voice-pitch'] = false; // default: medium | ||
whiteList['voice-range'] = false; // default: medium | ||
whiteList['voice-rate'] = false; // default: normal | ||
whiteList['voice-stress'] = false; // default: normal | ||
whiteList['voice-volume'] = false; // default: medium | ||
whiteList['volume'] = false; // default: medium | ||
whiteList['white-space'] = false; // default: normal | ||
whiteList['widows'] = false; // default: 2 | ||
whiteList['width'] = true; // default: auto | ||
whiteList['will-change'] = false; // default: auto | ||
whiteList['word-break'] = true; // default: normal | ||
whiteList['word-spacing'] = true; // default: normal | ||
whiteList['word-wrap'] = true; // default: normal | ||
whiteList['wrap-flow'] = false; // default: auto | ||
whiteList['wrap-through'] = false; // default: wrap | ||
whiteList['writing-mode'] = false; // default: horizontal-tb | ||
whiteList['z-index'] = false; // default: auto | ||
whiteList['align-content'] = false; // default: auto | ||
whiteList['align-items'] = false; // default: auto | ||
whiteList['align-self'] = false; // default: auto | ||
whiteList['alignment-adjust'] = false; // default: auto | ||
whiteList['alignment-baseline'] = false; // default: baseline | ||
whiteList['all'] = false; // default: depending on individual properties | ||
whiteList['anchor-point'] = false; // default: none | ||
whiteList['animation'] = false; // default: depending on individual properties | ||
whiteList['animation-delay'] = false; // default: 0 | ||
whiteList['animation-direction'] = false; // default: normal | ||
whiteList['animation-duration'] = false; // default: 0 | ||
whiteList['animation-fill-mode'] = false; // default: none | ||
whiteList['animation-iteration-count'] = false; // default: 1 | ||
whiteList['animation-name'] = false; // default: none | ||
whiteList['animation-play-state'] = false; // default: running | ||
whiteList['animation-timing-function'] = false; // default: ease | ||
whiteList['azimuth'] = false; // default: center | ||
whiteList['backface-visibility'] = false; // default: visible | ||
whiteList['background'] = true; // default: depending on individual properties | ||
whiteList['background-attachment'] = true; // default: scroll | ||
whiteList['background-clip'] = true; // default: border-box | ||
whiteList['background-color'] = true; // default: transparent | ||
whiteList['background-image'] = true; // default: none | ||
whiteList['background-origin'] = true; // default: padding-box | ||
whiteList['background-position'] = true; // default: 0% 0% | ||
whiteList['background-repeat'] = true; // default: repeat | ||
whiteList['background-size'] = true; // default: auto | ||
whiteList['baseline-shift'] = false; // default: baseline | ||
whiteList['binding'] = false; // default: none | ||
whiteList['bleed'] = false; // default: 6pt | ||
whiteList['bookmark-label'] = false; // default: content() | ||
whiteList['bookmark-level'] = false; // default: none | ||
whiteList['bookmark-state'] = false; // default: open | ||
whiteList['border'] = true; // default: depending on individual properties | ||
whiteList['border-bottom'] = true; // default: depending on individual properties | ||
whiteList['border-bottom-color'] = true; // default: current color | ||
whiteList['border-bottom-left-radius'] = true; // default: 0 | ||
whiteList['border-bottom-right-radius'] = true; // default: 0 | ||
whiteList['border-bottom-style'] = true; // default: none | ||
whiteList['border-bottom-width'] = true; // default: medium | ||
whiteList['border-collapse'] = true; // default: separate | ||
whiteList['border-color'] = true; // default: depending on individual properties | ||
whiteList['border-image'] = true; // default: none | ||
whiteList['border-image-outset'] = true; // default: 0 | ||
whiteList['border-image-repeat'] = true; // default: stretch | ||
whiteList['border-image-slice'] = true; // default: 100% | ||
whiteList['border-image-source'] = true; // default: none | ||
whiteList['border-image-width'] = true; // default: 1 | ||
whiteList['border-left'] = true; // default: depending on individual properties | ||
whiteList['border-left-color'] = true; // default: current color | ||
whiteList['border-left-style'] = true; // default: none | ||
whiteList['border-left-width'] = true; // default: medium | ||
whiteList['border-radius'] = true; // default: 0 | ||
whiteList['border-right'] = true; // default: depending on individual properties | ||
whiteList['border-right-color'] = true; // default: current color | ||
whiteList['border-right-style'] = true; // default: none | ||
whiteList['border-right-width'] = true; // default: medium | ||
whiteList['border-spacing'] = true; // default: 0 | ||
whiteList['border-style'] = true; // default: depending on individual properties | ||
whiteList['border-top'] = true; // default: depending on individual properties | ||
whiteList['border-top-color'] = true; // default: current color | ||
whiteList['border-top-left-radius'] = true; // default: 0 | ||
whiteList['border-top-right-radius'] = true; // default: 0 | ||
whiteList['border-top-style'] = true; // default: none | ||
whiteList['border-top-width'] = true; // default: medium | ||
whiteList['border-width'] = true; // default: depending on individual properties | ||
whiteList['bottom'] = false; // default: auto | ||
whiteList['box-decoration-break'] = true; // default: slice | ||
whiteList['box-shadow'] = true; // default: none | ||
whiteList['box-sizing'] = true; // default: content-box | ||
whiteList['box-snap'] = true; // default: none | ||
whiteList['box-suppress'] = true; // default: show | ||
whiteList['break-after'] = true; // default: auto | ||
whiteList['break-before'] = true; // default: auto | ||
whiteList['break-inside'] = true; // default: auto | ||
whiteList['caption-side'] = false; // default: top | ||
whiteList['chains'] = false; // default: none | ||
whiteList['clear'] = true; // default: none | ||
whiteList['clip'] = false; // default: auto | ||
whiteList['clip-path'] = false; // default: none | ||
whiteList['clip-rule'] = false; // default: nonzero | ||
whiteList['color'] = true; // default: implementation dependent | ||
whiteList['color-interpolation-filters'] = true; // default: auto | ||
whiteList['column-count'] = false; // default: auto | ||
whiteList['column-fill'] = false; // default: balance | ||
whiteList['column-gap'] = false; // default: normal | ||
whiteList['column-rule'] = false; // default: depending on individual properties | ||
whiteList['column-rule-color'] = false; // default: current color | ||
whiteList['column-rule-style'] = false; // default: medium | ||
whiteList['column-rule-width'] = false; // default: medium | ||
whiteList['column-span'] = false; // default: none | ||
whiteList['column-width'] = false; // default: auto | ||
whiteList['columns'] = false; // default: depending on individual properties | ||
whiteList['contain'] = false; // default: none | ||
whiteList['content'] = false; // default: normal | ||
whiteList['counter-increment'] = false; // default: none | ||
whiteList['counter-reset'] = false; // default: none | ||
whiteList['counter-set'] = false; // default: none | ||
whiteList['crop'] = false; // default: auto | ||
whiteList['cue'] = false; // default: depending on individual properties | ||
whiteList['cue-after'] = false; // default: none | ||
whiteList['cue-before'] = false; // default: none | ||
whiteList['cursor'] = false; // default: auto | ||
whiteList['direction'] = false; // default: ltr | ||
whiteList['display'] = true; // default: depending on individual properties | ||
whiteList['display-inside'] = true; // default: auto | ||
whiteList['display-list'] = true; // default: none | ||
whiteList['display-outside'] = true; // default: inline-level | ||
whiteList['dominant-baseline'] = false; // default: auto | ||
whiteList['elevation'] = false; // default: level | ||
whiteList['empty-cells'] = false; // default: show | ||
whiteList['filter'] = false; // default: none | ||
whiteList['flex'] = false; // default: depending on individual properties | ||
whiteList['flex-basis'] = false; // default: auto | ||
whiteList['flex-direction'] = false; // default: row | ||
whiteList['flex-flow'] = false; // default: depending on individual properties | ||
whiteList['flex-grow'] = false; // default: 0 | ||
whiteList['flex-shrink'] = false; // default: 1 | ||
whiteList['flex-wrap'] = false; // default: nowrap | ||
whiteList['float'] = false; // default: none | ||
whiteList['float-offset'] = false; // default: 0 0 | ||
whiteList['flood-color'] = false; // default: black | ||
whiteList['flood-opacity'] = false; // default: 1 | ||
whiteList['flow-from'] = false; // default: none | ||
whiteList['flow-into'] = false; // default: none | ||
whiteList['font'] = true; // default: depending on individual properties | ||
whiteList['font-family'] = true; // default: implementation dependent | ||
whiteList['font-feature-settings'] = true; // default: normal | ||
whiteList['font-kerning'] = true; // default: auto | ||
whiteList['font-language-override'] = true; // default: normal | ||
whiteList['font-size'] = true; // default: medium | ||
whiteList['font-size-adjust'] = true; // default: none | ||
whiteList['font-stretch'] = true; // default: normal | ||
whiteList['font-style'] = true; // default: normal | ||
whiteList['font-synthesis'] = true; // default: weight style | ||
whiteList['font-variant'] = true; // default: normal | ||
whiteList['font-variant-alternates'] = true; // default: normal | ||
whiteList['font-variant-caps'] = true; // default: normal | ||
whiteList['font-variant-east-asian'] = true; // default: normal | ||
whiteList['font-variant-ligatures'] = true; // default: normal | ||
whiteList['font-variant-numeric'] = true; // default: normal | ||
whiteList['font-variant-position'] = true; // default: normal | ||
whiteList['font-weight'] = true; // default: normal | ||
whiteList['grid'] = false; // default: depending on individual properties | ||
whiteList['grid-area'] = false; // default: depending on individual properties | ||
whiteList['grid-auto-columns'] = false; // default: auto | ||
whiteList['grid-auto-flow'] = false; // default: none | ||
whiteList['grid-auto-rows'] = false; // default: auto | ||
whiteList['grid-column'] = false; // default: depending on individual properties | ||
whiteList['grid-column-end'] = false; // default: auto | ||
whiteList['grid-column-start'] = false; // default: auto | ||
whiteList['grid-row'] = false; // default: depending on individual properties | ||
whiteList['grid-row-end'] = false; // default: auto | ||
whiteList['grid-row-start'] = false; // default: auto | ||
whiteList['grid-template'] = false; // default: depending on individual properties | ||
whiteList['grid-template-areas'] = false; // default: none | ||
whiteList['grid-template-columns'] = false; // default: none | ||
whiteList['grid-template-rows'] = false; // default: none | ||
whiteList['hanging-punctuation'] = false; // default: none | ||
whiteList['height'] = true; // default: auto | ||
whiteList['hyphens'] = false; // default: manual | ||
whiteList['icon'] = false; // default: auto | ||
whiteList['image-orientation'] = false; // default: auto | ||
whiteList['image-resolution'] = false; // default: normal | ||
whiteList['ime-mode'] = false; // default: auto | ||
whiteList['initial-letters'] = false; // default: normal | ||
whiteList['inline-box-align'] = false; // default: last | ||
whiteList['justify-content'] = false; // default: auto | ||
whiteList['justify-items'] = false; // default: auto | ||
whiteList['justify-self'] = false; // default: auto | ||
whiteList['left'] = false; // default: auto | ||
whiteList['letter-spacing'] = true; // default: normal | ||
whiteList['lighting-color'] = true; // default: white | ||
whiteList['line-box-contain'] = false; // default: block inline replaced | ||
whiteList['line-break'] = false; // default: auto | ||
whiteList['line-grid'] = false; // default: match-parent | ||
whiteList['line-height'] = false; // default: normal | ||
whiteList['line-snap'] = false; // default: none | ||
whiteList['line-stacking'] = false; // default: depending on individual properties | ||
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby | ||
whiteList['line-stacking-shift'] = false; // default: consider-shifts | ||
whiteList['line-stacking-strategy'] = false; // default: inline-line-height | ||
whiteList['list-style'] = true; // default: depending on individual properties | ||
whiteList['list-style-image'] = true; // default: none | ||
whiteList['list-style-position'] = true; // default: outside | ||
whiteList['list-style-type'] = true; // default: disc | ||
whiteList['margin'] = true; // default: depending on individual properties | ||
whiteList['margin-bottom'] = true; // default: 0 | ||
whiteList['margin-left'] = true; // default: 0 | ||
whiteList['margin-right'] = true; // default: 0 | ||
whiteList['margin-top'] = true; // default: 0 | ||
whiteList['marker-offset'] = false; // default: auto | ||
whiteList['marker-side'] = false; // default: list-item | ||
whiteList['marks'] = false; // default: none | ||
whiteList['mask'] = false; // default: border-box | ||
whiteList['mask-box'] = false; // default: see individual properties | ||
whiteList['mask-box-outset'] = false; // default: 0 | ||
whiteList['mask-box-repeat'] = false; // default: stretch | ||
whiteList['mask-box-slice'] = false; // default: 0 fill | ||
whiteList['mask-box-source'] = false; // default: none | ||
whiteList['mask-box-width'] = false; // default: auto | ||
whiteList['mask-clip'] = false; // default: border-box | ||
whiteList['mask-image'] = false; // default: none | ||
whiteList['mask-origin'] = false; // default: border-box | ||
whiteList['mask-position'] = false; // default: center | ||
whiteList['mask-repeat'] = false; // default: no-repeat | ||
whiteList['mask-size'] = false; // default: border-box | ||
whiteList['mask-source-type'] = false; // default: auto | ||
whiteList['mask-type'] = false; // default: luminance | ||
whiteList['max-height'] = true; // default: none | ||
whiteList['max-lines'] = false; // default: none | ||
whiteList['max-width'] = true; // default: none | ||
whiteList['min-height'] = true; // default: 0 | ||
whiteList['min-width'] = true; // default: 0 | ||
whiteList['move-to'] = false; // default: normal | ||
whiteList['nav-down'] = false; // default: auto | ||
whiteList['nav-index'] = false; // default: auto | ||
whiteList['nav-left'] = false; // default: auto | ||
whiteList['nav-right'] = false; // default: auto | ||
whiteList['nav-up'] = false; // default: auto | ||
whiteList['object-fit'] = false; // default: fill | ||
whiteList['object-position'] = false; // default: 50% 50% | ||
whiteList['opacity'] = false; // default: 1 | ||
whiteList['order'] = false; // default: 0 | ||
whiteList['orphans'] = false; // default: 2 | ||
whiteList['outline'] = false; // default: depending on individual properties | ||
whiteList['outline-color'] = false; // default: invert | ||
whiteList['outline-offset'] = false; // default: 0 | ||
whiteList['outline-style'] = false; // default: none | ||
whiteList['outline-width'] = false; // default: medium | ||
whiteList['overflow'] = false; // default: depending on individual properties | ||
whiteList['overflow-wrap'] = false; // default: normal | ||
whiteList['overflow-x'] = false; // default: visible | ||
whiteList['overflow-y'] = false; // default: visible | ||
whiteList['padding'] = true; // default: depending on individual properties | ||
whiteList['padding-bottom'] = true; // default: 0 | ||
whiteList['padding-left'] = true; // default: 0 | ||
whiteList['padding-right'] = true; // default: 0 | ||
whiteList['padding-top'] = true; // default: 0 | ||
whiteList['page'] = false; // default: auto | ||
whiteList['page-break-after'] = false; // default: auto | ||
whiteList['page-break-before'] = false; // default: auto | ||
whiteList['page-break-inside'] = false; // default: auto | ||
whiteList['page-policy'] = false; // default: start | ||
whiteList['pause'] = false; // default: implementation dependent | ||
whiteList['pause-after'] = false; // default: implementation dependent | ||
whiteList['pause-before'] = false; // default: implementation dependent | ||
whiteList['perspective'] = false; // default: none | ||
whiteList['perspective-origin'] = false; // default: 50% 50% | ||
whiteList['pitch'] = false; // default: medium | ||
whiteList['pitch-range'] = false; // default: 50 | ||
whiteList['play-during'] = false; // default: auto | ||
whiteList['position'] = false; // default: static | ||
whiteList['presentation-level'] = false; // default: 0 | ||
whiteList['quotes'] = false; // default: text | ||
whiteList['region-fragment'] = false; // default: auto | ||
whiteList['resize'] = false; // default: none | ||
whiteList['rest'] = false; // default: depending on individual properties | ||
whiteList['rest-after'] = false; // default: none | ||
whiteList['rest-before'] = false; // default: none | ||
whiteList['richness'] = false; // default: 50 | ||
whiteList['right'] = false; // default: auto | ||
whiteList['rotation'] = false; // default: 0 | ||
whiteList['rotation-point'] = false; // default: 50% 50% | ||
whiteList['ruby-align'] = false; // default: auto | ||
whiteList['ruby-merge'] = false; // default: separate | ||
whiteList['ruby-position'] = false; // default: before | ||
whiteList['shape-image-threshold'] = false; // default: 0.0 | ||
whiteList['shape-outside'] = false; // default: none | ||
whiteList['shape-margin'] = false; // default: 0 | ||
whiteList['size'] = false; // default: auto | ||
whiteList['speak'] = false; // default: auto | ||
whiteList['speak-as'] = false; // default: normal | ||
whiteList['speak-header'] = false; // default: once | ||
whiteList['speak-numeral'] = false; // default: continuous | ||
whiteList['speak-punctuation'] = false; // default: none | ||
whiteList['speech-rate'] = false; // default: medium | ||
whiteList['stress'] = false; // default: 50 | ||
whiteList['string-set'] = false; // default: none | ||
whiteList['tab-size'] = false; // default: 8 | ||
whiteList['table-layout'] = false; // default: auto | ||
whiteList['text-align'] = true; // default: start | ||
whiteList['text-align-last'] = true; // default: auto | ||
whiteList['text-combine-upright'] = true; // default: none | ||
whiteList['text-decoration'] = true; // default: none | ||
whiteList['text-decoration-color'] = true; // default: currentColor | ||
whiteList['text-decoration-line'] = true; // default: none | ||
whiteList['text-decoration-skip'] = true; // default: objects | ||
whiteList['text-decoration-style'] = true; // default: solid | ||
whiteList['text-emphasis'] = true; // default: depending on individual properties | ||
whiteList['text-emphasis-color'] = true; // default: currentColor | ||
whiteList['text-emphasis-position'] = true; // default: over right | ||
whiteList['text-emphasis-style'] = true; // default: none | ||
whiteList['text-height'] = true; // default: auto | ||
whiteList['text-indent'] = true; // default: 0 | ||
whiteList['text-justify'] = true; // default: auto | ||
whiteList['text-orientation'] = true; // default: mixed | ||
whiteList['text-overflow'] = true; // default: clip | ||
whiteList['text-shadow'] = true; // default: none | ||
whiteList['text-space-collapse'] = true; // default: collapse | ||
whiteList['text-transform'] = true; // default: none | ||
whiteList['text-underline-position'] = true; // default: auto | ||
whiteList['text-wrap'] = true; // default: normal | ||
whiteList['top'] = false; // default: auto | ||
whiteList['transform'] = false; // default: none | ||
whiteList['transform-origin'] = false; // default: 50% 50% 0 | ||
whiteList['transform-style'] = false; // default: flat | ||
whiteList['transition'] = false; // default: depending on individual properties | ||
whiteList['transition-delay'] = false; // default: 0s | ||
whiteList['transition-duration'] = false; // default: 0s | ||
whiteList['transition-property'] = false; // default: all | ||
whiteList['transition-timing-function'] = false; // default: ease | ||
whiteList['unicode-bidi'] = false; // default: normal | ||
whiteList['vertical-align'] = false; // default: baseline | ||
whiteList['visibility'] = false; // default: visible | ||
whiteList['voice-balance'] = false; // default: center | ||
whiteList['voice-duration'] = false; // default: auto | ||
whiteList['voice-family'] = false; // default: implementation dependent | ||
whiteList['voice-pitch'] = false; // default: medium | ||
whiteList['voice-range'] = false; // default: medium | ||
whiteList['voice-rate'] = false; // default: normal | ||
whiteList['voice-stress'] = false; // default: normal | ||
whiteList['voice-volume'] = false; // default: medium | ||
whiteList['volume'] = false; // default: medium | ||
whiteList['white-space'] = false; // default: normal | ||
whiteList['widows'] = false; // default: 2 | ||
whiteList['width'] = true; // default: auto | ||
whiteList['will-change'] = false; // default: auto | ||
whiteList['word-break'] = true; // default: normal | ||
whiteList['word-spacing'] = true; // default: normal | ||
whiteList['word-wrap'] = true; // default: normal | ||
whiteList['wrap-flow'] = false; // default: auto | ||
whiteList['wrap-through'] = false; // default: wrap | ||
whiteList['writing-mode'] = false; // default: horizontal-tb | ||
whiteList['z-index'] = false; // default: auto | ||
return whiteList; | ||
} | ||
@@ -471,3 +474,4 @@ | ||
exports.whiteList = whiteList; | ||
exports.whiteList = getDefaultWhiteList(); | ||
exports.getDefaultWhiteList = getDefaultWhiteList; | ||
exports.onAttr = onAttr; | ||
@@ -474,0 +478,0 @@ exports.onIgnoreAttr = onIgnoreAttr; |
@@ -1,1 +0,1 @@ | ||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var DEFAULT=require("./default");var parseStyle=require("./parser");var _=require("./util");function isNull(obj){return obj===undefined||obj===null}function FilterCSS(options){options=options||{};options.whiteList=options.whiteList||DEFAULT.whiteList;options.onAttr=options.onAttr||DEFAULT.onAttr;options.onIgnoreAttr=options.onIgnoreAttr||DEFAULT.onIgnoreAttr;this.options=options}FilterCSS.prototype.process=function(css){css=css||"";css=css.toString();if(!css)return"";var me=this;var options=me.options;var whiteList=options.whiteList;var onAttr=options.onAttr;var onIgnoreAttr=options.onIgnoreAttr;var retCSS=parseStyle(css,function(sourcePosition,position,name,value,source){var check=whiteList[name];var isWhite=false;if(check===true)isWhite=check;else if(typeof check==="function")isWhite=check(value);else if(check instanceof RegExp)isWhite=check.test(value);if(isWhite!==true)isWhite=false;var opts={position:position,sourcePosition:sourcePosition,source:source,isWhite:isWhite};if(isWhite){var ret=onAttr(name,value,opts);if(isNull(ret)){return name+":"+value}else{return ret}}else{var ret=onIgnoreAttr(name,value,opts);if(!isNull(ret)){return ret}}});return retCSS};module.exports=FilterCSS},{"./default":2,"./parser":4,"./util":5}],2:[function(require,module,exports){var whiteList={};whiteList["align-content"]=false;whiteList["align-items"]=false;whiteList["align-self"]=false;whiteList["alignment-adjust"]=false;whiteList["alignment-baseline"]=false;whiteList["all"]=false;whiteList["anchor-point"]=false;whiteList["animation"]=false;whiteList["animation-delay"]=false;whiteList["animation-direction"]=false;whiteList["animation-duration"]=false;whiteList["animation-fill-mode"]=false;whiteList["animation-iteration-count"]=false;whiteList["animation-name"]=false;whiteList["animation-play-state"]=false;whiteList["animation-timing-function"]=false;whiteList["azimuth"]=false;whiteList["backface-visibility"]=false;whiteList["background"]=true;whiteList["background-attachment"]=true;whiteList["background-clip"]=true;whiteList["background-color"]=true;whiteList["background-image"]=true;whiteList["background-origin"]=true;whiteList["background-position"]=true;whiteList["background-repeat"]=true;whiteList["background-size"]=true;whiteList["baseline-shift"]=false;whiteList["binding"]=false;whiteList["bleed"]=false;whiteList["bookmark-label"]=false;whiteList["bookmark-level"]=false;whiteList["bookmark-state"]=false;whiteList["border"]=true;whiteList["border-bottom"]=true;whiteList["border-bottom-color"]=true;whiteList["border-bottom-left-radius"]=true;whiteList["border-bottom-right-radius"]=true;whiteList["border-bottom-style"]=true;whiteList["border-bottom-width"]=true;whiteList["border-collapse"]=true;whiteList["border-color"]=true;whiteList["border-image"]=true;whiteList["border-image-outset"]=true;whiteList["border-image-repeat"]=true;whiteList["border-image-slice"]=true;whiteList["border-image-source"]=true;whiteList["border-image-width"]=true;whiteList["border-left"]=true;whiteList["border-left-color"]=true;whiteList["border-left-style"]=true;whiteList["border-left-width"]=true;whiteList["border-radius"]=true;whiteList["border-right"]=true;whiteList["border-right-color"]=true;whiteList["border-right-style"]=true;whiteList["border-right-width"]=true;whiteList["border-spacing"]=true;whiteList["border-style"]=true;whiteList["border-top"]=true;whiteList["border-top-color"]=true;whiteList["border-top-left-radius"]=true;whiteList["border-top-right-radius"]=true;whiteList["border-top-style"]=true;whiteList["border-top-width"]=true;whiteList["border-width"]=true;whiteList["bottom"]=false;whiteList["box-decoration-break"]=true;whiteList["box-shadow"]=true;whiteList["box-sizing"]=true;whiteList["box-snap"]=true;whiteList["box-suppress"]=true;whiteList["break-after"]=true;whiteList["break-before"]=true;whiteList["break-inside"]=true;whiteList["caption-side"]=false;whiteList["chains"]=false;whiteList["clear"]=true;whiteList["clip"]=false;whiteList["clip-path"]=false;whiteList["clip-rule"]=false;whiteList["color"]=true;whiteList["color-interpolation-filters"]=true;whiteList["column-count"]=false;whiteList["column-fill"]=false;whiteList["column-gap"]=false;whiteList["column-rule"]=false;whiteList["column-rule-color"]=false;whiteList["column-rule-style"]=false;whiteList["column-rule-width"]=false;whiteList["column-span"]=false;whiteList["column-width"]=false;whiteList["columns"]=false;whiteList["contain"]=false;whiteList["content"]=false;whiteList["counter-increment"]=false;whiteList["counter-reset"]=false;whiteList["counter-set"]=false;whiteList["crop"]=false;whiteList["cue"]=false;whiteList["cue-after"]=false;whiteList["cue-before"]=false;whiteList["cursor"]=false;whiteList["direction"]=false;whiteList["display"]=true;whiteList["display-inside"]=true;whiteList["display-list"]=true;whiteList["display-outside"]=true;whiteList["dominant-baseline"]=false;whiteList["elevation"]=false;whiteList["empty-cells"]=false;whiteList["filter"]=false;whiteList["flex"]=false;whiteList["flex-basis"]=false;whiteList["flex-direction"]=false;whiteList["flex-flow"]=false;whiteList["flex-grow"]=false;whiteList["flex-shrink"]=false;whiteList["flex-wrap"]=false;whiteList["float"]=false;whiteList["float-offset"]=false;whiteList["flood-color"]=false;whiteList["flood-opacity"]=false;whiteList["flow-from"]=false;whiteList["flow-into"]=false;whiteList["font"]=true;whiteList["font-family"]=true;whiteList["font-feature-settings"]=true;whiteList["font-kerning"]=true;whiteList["font-language-override"]=true;whiteList["font-size"]=true;whiteList["font-size-adjust"]=true;whiteList["font-stretch"]=true;whiteList["font-style"]=true;whiteList["font-synthesis"]=true;whiteList["font-variant"]=true;whiteList["font-variant-alternates"]=true;whiteList["font-variant-caps"]=true;whiteList["font-variant-east-asian"]=true;whiteList["font-variant-ligatures"]=true;whiteList["font-variant-numeric"]=true;whiteList["font-variant-position"]=true;whiteList["font-weight"]=true;whiteList["grid"]=false;whiteList["grid-area"]=false;whiteList["grid-auto-columns"]=false;whiteList["grid-auto-flow"]=false;whiteList["grid-auto-rows"]=false;whiteList["grid-column"]=false;whiteList["grid-column-end"]=false;whiteList["grid-column-start"]=false;whiteList["grid-row"]=false;whiteList["grid-row-end"]=false;whiteList["grid-row-start"]=false;whiteList["grid-template"]=false;whiteList["grid-template-areas"]=false;whiteList["grid-template-columns"]=false;whiteList["grid-template-rows"]=false;whiteList["hanging-punctuation"]=false;whiteList["height"]=true;whiteList["hyphens"]=false;whiteList["icon"]=false;whiteList["image-orientation"]=false;whiteList["image-resolution"]=false;whiteList["ime-mode"]=false;whiteList["initial-letters"]=false;whiteList["inline-box-align"]=false;whiteList["justify-content"]=false;whiteList["justify-items"]=false;whiteList["justify-self"]=false;whiteList["left"]=false;whiteList["letter-spacing"]=true;whiteList["lighting-color"]=true;whiteList["line-box-contain"]=false;whiteList["line-break"]=false;whiteList["line-grid"]=false;whiteList["line-height"]=false;whiteList["line-snap"]=false;whiteList["line-stacking"]=false;whiteList["line-stacking-ruby"]=false;whiteList["line-stacking-shift"]=false;whiteList["line-stacking-strategy"]=false;whiteList["list-style"]=true;whiteList["list-style-image"]=true;whiteList["list-style-position"]=true;whiteList["list-style-type"]=true;whiteList["margin"]=true;whiteList["margin-bottom"]=true;whiteList["margin-left"]=true;whiteList["margin-right"]=true;whiteList["margin-top"]=true;whiteList["marker-offset"]=false;whiteList["marker-side"]=false;whiteList["marks"]=false;whiteList["mask"]=false;whiteList["mask-box"]=false;whiteList["mask-box-outset"]=false;whiteList["mask-box-repeat"]=false;whiteList["mask-box-slice"]=false;whiteList["mask-box-source"]=false;whiteList["mask-box-width"]=false;whiteList["mask-clip"]=false;whiteList["mask-image"]=false;whiteList["mask-origin"]=false;whiteList["mask-position"]=false;whiteList["mask-repeat"]=false;whiteList["mask-size"]=false;whiteList["mask-source-type"]=false;whiteList["mask-type"]=false;whiteList["max-height"]=true;whiteList["max-lines"]=false;whiteList["max-width"]=true;whiteList["min-height"]=true;whiteList["min-width"]=true;whiteList["move-to"]=false;whiteList["nav-down"]=false;whiteList["nav-index"]=false;whiteList["nav-left"]=false;whiteList["nav-right"]=false;whiteList["nav-up"]=false;whiteList["object-fit"]=false;whiteList["object-position"]=false;whiteList["opacity"]=false;whiteList["order"]=false;whiteList["orphans"]=false;whiteList["outline"]=false;whiteList["outline-color"]=false;whiteList["outline-offset"]=false;whiteList["outline-style"]=false;whiteList["outline-width"]=false;whiteList["overflow"]=false;whiteList["overflow-wrap"]=false;whiteList["overflow-x"]=false;whiteList["overflow-y"]=false;whiteList["padding"]=true;whiteList["padding-bottom"]=true;whiteList["padding-left"]=true;whiteList["padding-right"]=true;whiteList["padding-top"]=true;whiteList["page"]=false;whiteList["page-break-after"]=false;whiteList["page-break-before"]=false;whiteList["page-break-inside"]=false;whiteList["page-policy"]=false;whiteList["pause"]=false;whiteList["pause-after"]=false;whiteList["pause-before"]=false;whiteList["perspective"]=false;whiteList["perspective-origin"]=false;whiteList["pitch"]=false;whiteList["pitch-range"]=false;whiteList["play-during"]=false;whiteList["position"]=false;whiteList["presentation-level"]=false;whiteList["quotes"]=false;whiteList["region-fragment"]=false;whiteList["resize"]=false;whiteList["rest"]=false;whiteList["rest-after"]=false;whiteList["rest-before"]=false;whiteList["richness"]=false;whiteList["right"]=false;whiteList["rotation"]=false;whiteList["rotation-point"]=false;whiteList["ruby-align"]=false;whiteList["ruby-merge"]=false;whiteList["ruby-position"]=false;whiteList["shape-image-threshold"]=false;whiteList["shape-outside"]=false;whiteList["shape-margin"]=false;whiteList["size"]=false;whiteList["speak"]=false;whiteList["speak-as"]=false;whiteList["speak-header"]=false;whiteList["speak-numeral"]=false;whiteList["speak-punctuation"]=false;whiteList["speech-rate"]=false;whiteList["stress"]=false;whiteList["string-set"]=false;whiteList["tab-size"]=false;whiteList["table-layout"]=false;whiteList["text-align"]=true;whiteList["text-align-last"]=true;whiteList["text-combine-upright"]=true;whiteList["text-decoration"]=true;whiteList["text-decoration-color"]=true;whiteList["text-decoration-line"]=true;whiteList["text-decoration-skip"]=true;whiteList["text-decoration-style"]=true;whiteList["text-emphasis"]=true;whiteList["text-emphasis-color"]=true;whiteList["text-emphasis-position"]=true;whiteList["text-emphasis-style"]=true;whiteList["text-height"]=true;whiteList["text-indent"]=true;whiteList["text-justify"]=true;whiteList["text-orientation"]=true;whiteList["text-overflow"]=true;whiteList["text-shadow"]=true;whiteList["text-space-collapse"]=true;whiteList["text-transform"]=true;whiteList["text-underline-position"]=true;whiteList["text-wrap"]=true;whiteList["top"]=false;whiteList["transform"]=false;whiteList["transform-origin"]=false;whiteList["transform-style"]=false;whiteList["transition"]=false;whiteList["transition-delay"]=false;whiteList["transition-duration"]=false;whiteList["transition-property"]=false;whiteList["transition-timing-function"]=false;whiteList["unicode-bidi"]=false;whiteList["vertical-align"]=false;whiteList["visibility"]=false;whiteList["voice-balance"]=false;whiteList["voice-duration"]=false;whiteList["voice-family"]=false;whiteList["voice-pitch"]=false;whiteList["voice-range"]=false;whiteList["voice-rate"]=false;whiteList["voice-stress"]=false;whiteList["voice-volume"]=false;whiteList["volume"]=false;whiteList["white-space"]=false;whiteList["widows"]=false;whiteList["width"]=true;whiteList["will-change"]=false;whiteList["word-break"]=true;whiteList["word-spacing"]=true;whiteList["word-wrap"]=true;whiteList["wrap-flow"]=false;whiteList["wrap-through"]=false;whiteList["writing-mode"]=false;whiteList["z-index"]=false;function onAttr(name,value,options){}function onIgnoreAttr(name,value,options){}exports.whiteList=whiteList;exports.onAttr=onAttr;exports.onIgnoreAttr=onIgnoreAttr},{}],3:[function(require,module,exports){var DEFAULT=require("./default");var FilterCSS=require("./css");function filterCSS(html,options){var xss=new FilterCSS(options);return xss.process(html)}exports=module.exports=filterCSS;exports.FilterCSS=FilterCSS;for(var i in DEFAULT)exports[i]=DEFAULT[i];if(typeof define==="function"&&define.amd){define(function(){return module.exports})}if(typeof window!=="undefined"){window.filterCSS=module.exports}},{"./css":1,"./default":2}],4:[function(require,module,exports){var _=require("./util");function parseStyle(css,onAttr){css=_.trimRight(css);if(css[css.length-1]!==";")css+=";";var cssLength=css.length;var isParenthesisOpen=false;var lastPos=0;var i=0;var retCSS="";function addNewAttr(){if(!isParenthesisOpen){var source=_.trim(css.slice(lastPos,i));var j=source.indexOf(":");if(j!==-1){var name=_.trim(source.slice(0,j));var value=_.trim(source.slice(j+1));if(name){var ret=onAttr(lastPos,retCSS.length,name,value,source);if(ret)retCSS+=ret+"; "}}}lastPos=i+1}for(;i<cssLength;i++){var c=css[i];if(c==="/"&&css[i+1]==="*"){var j=css.indexOf("*/",i+2);if(j===-1)break;i=j+1;lastPos=i+1;isParenthesisOpen=false}else if(c==="("){isParenthesisOpen=true}else if(c===")"){isParenthesisOpen=false}else if(c===";"){if(isParenthesisOpen){}else{addNewAttr()}}else if(c==="\n"){addNewAttr()}}return _.trim(retCSS)}module.exports=parseStyle},{"./util":5}],5:[function(require,module,exports){module.exports={indexOf:function(arr,item){var i,j;if(Array.prototype.indexOf){return arr.indexOf(item)}for(i=0,j=arr.length;i<j;i++){if(arr[i]===item){return i}}return-1},forEach:function(arr,fn,scope){var i,j;if(Array.prototype.forEach){return arr.forEach(fn,scope)}for(i=0,j=arr.length;i<j;i++){fn.call(scope,arr[i],i,arr)}},trim:function(str){if(String.prototype.trim){return str.trim()}return str.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(str){if(String.prototype.trimRight){return str.trimRight()}return str.replace(/(\s*$)/g,"")}}},{}]},{},[3]); | ||
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var DEFAULT=require("./default");var parseStyle=require("./parser");var _=require("./util");function isNull(obj){return obj===undefined||obj===null}function FilterCSS(options){options=options||{};options.whiteList=options.whiteList||DEFAULT.whiteList;options.onAttr=options.onAttr||DEFAULT.onAttr;options.onIgnoreAttr=options.onIgnoreAttr||DEFAULT.onIgnoreAttr;this.options=options}FilterCSS.prototype.process=function(css){css=css||"";css=css.toString();if(!css)return"";var me=this;var options=me.options;var whiteList=options.whiteList;var onAttr=options.onAttr;var onIgnoreAttr=options.onIgnoreAttr;var retCSS=parseStyle(css,function(sourcePosition,position,name,value,source){var check=whiteList[name];var isWhite=false;if(check===true)isWhite=check;else if(typeof check==="function")isWhite=check(value);else if(check instanceof RegExp)isWhite=check.test(value);if(isWhite!==true)isWhite=false;var opts={position:position,sourcePosition:sourcePosition,source:source,isWhite:isWhite};if(isWhite){var ret=onAttr(name,value,opts);if(isNull(ret)){return name+":"+value}else{return ret}}else{var ret=onIgnoreAttr(name,value,opts);if(!isNull(ret)){return ret}}});return retCSS};module.exports=FilterCSS},{"./default":2,"./parser":4,"./util":5}],2:[function(require,module,exports){function getDefaultWhiteList(){var whiteList={};whiteList["align-content"]=false;whiteList["align-items"]=false;whiteList["align-self"]=false;whiteList["alignment-adjust"]=false;whiteList["alignment-baseline"]=false;whiteList["all"]=false;whiteList["anchor-point"]=false;whiteList["animation"]=false;whiteList["animation-delay"]=false;whiteList["animation-direction"]=false;whiteList["animation-duration"]=false;whiteList["animation-fill-mode"]=false;whiteList["animation-iteration-count"]=false;whiteList["animation-name"]=false;whiteList["animation-play-state"]=false;whiteList["animation-timing-function"]=false;whiteList["azimuth"]=false;whiteList["backface-visibility"]=false;whiteList["background"]=true;whiteList["background-attachment"]=true;whiteList["background-clip"]=true;whiteList["background-color"]=true;whiteList["background-image"]=true;whiteList["background-origin"]=true;whiteList["background-position"]=true;whiteList["background-repeat"]=true;whiteList["background-size"]=true;whiteList["baseline-shift"]=false;whiteList["binding"]=false;whiteList["bleed"]=false;whiteList["bookmark-label"]=false;whiteList["bookmark-level"]=false;whiteList["bookmark-state"]=false;whiteList["border"]=true;whiteList["border-bottom"]=true;whiteList["border-bottom-color"]=true;whiteList["border-bottom-left-radius"]=true;whiteList["border-bottom-right-radius"]=true;whiteList["border-bottom-style"]=true;whiteList["border-bottom-width"]=true;whiteList["border-collapse"]=true;whiteList["border-color"]=true;whiteList["border-image"]=true;whiteList["border-image-outset"]=true;whiteList["border-image-repeat"]=true;whiteList["border-image-slice"]=true;whiteList["border-image-source"]=true;whiteList["border-image-width"]=true;whiteList["border-left"]=true;whiteList["border-left-color"]=true;whiteList["border-left-style"]=true;whiteList["border-left-width"]=true;whiteList["border-radius"]=true;whiteList["border-right"]=true;whiteList["border-right-color"]=true;whiteList["border-right-style"]=true;whiteList["border-right-width"]=true;whiteList["border-spacing"]=true;whiteList["border-style"]=true;whiteList["border-top"]=true;whiteList["border-top-color"]=true;whiteList["border-top-left-radius"]=true;whiteList["border-top-right-radius"]=true;whiteList["border-top-style"]=true;whiteList["border-top-width"]=true;whiteList["border-width"]=true;whiteList["bottom"]=false;whiteList["box-decoration-break"]=true;whiteList["box-shadow"]=true;whiteList["box-sizing"]=true;whiteList["box-snap"]=true;whiteList["box-suppress"]=true;whiteList["break-after"]=true;whiteList["break-before"]=true;whiteList["break-inside"]=true;whiteList["caption-side"]=false;whiteList["chains"]=false;whiteList["clear"]=true;whiteList["clip"]=false;whiteList["clip-path"]=false;whiteList["clip-rule"]=false;whiteList["color"]=true;whiteList["color-interpolation-filters"]=true;whiteList["column-count"]=false;whiteList["column-fill"]=false;whiteList["column-gap"]=false;whiteList["column-rule"]=false;whiteList["column-rule-color"]=false;whiteList["column-rule-style"]=false;whiteList["column-rule-width"]=false;whiteList["column-span"]=false;whiteList["column-width"]=false;whiteList["columns"]=false;whiteList["contain"]=false;whiteList["content"]=false;whiteList["counter-increment"]=false;whiteList["counter-reset"]=false;whiteList["counter-set"]=false;whiteList["crop"]=false;whiteList["cue"]=false;whiteList["cue-after"]=false;whiteList["cue-before"]=false;whiteList["cursor"]=false;whiteList["direction"]=false;whiteList["display"]=true;whiteList["display-inside"]=true;whiteList["display-list"]=true;whiteList["display-outside"]=true;whiteList["dominant-baseline"]=false;whiteList["elevation"]=false;whiteList["empty-cells"]=false;whiteList["filter"]=false;whiteList["flex"]=false;whiteList["flex-basis"]=false;whiteList["flex-direction"]=false;whiteList["flex-flow"]=false;whiteList["flex-grow"]=false;whiteList["flex-shrink"]=false;whiteList["flex-wrap"]=false;whiteList["float"]=false;whiteList["float-offset"]=false;whiteList["flood-color"]=false;whiteList["flood-opacity"]=false;whiteList["flow-from"]=false;whiteList["flow-into"]=false;whiteList["font"]=true;whiteList["font-family"]=true;whiteList["font-feature-settings"]=true;whiteList["font-kerning"]=true;whiteList["font-language-override"]=true;whiteList["font-size"]=true;whiteList["font-size-adjust"]=true;whiteList["font-stretch"]=true;whiteList["font-style"]=true;whiteList["font-synthesis"]=true;whiteList["font-variant"]=true;whiteList["font-variant-alternates"]=true;whiteList["font-variant-caps"]=true;whiteList["font-variant-east-asian"]=true;whiteList["font-variant-ligatures"]=true;whiteList["font-variant-numeric"]=true;whiteList["font-variant-position"]=true;whiteList["font-weight"]=true;whiteList["grid"]=false;whiteList["grid-area"]=false;whiteList["grid-auto-columns"]=false;whiteList["grid-auto-flow"]=false;whiteList["grid-auto-rows"]=false;whiteList["grid-column"]=false;whiteList["grid-column-end"]=false;whiteList["grid-column-start"]=false;whiteList["grid-row"]=false;whiteList["grid-row-end"]=false;whiteList["grid-row-start"]=false;whiteList["grid-template"]=false;whiteList["grid-template-areas"]=false;whiteList["grid-template-columns"]=false;whiteList["grid-template-rows"]=false;whiteList["hanging-punctuation"]=false;whiteList["height"]=true;whiteList["hyphens"]=false;whiteList["icon"]=false;whiteList["image-orientation"]=false;whiteList["image-resolution"]=false;whiteList["ime-mode"]=false;whiteList["initial-letters"]=false;whiteList["inline-box-align"]=false;whiteList["justify-content"]=false;whiteList["justify-items"]=false;whiteList["justify-self"]=false;whiteList["left"]=false;whiteList["letter-spacing"]=true;whiteList["lighting-color"]=true;whiteList["line-box-contain"]=false;whiteList["line-break"]=false;whiteList["line-grid"]=false;whiteList["line-height"]=false;whiteList["line-snap"]=false;whiteList["line-stacking"]=false;whiteList["line-stacking-ruby"]=false;whiteList["line-stacking-shift"]=false;whiteList["line-stacking-strategy"]=false;whiteList["list-style"]=true;whiteList["list-style-image"]=true;whiteList["list-style-position"]=true;whiteList["list-style-type"]=true;whiteList["margin"]=true;whiteList["margin-bottom"]=true;whiteList["margin-left"]=true;whiteList["margin-right"]=true;whiteList["margin-top"]=true;whiteList["marker-offset"]=false;whiteList["marker-side"]=false;whiteList["marks"]=false;whiteList["mask"]=false;whiteList["mask-box"]=false;whiteList["mask-box-outset"]=false;whiteList["mask-box-repeat"]=false;whiteList["mask-box-slice"]=false;whiteList["mask-box-source"]=false;whiteList["mask-box-width"]=false;whiteList["mask-clip"]=false;whiteList["mask-image"]=false;whiteList["mask-origin"]=false;whiteList["mask-position"]=false;whiteList["mask-repeat"]=false;whiteList["mask-size"]=false;whiteList["mask-source-type"]=false;whiteList["mask-type"]=false;whiteList["max-height"]=true;whiteList["max-lines"]=false;whiteList["max-width"]=true;whiteList["min-height"]=true;whiteList["min-width"]=true;whiteList["move-to"]=false;whiteList["nav-down"]=false;whiteList["nav-index"]=false;whiteList["nav-left"]=false;whiteList["nav-right"]=false;whiteList["nav-up"]=false;whiteList["object-fit"]=false;whiteList["object-position"]=false;whiteList["opacity"]=false;whiteList["order"]=false;whiteList["orphans"]=false;whiteList["outline"]=false;whiteList["outline-color"]=false;whiteList["outline-offset"]=false;whiteList["outline-style"]=false;whiteList["outline-width"]=false;whiteList["overflow"]=false;whiteList["overflow-wrap"]=false;whiteList["overflow-x"]=false;whiteList["overflow-y"]=false;whiteList["padding"]=true;whiteList["padding-bottom"]=true;whiteList["padding-left"]=true;whiteList["padding-right"]=true;whiteList["padding-top"]=true;whiteList["page"]=false;whiteList["page-break-after"]=false;whiteList["page-break-before"]=false;whiteList["page-break-inside"]=false;whiteList["page-policy"]=false;whiteList["pause"]=false;whiteList["pause-after"]=false;whiteList["pause-before"]=false;whiteList["perspective"]=false;whiteList["perspective-origin"]=false;whiteList["pitch"]=false;whiteList["pitch-range"]=false;whiteList["play-during"]=false;whiteList["position"]=false;whiteList["presentation-level"]=false;whiteList["quotes"]=false;whiteList["region-fragment"]=false;whiteList["resize"]=false;whiteList["rest"]=false;whiteList["rest-after"]=false;whiteList["rest-before"]=false;whiteList["richness"]=false;whiteList["right"]=false;whiteList["rotation"]=false;whiteList["rotation-point"]=false;whiteList["ruby-align"]=false;whiteList["ruby-merge"]=false;whiteList["ruby-position"]=false;whiteList["shape-image-threshold"]=false;whiteList["shape-outside"]=false;whiteList["shape-margin"]=false;whiteList["size"]=false;whiteList["speak"]=false;whiteList["speak-as"]=false;whiteList["speak-header"]=false;whiteList["speak-numeral"]=false;whiteList["speak-punctuation"]=false;whiteList["speech-rate"]=false;whiteList["stress"]=false;whiteList["string-set"]=false;whiteList["tab-size"]=false;whiteList["table-layout"]=false;whiteList["text-align"]=true;whiteList["text-align-last"]=true;whiteList["text-combine-upright"]=true;whiteList["text-decoration"]=true;whiteList["text-decoration-color"]=true;whiteList["text-decoration-line"]=true;whiteList["text-decoration-skip"]=true;whiteList["text-decoration-style"]=true;whiteList["text-emphasis"]=true;whiteList["text-emphasis-color"]=true;whiteList["text-emphasis-position"]=true;whiteList["text-emphasis-style"]=true;whiteList["text-height"]=true;whiteList["text-indent"]=true;whiteList["text-justify"]=true;whiteList["text-orientation"]=true;whiteList["text-overflow"]=true;whiteList["text-shadow"]=true;whiteList["text-space-collapse"]=true;whiteList["text-transform"]=true;whiteList["text-underline-position"]=true;whiteList["text-wrap"]=true;whiteList["top"]=false;whiteList["transform"]=false;whiteList["transform-origin"]=false;whiteList["transform-style"]=false;whiteList["transition"]=false;whiteList["transition-delay"]=false;whiteList["transition-duration"]=false;whiteList["transition-property"]=false;whiteList["transition-timing-function"]=false;whiteList["unicode-bidi"]=false;whiteList["vertical-align"]=false;whiteList["visibility"]=false;whiteList["voice-balance"]=false;whiteList["voice-duration"]=false;whiteList["voice-family"]=false;whiteList["voice-pitch"]=false;whiteList["voice-range"]=false;whiteList["voice-rate"]=false;whiteList["voice-stress"]=false;whiteList["voice-volume"]=false;whiteList["volume"]=false;whiteList["white-space"]=false;whiteList["widows"]=false;whiteList["width"]=true;whiteList["will-change"]=false;whiteList["word-break"]=true;whiteList["word-spacing"]=true;whiteList["word-wrap"]=true;whiteList["wrap-flow"]=false;whiteList["wrap-through"]=false;whiteList["writing-mode"]=false;whiteList["z-index"]=false;return whiteList}function onAttr(name,value,options){}function onIgnoreAttr(name,value,options){}exports.whiteList=getDefaultWhiteList();exports.getDefaultWhiteList=getDefaultWhiteList;exports.onAttr=onAttr;exports.onIgnoreAttr=onIgnoreAttr},{}],3:[function(require,module,exports){var DEFAULT=require("./default");var FilterCSS=require("./css");function filterCSS(html,options){var xss=new FilterCSS(options);return xss.process(html)}exports=module.exports=filterCSS;exports.FilterCSS=FilterCSS;for(var i in DEFAULT)exports[i]=DEFAULT[i];if(typeof define==="function"&&define.amd){define(function(){return module.exports})}if(typeof window!=="undefined"){window.filterCSS=module.exports}},{"./css":1,"./default":2}],4:[function(require,module,exports){var _=require("./util");function parseStyle(css,onAttr){css=_.trimRight(css);if(css[css.length-1]!==";")css+=";";var cssLength=css.length;var isParenthesisOpen=false;var lastPos=0;var i=0;var retCSS="";function addNewAttr(){if(!isParenthesisOpen){var source=_.trim(css.slice(lastPos,i));var j=source.indexOf(":");if(j!==-1){var name=_.trim(source.slice(0,j));var value=_.trim(source.slice(j+1));if(name){var ret=onAttr(lastPos,retCSS.length,name,value,source);if(ret)retCSS+=ret+"; "}}}lastPos=i+1}for(;i<cssLength;i++){var c=css[i];if(c==="/"&&css[i+1]==="*"){var j=css.indexOf("*/",i+2);if(j===-1)break;i=j+1;lastPos=i+1;isParenthesisOpen=false}else if(c==="("){isParenthesisOpen=true}else if(c===")"){isParenthesisOpen=false}else if(c===";"){if(isParenthesisOpen){}else{addNewAttr()}}else if(c==="\n"){addNewAttr()}}return _.trim(retCSS)}module.exports=parseStyle},{"./util":5}],5:[function(require,module,exports){module.exports={indexOf:function(arr,item){var i,j;if(Array.prototype.indexOf){return arr.indexOf(item)}for(i=0,j=arr.length;i<j;i++){if(arr[i]===item){return i}}return-1},forEach:function(arr,fn,scope){var i,j;if(Array.prototype.forEach){return arr.forEach(fn,scope)}for(i=0,j=arr.length;i<j;i++){fn.call(scope,arr[i],i,arr)}},trim:function(str){if(String.prototype.trim){return str.trim()}return str.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(str){if(String.prototype.trimRight){return str.trimRight()}return str.replace(/(\s*$)/g,"")}}},{}]},{},[3]); |
@@ -7,345 +7,348 @@ /** | ||
function getDefaultWhiteList () { | ||
// 白名单值说明: | ||
// true: 允许该属性 | ||
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许 | ||
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许 | ||
// 除上面列出的值外均表示不允许 | ||
var whiteList = {}; | ||
// 白名单值说明: | ||
// true: 允许该属性 | ||
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许 | ||
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许 | ||
// 除上面列出的值外均表示不允许 | ||
var whiteList = {}; | ||
whiteList['align-content'] = false; // default: auto | ||
whiteList['align-items'] = false; // default: auto | ||
whiteList['align-self'] = false; // default: auto | ||
whiteList['alignment-adjust'] = false; // default: auto | ||
whiteList['alignment-baseline'] = false; // default: baseline | ||
whiteList['all'] = false; // default: depending on individual properties | ||
whiteList['anchor-point'] = false; // default: none | ||
whiteList['animation'] = false; // default: depending on individual properties | ||
whiteList['animation-delay'] = false; // default: 0 | ||
whiteList['animation-direction'] = false; // default: normal | ||
whiteList['animation-duration'] = false; // default: 0 | ||
whiteList['animation-fill-mode'] = false; // default: none | ||
whiteList['animation-iteration-count'] = false; // default: 1 | ||
whiteList['animation-name'] = false; // default: none | ||
whiteList['animation-play-state'] = false; // default: running | ||
whiteList['animation-timing-function'] = false; // default: ease | ||
whiteList['azimuth'] = false; // default: center | ||
whiteList['backface-visibility'] = false; // default: visible | ||
whiteList['background'] = true; // default: depending on individual properties | ||
whiteList['background-attachment'] = true; // default: scroll | ||
whiteList['background-clip'] = true; // default: border-box | ||
whiteList['background-color'] = true; // default: transparent | ||
whiteList['background-image'] = true; // default: none | ||
whiteList['background-origin'] = true; // default: padding-box | ||
whiteList['background-position'] = true; // default: 0% 0% | ||
whiteList['background-repeat'] = true; // default: repeat | ||
whiteList['background-size'] = true; // default: auto | ||
whiteList['baseline-shift'] = false; // default: baseline | ||
whiteList['binding'] = false; // default: none | ||
whiteList['bleed'] = false; // default: 6pt | ||
whiteList['bookmark-label'] = false; // default: content() | ||
whiteList['bookmark-level'] = false; // default: none | ||
whiteList['bookmark-state'] = false; // default: open | ||
whiteList['border'] = true; // default: depending on individual properties | ||
whiteList['border-bottom'] = true; // default: depending on individual properties | ||
whiteList['border-bottom-color'] = true; // default: current color | ||
whiteList['border-bottom-left-radius'] = true; // default: 0 | ||
whiteList['border-bottom-right-radius'] = true; // default: 0 | ||
whiteList['border-bottom-style'] = true; // default: none | ||
whiteList['border-bottom-width'] = true; // default: medium | ||
whiteList['border-collapse'] = true; // default: separate | ||
whiteList['border-color'] = true; // default: depending on individual properties | ||
whiteList['border-image'] = true; // default: none | ||
whiteList['border-image-outset'] = true; // default: 0 | ||
whiteList['border-image-repeat'] = true; // default: stretch | ||
whiteList['border-image-slice'] = true; // default: 100% | ||
whiteList['border-image-source'] = true; // default: none | ||
whiteList['border-image-width'] = true; // default: 1 | ||
whiteList['border-left'] = true; // default: depending on individual properties | ||
whiteList['border-left-color'] = true; // default: current color | ||
whiteList['border-left-style'] = true; // default: none | ||
whiteList['border-left-width'] = true; // default: medium | ||
whiteList['border-radius'] = true; // default: 0 | ||
whiteList['border-right'] = true; // default: depending on individual properties | ||
whiteList['border-right-color'] = true; // default: current color | ||
whiteList['border-right-style'] = true; // default: none | ||
whiteList['border-right-width'] = true; // default: medium | ||
whiteList['border-spacing'] = true; // default: 0 | ||
whiteList['border-style'] = true; // default: depending on individual properties | ||
whiteList['border-top'] = true; // default: depending on individual properties | ||
whiteList['border-top-color'] = true; // default: current color | ||
whiteList['border-top-left-radius'] = true; // default: 0 | ||
whiteList['border-top-right-radius'] = true; // default: 0 | ||
whiteList['border-top-style'] = true; // default: none | ||
whiteList['border-top-width'] = true; // default: medium | ||
whiteList['border-width'] = true; // default: depending on individual properties | ||
whiteList['bottom'] = false; // default: auto | ||
whiteList['box-decoration-break'] = true; // default: slice | ||
whiteList['box-shadow'] = true; // default: none | ||
whiteList['box-sizing'] = true; // default: content-box | ||
whiteList['box-snap'] = true; // default: none | ||
whiteList['box-suppress'] = true; // default: show | ||
whiteList['break-after'] = true; // default: auto | ||
whiteList['break-before'] = true; // default: auto | ||
whiteList['break-inside'] = true; // default: auto | ||
whiteList['caption-side'] = false; // default: top | ||
whiteList['chains'] = false; // default: none | ||
whiteList['clear'] = true; // default: none | ||
whiteList['clip'] = false; // default: auto | ||
whiteList['clip-path'] = false; // default: none | ||
whiteList['clip-rule'] = false; // default: nonzero | ||
whiteList['color'] = true; // default: implementation dependent | ||
whiteList['color-interpolation-filters'] = true; // default: auto | ||
whiteList['column-count'] = false; // default: auto | ||
whiteList['column-fill'] = false; // default: balance | ||
whiteList['column-gap'] = false; // default: normal | ||
whiteList['column-rule'] = false; // default: depending on individual properties | ||
whiteList['column-rule-color'] = false; // default: current color | ||
whiteList['column-rule-style'] = false; // default: medium | ||
whiteList['column-rule-width'] = false; // default: medium | ||
whiteList['column-span'] = false; // default: none | ||
whiteList['column-width'] = false; // default: auto | ||
whiteList['columns'] = false; // default: depending on individual properties | ||
whiteList['contain'] = false; // default: none | ||
whiteList['content'] = false; // default: normal | ||
whiteList['counter-increment'] = false; // default: none | ||
whiteList['counter-reset'] = false; // default: none | ||
whiteList['counter-set'] = false; // default: none | ||
whiteList['crop'] = false; // default: auto | ||
whiteList['cue'] = false; // default: depending on individual properties | ||
whiteList['cue-after'] = false; // default: none | ||
whiteList['cue-before'] = false; // default: none | ||
whiteList['cursor'] = false; // default: auto | ||
whiteList['direction'] = false; // default: ltr | ||
whiteList['display'] = true; // default: depending on individual properties | ||
whiteList['display-inside'] = true; // default: auto | ||
whiteList['display-list'] = true; // default: none | ||
whiteList['display-outside'] = true; // default: inline-level | ||
whiteList['dominant-baseline'] = false; // default: auto | ||
whiteList['elevation'] = false; // default: level | ||
whiteList['empty-cells'] = false; // default: show | ||
whiteList['filter'] = false; // default: none | ||
whiteList['flex'] = false; // default: depending on individual properties | ||
whiteList['flex-basis'] = false; // default: auto | ||
whiteList['flex-direction'] = false; // default: row | ||
whiteList['flex-flow'] = false; // default: depending on individual properties | ||
whiteList['flex-grow'] = false; // default: 0 | ||
whiteList['flex-shrink'] = false; // default: 1 | ||
whiteList['flex-wrap'] = false; // default: nowrap | ||
whiteList['float'] = false; // default: none | ||
whiteList['float-offset'] = false; // default: 0 0 | ||
whiteList['flood-color'] = false; // default: black | ||
whiteList['flood-opacity'] = false; // default: 1 | ||
whiteList['flow-from'] = false; // default: none | ||
whiteList['flow-into'] = false; // default: none | ||
whiteList['font'] = true; // default: depending on individual properties | ||
whiteList['font-family'] = true; // default: implementation dependent | ||
whiteList['font-feature-settings'] = true; // default: normal | ||
whiteList['font-kerning'] = true; // default: auto | ||
whiteList['font-language-override'] = true; // default: normal | ||
whiteList['font-size'] = true; // default: medium | ||
whiteList['font-size-adjust'] = true; // default: none | ||
whiteList['font-stretch'] = true; // default: normal | ||
whiteList['font-style'] = true; // default: normal | ||
whiteList['font-synthesis'] = true; // default: weight style | ||
whiteList['font-variant'] = true; // default: normal | ||
whiteList['font-variant-alternates'] = true; // default: normal | ||
whiteList['font-variant-caps'] = true; // default: normal | ||
whiteList['font-variant-east-asian'] = true; // default: normal | ||
whiteList['font-variant-ligatures'] = true; // default: normal | ||
whiteList['font-variant-numeric'] = true; // default: normal | ||
whiteList['font-variant-position'] = true; // default: normal | ||
whiteList['font-weight'] = true; // default: normal | ||
whiteList['grid'] = false; // default: depending on individual properties | ||
whiteList['grid-area'] = false; // default: depending on individual properties | ||
whiteList['grid-auto-columns'] = false; // default: auto | ||
whiteList['grid-auto-flow'] = false; // default: none | ||
whiteList['grid-auto-rows'] = false; // default: auto | ||
whiteList['grid-column'] = false; // default: depending on individual properties | ||
whiteList['grid-column-end'] = false; // default: auto | ||
whiteList['grid-column-start'] = false; // default: auto | ||
whiteList['grid-row'] = false; // default: depending on individual properties | ||
whiteList['grid-row-end'] = false; // default: auto | ||
whiteList['grid-row-start'] = false; // default: auto | ||
whiteList['grid-template'] = false; // default: depending on individual properties | ||
whiteList['grid-template-areas'] = false; // default: none | ||
whiteList['grid-template-columns'] = false; // default: none | ||
whiteList['grid-template-rows'] = false; // default: none | ||
whiteList['hanging-punctuation'] = false; // default: none | ||
whiteList['height'] = true; // default: auto | ||
whiteList['hyphens'] = false; // default: manual | ||
whiteList['icon'] = false; // default: auto | ||
whiteList['image-orientation'] = false; // default: auto | ||
whiteList['image-resolution'] = false; // default: normal | ||
whiteList['ime-mode'] = false; // default: auto | ||
whiteList['initial-letters'] = false; // default: normal | ||
whiteList['inline-box-align'] = false; // default: last | ||
whiteList['justify-content'] = false; // default: auto | ||
whiteList['justify-items'] = false; // default: auto | ||
whiteList['justify-self'] = false; // default: auto | ||
whiteList['left'] = false; // default: auto | ||
whiteList['letter-spacing'] = true; // default: normal | ||
whiteList['lighting-color'] = true; // default: white | ||
whiteList['line-box-contain'] = false; // default: block inline replaced | ||
whiteList['line-break'] = false; // default: auto | ||
whiteList['line-grid'] = false; // default: match-parent | ||
whiteList['line-height'] = false; // default: normal | ||
whiteList['line-snap'] = false; // default: none | ||
whiteList['line-stacking'] = false; // default: depending on individual properties | ||
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby | ||
whiteList['line-stacking-shift'] = false; // default: consider-shifts | ||
whiteList['line-stacking-strategy'] = false; // default: inline-line-height | ||
whiteList['list-style'] = true; // default: depending on individual properties | ||
whiteList['list-style-image'] = true; // default: none | ||
whiteList['list-style-position'] = true; // default: outside | ||
whiteList['list-style-type'] = true; // default: disc | ||
whiteList['margin'] = true; // default: depending on individual properties | ||
whiteList['margin-bottom'] = true; // default: 0 | ||
whiteList['margin-left'] = true; // default: 0 | ||
whiteList['margin-right'] = true; // default: 0 | ||
whiteList['margin-top'] = true; // default: 0 | ||
whiteList['marker-offset'] = false; // default: auto | ||
whiteList['marker-side'] = false; // default: list-item | ||
whiteList['marks'] = false; // default: none | ||
whiteList['mask'] = false; // default: border-box | ||
whiteList['mask-box'] = false; // default: see individual properties | ||
whiteList['mask-box-outset'] = false; // default: 0 | ||
whiteList['mask-box-repeat'] = false; // default: stretch | ||
whiteList['mask-box-slice'] = false; // default: 0 fill | ||
whiteList['mask-box-source'] = false; // default: none | ||
whiteList['mask-box-width'] = false; // default: auto | ||
whiteList['mask-clip'] = false; // default: border-box | ||
whiteList['mask-image'] = false; // default: none | ||
whiteList['mask-origin'] = false; // default: border-box | ||
whiteList['mask-position'] = false; // default: center | ||
whiteList['mask-repeat'] = false; // default: no-repeat | ||
whiteList['mask-size'] = false; // default: border-box | ||
whiteList['mask-source-type'] = false; // default: auto | ||
whiteList['mask-type'] = false; // default: luminance | ||
whiteList['max-height'] = true; // default: none | ||
whiteList['max-lines'] = false; // default: none | ||
whiteList['max-width'] = true; // default: none | ||
whiteList['min-height'] = true; // default: 0 | ||
whiteList['min-width'] = true; // default: 0 | ||
whiteList['move-to'] = false; // default: normal | ||
whiteList['nav-down'] = false; // default: auto | ||
whiteList['nav-index'] = false; // default: auto | ||
whiteList['nav-left'] = false; // default: auto | ||
whiteList['nav-right'] = false; // default: auto | ||
whiteList['nav-up'] = false; // default: auto | ||
whiteList['object-fit'] = false; // default: fill | ||
whiteList['object-position'] = false; // default: 50% 50% | ||
whiteList['opacity'] = false; // default: 1 | ||
whiteList['order'] = false; // default: 0 | ||
whiteList['orphans'] = false; // default: 2 | ||
whiteList['outline'] = false; // default: depending on individual properties | ||
whiteList['outline-color'] = false; // default: invert | ||
whiteList['outline-offset'] = false; // default: 0 | ||
whiteList['outline-style'] = false; // default: none | ||
whiteList['outline-width'] = false; // default: medium | ||
whiteList['overflow'] = false; // default: depending on individual properties | ||
whiteList['overflow-wrap'] = false; // default: normal | ||
whiteList['overflow-x'] = false; // default: visible | ||
whiteList['overflow-y'] = false; // default: visible | ||
whiteList['padding'] = true; // default: depending on individual properties | ||
whiteList['padding-bottom'] = true; // default: 0 | ||
whiteList['padding-left'] = true; // default: 0 | ||
whiteList['padding-right'] = true; // default: 0 | ||
whiteList['padding-top'] = true; // default: 0 | ||
whiteList['page'] = false; // default: auto | ||
whiteList['page-break-after'] = false; // default: auto | ||
whiteList['page-break-before'] = false; // default: auto | ||
whiteList['page-break-inside'] = false; // default: auto | ||
whiteList['page-policy'] = false; // default: start | ||
whiteList['pause'] = false; // default: implementation dependent | ||
whiteList['pause-after'] = false; // default: implementation dependent | ||
whiteList['pause-before'] = false; // default: implementation dependent | ||
whiteList['perspective'] = false; // default: none | ||
whiteList['perspective-origin'] = false; // default: 50% 50% | ||
whiteList['pitch'] = false; // default: medium | ||
whiteList['pitch-range'] = false; // default: 50 | ||
whiteList['play-during'] = false; // default: auto | ||
whiteList['position'] = false; // default: static | ||
whiteList['presentation-level'] = false; // default: 0 | ||
whiteList['quotes'] = false; // default: text | ||
whiteList['region-fragment'] = false; // default: auto | ||
whiteList['resize'] = false; // default: none | ||
whiteList['rest'] = false; // default: depending on individual properties | ||
whiteList['rest-after'] = false; // default: none | ||
whiteList['rest-before'] = false; // default: none | ||
whiteList['richness'] = false; // default: 50 | ||
whiteList['right'] = false; // default: auto | ||
whiteList['rotation'] = false; // default: 0 | ||
whiteList['rotation-point'] = false; // default: 50% 50% | ||
whiteList['ruby-align'] = false; // default: auto | ||
whiteList['ruby-merge'] = false; // default: separate | ||
whiteList['ruby-position'] = false; // default: before | ||
whiteList['shape-image-threshold'] = false; // default: 0.0 | ||
whiteList['shape-outside'] = false; // default: none | ||
whiteList['shape-margin'] = false; // default: 0 | ||
whiteList['size'] = false; // default: auto | ||
whiteList['speak'] = false; // default: auto | ||
whiteList['speak-as'] = false; // default: normal | ||
whiteList['speak-header'] = false; // default: once | ||
whiteList['speak-numeral'] = false; // default: continuous | ||
whiteList['speak-punctuation'] = false; // default: none | ||
whiteList['speech-rate'] = false; // default: medium | ||
whiteList['stress'] = false; // default: 50 | ||
whiteList['string-set'] = false; // default: none | ||
whiteList['tab-size'] = false; // default: 8 | ||
whiteList['table-layout'] = false; // default: auto | ||
whiteList['text-align'] = true; // default: start | ||
whiteList['text-align-last'] = true; // default: auto | ||
whiteList['text-combine-upright'] = true; // default: none | ||
whiteList['text-decoration'] = true; // default: none | ||
whiteList['text-decoration-color'] = true; // default: currentColor | ||
whiteList['text-decoration-line'] = true; // default: none | ||
whiteList['text-decoration-skip'] = true; // default: objects | ||
whiteList['text-decoration-style'] = true; // default: solid | ||
whiteList['text-emphasis'] = true; // default: depending on individual properties | ||
whiteList['text-emphasis-color'] = true; // default: currentColor | ||
whiteList['text-emphasis-position'] = true; // default: over right | ||
whiteList['text-emphasis-style'] = true; // default: none | ||
whiteList['text-height'] = true; // default: auto | ||
whiteList['text-indent'] = true; // default: 0 | ||
whiteList['text-justify'] = true; // default: auto | ||
whiteList['text-orientation'] = true; // default: mixed | ||
whiteList['text-overflow'] = true; // default: clip | ||
whiteList['text-shadow'] = true; // default: none | ||
whiteList['text-space-collapse'] = true; // default: collapse | ||
whiteList['text-transform'] = true; // default: none | ||
whiteList['text-underline-position'] = true; // default: auto | ||
whiteList['text-wrap'] = true; // default: normal | ||
whiteList['top'] = false; // default: auto | ||
whiteList['transform'] = false; // default: none | ||
whiteList['transform-origin'] = false; // default: 50% 50% 0 | ||
whiteList['transform-style'] = false; // default: flat | ||
whiteList['transition'] = false; // default: depending on individual properties | ||
whiteList['transition-delay'] = false; // default: 0s | ||
whiteList['transition-duration'] = false; // default: 0s | ||
whiteList['transition-property'] = false; // default: all | ||
whiteList['transition-timing-function'] = false; // default: ease | ||
whiteList['unicode-bidi'] = false; // default: normal | ||
whiteList['vertical-align'] = false; // default: baseline | ||
whiteList['visibility'] = false; // default: visible | ||
whiteList['voice-balance'] = false; // default: center | ||
whiteList['voice-duration'] = false; // default: auto | ||
whiteList['voice-family'] = false; // default: implementation dependent | ||
whiteList['voice-pitch'] = false; // default: medium | ||
whiteList['voice-range'] = false; // default: medium | ||
whiteList['voice-rate'] = false; // default: normal | ||
whiteList['voice-stress'] = false; // default: normal | ||
whiteList['voice-volume'] = false; // default: medium | ||
whiteList['volume'] = false; // default: medium | ||
whiteList['white-space'] = false; // default: normal | ||
whiteList['widows'] = false; // default: 2 | ||
whiteList['width'] = true; // default: auto | ||
whiteList['will-change'] = false; // default: auto | ||
whiteList['word-break'] = true; // default: normal | ||
whiteList['word-spacing'] = true; // default: normal | ||
whiteList['word-wrap'] = true; // default: normal | ||
whiteList['wrap-flow'] = false; // default: auto | ||
whiteList['wrap-through'] = false; // default: wrap | ||
whiteList['writing-mode'] = false; // default: horizontal-tb | ||
whiteList['z-index'] = false; // default: auto | ||
whiteList['align-content'] = false; // default: auto | ||
whiteList['align-items'] = false; // default: auto | ||
whiteList['align-self'] = false; // default: auto | ||
whiteList['alignment-adjust'] = false; // default: auto | ||
whiteList['alignment-baseline'] = false; // default: baseline | ||
whiteList['all'] = false; // default: depending on individual properties | ||
whiteList['anchor-point'] = false; // default: none | ||
whiteList['animation'] = false; // default: depending on individual properties | ||
whiteList['animation-delay'] = false; // default: 0 | ||
whiteList['animation-direction'] = false; // default: normal | ||
whiteList['animation-duration'] = false; // default: 0 | ||
whiteList['animation-fill-mode'] = false; // default: none | ||
whiteList['animation-iteration-count'] = false; // default: 1 | ||
whiteList['animation-name'] = false; // default: none | ||
whiteList['animation-play-state'] = false; // default: running | ||
whiteList['animation-timing-function'] = false; // default: ease | ||
whiteList['azimuth'] = false; // default: center | ||
whiteList['backface-visibility'] = false; // default: visible | ||
whiteList['background'] = true; // default: depending on individual properties | ||
whiteList['background-attachment'] = true; // default: scroll | ||
whiteList['background-clip'] = true; // default: border-box | ||
whiteList['background-color'] = true; // default: transparent | ||
whiteList['background-image'] = true; // default: none | ||
whiteList['background-origin'] = true; // default: padding-box | ||
whiteList['background-position'] = true; // default: 0% 0% | ||
whiteList['background-repeat'] = true; // default: repeat | ||
whiteList['background-size'] = true; // default: auto | ||
whiteList['baseline-shift'] = false; // default: baseline | ||
whiteList['binding'] = false; // default: none | ||
whiteList['bleed'] = false; // default: 6pt | ||
whiteList['bookmark-label'] = false; // default: content() | ||
whiteList['bookmark-level'] = false; // default: none | ||
whiteList['bookmark-state'] = false; // default: open | ||
whiteList['border'] = true; // default: depending on individual properties | ||
whiteList['border-bottom'] = true; // default: depending on individual properties | ||
whiteList['border-bottom-color'] = true; // default: current color | ||
whiteList['border-bottom-left-radius'] = true; // default: 0 | ||
whiteList['border-bottom-right-radius'] = true; // default: 0 | ||
whiteList['border-bottom-style'] = true; // default: none | ||
whiteList['border-bottom-width'] = true; // default: medium | ||
whiteList['border-collapse'] = true; // default: separate | ||
whiteList['border-color'] = true; // default: depending on individual properties | ||
whiteList['border-image'] = true; // default: none | ||
whiteList['border-image-outset'] = true; // default: 0 | ||
whiteList['border-image-repeat'] = true; // default: stretch | ||
whiteList['border-image-slice'] = true; // default: 100% | ||
whiteList['border-image-source'] = true; // default: none | ||
whiteList['border-image-width'] = true; // default: 1 | ||
whiteList['border-left'] = true; // default: depending on individual properties | ||
whiteList['border-left-color'] = true; // default: current color | ||
whiteList['border-left-style'] = true; // default: none | ||
whiteList['border-left-width'] = true; // default: medium | ||
whiteList['border-radius'] = true; // default: 0 | ||
whiteList['border-right'] = true; // default: depending on individual properties | ||
whiteList['border-right-color'] = true; // default: current color | ||
whiteList['border-right-style'] = true; // default: none | ||
whiteList['border-right-width'] = true; // default: medium | ||
whiteList['border-spacing'] = true; // default: 0 | ||
whiteList['border-style'] = true; // default: depending on individual properties | ||
whiteList['border-top'] = true; // default: depending on individual properties | ||
whiteList['border-top-color'] = true; // default: current color | ||
whiteList['border-top-left-radius'] = true; // default: 0 | ||
whiteList['border-top-right-radius'] = true; // default: 0 | ||
whiteList['border-top-style'] = true; // default: none | ||
whiteList['border-top-width'] = true; // default: medium | ||
whiteList['border-width'] = true; // default: depending on individual properties | ||
whiteList['bottom'] = false; // default: auto | ||
whiteList['box-decoration-break'] = true; // default: slice | ||
whiteList['box-shadow'] = true; // default: none | ||
whiteList['box-sizing'] = true; // default: content-box | ||
whiteList['box-snap'] = true; // default: none | ||
whiteList['box-suppress'] = true; // default: show | ||
whiteList['break-after'] = true; // default: auto | ||
whiteList['break-before'] = true; // default: auto | ||
whiteList['break-inside'] = true; // default: auto | ||
whiteList['caption-side'] = false; // default: top | ||
whiteList['chains'] = false; // default: none | ||
whiteList['clear'] = true; // default: none | ||
whiteList['clip'] = false; // default: auto | ||
whiteList['clip-path'] = false; // default: none | ||
whiteList['clip-rule'] = false; // default: nonzero | ||
whiteList['color'] = true; // default: implementation dependent | ||
whiteList['color-interpolation-filters'] = true; // default: auto | ||
whiteList['column-count'] = false; // default: auto | ||
whiteList['column-fill'] = false; // default: balance | ||
whiteList['column-gap'] = false; // default: normal | ||
whiteList['column-rule'] = false; // default: depending on individual properties | ||
whiteList['column-rule-color'] = false; // default: current color | ||
whiteList['column-rule-style'] = false; // default: medium | ||
whiteList['column-rule-width'] = false; // default: medium | ||
whiteList['column-span'] = false; // default: none | ||
whiteList['column-width'] = false; // default: auto | ||
whiteList['columns'] = false; // default: depending on individual properties | ||
whiteList['contain'] = false; // default: none | ||
whiteList['content'] = false; // default: normal | ||
whiteList['counter-increment'] = false; // default: none | ||
whiteList['counter-reset'] = false; // default: none | ||
whiteList['counter-set'] = false; // default: none | ||
whiteList['crop'] = false; // default: auto | ||
whiteList['cue'] = false; // default: depending on individual properties | ||
whiteList['cue-after'] = false; // default: none | ||
whiteList['cue-before'] = false; // default: none | ||
whiteList['cursor'] = false; // default: auto | ||
whiteList['direction'] = false; // default: ltr | ||
whiteList['display'] = true; // default: depending on individual properties | ||
whiteList['display-inside'] = true; // default: auto | ||
whiteList['display-list'] = true; // default: none | ||
whiteList['display-outside'] = true; // default: inline-level | ||
whiteList['dominant-baseline'] = false; // default: auto | ||
whiteList['elevation'] = false; // default: level | ||
whiteList['empty-cells'] = false; // default: show | ||
whiteList['filter'] = false; // default: none | ||
whiteList['flex'] = false; // default: depending on individual properties | ||
whiteList['flex-basis'] = false; // default: auto | ||
whiteList['flex-direction'] = false; // default: row | ||
whiteList['flex-flow'] = false; // default: depending on individual properties | ||
whiteList['flex-grow'] = false; // default: 0 | ||
whiteList['flex-shrink'] = false; // default: 1 | ||
whiteList['flex-wrap'] = false; // default: nowrap | ||
whiteList['float'] = false; // default: none | ||
whiteList['float-offset'] = false; // default: 0 0 | ||
whiteList['flood-color'] = false; // default: black | ||
whiteList['flood-opacity'] = false; // default: 1 | ||
whiteList['flow-from'] = false; // default: none | ||
whiteList['flow-into'] = false; // default: none | ||
whiteList['font'] = true; // default: depending on individual properties | ||
whiteList['font-family'] = true; // default: implementation dependent | ||
whiteList['font-feature-settings'] = true; // default: normal | ||
whiteList['font-kerning'] = true; // default: auto | ||
whiteList['font-language-override'] = true; // default: normal | ||
whiteList['font-size'] = true; // default: medium | ||
whiteList['font-size-adjust'] = true; // default: none | ||
whiteList['font-stretch'] = true; // default: normal | ||
whiteList['font-style'] = true; // default: normal | ||
whiteList['font-synthesis'] = true; // default: weight style | ||
whiteList['font-variant'] = true; // default: normal | ||
whiteList['font-variant-alternates'] = true; // default: normal | ||
whiteList['font-variant-caps'] = true; // default: normal | ||
whiteList['font-variant-east-asian'] = true; // default: normal | ||
whiteList['font-variant-ligatures'] = true; // default: normal | ||
whiteList['font-variant-numeric'] = true; // default: normal | ||
whiteList['font-variant-position'] = true; // default: normal | ||
whiteList['font-weight'] = true; // default: normal | ||
whiteList['grid'] = false; // default: depending on individual properties | ||
whiteList['grid-area'] = false; // default: depending on individual properties | ||
whiteList['grid-auto-columns'] = false; // default: auto | ||
whiteList['grid-auto-flow'] = false; // default: none | ||
whiteList['grid-auto-rows'] = false; // default: auto | ||
whiteList['grid-column'] = false; // default: depending on individual properties | ||
whiteList['grid-column-end'] = false; // default: auto | ||
whiteList['grid-column-start'] = false; // default: auto | ||
whiteList['grid-row'] = false; // default: depending on individual properties | ||
whiteList['grid-row-end'] = false; // default: auto | ||
whiteList['grid-row-start'] = false; // default: auto | ||
whiteList['grid-template'] = false; // default: depending on individual properties | ||
whiteList['grid-template-areas'] = false; // default: none | ||
whiteList['grid-template-columns'] = false; // default: none | ||
whiteList['grid-template-rows'] = false; // default: none | ||
whiteList['hanging-punctuation'] = false; // default: none | ||
whiteList['height'] = true; // default: auto | ||
whiteList['hyphens'] = false; // default: manual | ||
whiteList['icon'] = false; // default: auto | ||
whiteList['image-orientation'] = false; // default: auto | ||
whiteList['image-resolution'] = false; // default: normal | ||
whiteList['ime-mode'] = false; // default: auto | ||
whiteList['initial-letters'] = false; // default: normal | ||
whiteList['inline-box-align'] = false; // default: last | ||
whiteList['justify-content'] = false; // default: auto | ||
whiteList['justify-items'] = false; // default: auto | ||
whiteList['justify-self'] = false; // default: auto | ||
whiteList['left'] = false; // default: auto | ||
whiteList['letter-spacing'] = true; // default: normal | ||
whiteList['lighting-color'] = true; // default: white | ||
whiteList['line-box-contain'] = false; // default: block inline replaced | ||
whiteList['line-break'] = false; // default: auto | ||
whiteList['line-grid'] = false; // default: match-parent | ||
whiteList['line-height'] = false; // default: normal | ||
whiteList['line-snap'] = false; // default: none | ||
whiteList['line-stacking'] = false; // default: depending on individual properties | ||
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby | ||
whiteList['line-stacking-shift'] = false; // default: consider-shifts | ||
whiteList['line-stacking-strategy'] = false; // default: inline-line-height | ||
whiteList['list-style'] = true; // default: depending on individual properties | ||
whiteList['list-style-image'] = true; // default: none | ||
whiteList['list-style-position'] = true; // default: outside | ||
whiteList['list-style-type'] = true; // default: disc | ||
whiteList['margin'] = true; // default: depending on individual properties | ||
whiteList['margin-bottom'] = true; // default: 0 | ||
whiteList['margin-left'] = true; // default: 0 | ||
whiteList['margin-right'] = true; // default: 0 | ||
whiteList['margin-top'] = true; // default: 0 | ||
whiteList['marker-offset'] = false; // default: auto | ||
whiteList['marker-side'] = false; // default: list-item | ||
whiteList['marks'] = false; // default: none | ||
whiteList['mask'] = false; // default: border-box | ||
whiteList['mask-box'] = false; // default: see individual properties | ||
whiteList['mask-box-outset'] = false; // default: 0 | ||
whiteList['mask-box-repeat'] = false; // default: stretch | ||
whiteList['mask-box-slice'] = false; // default: 0 fill | ||
whiteList['mask-box-source'] = false; // default: none | ||
whiteList['mask-box-width'] = false; // default: auto | ||
whiteList['mask-clip'] = false; // default: border-box | ||
whiteList['mask-image'] = false; // default: none | ||
whiteList['mask-origin'] = false; // default: border-box | ||
whiteList['mask-position'] = false; // default: center | ||
whiteList['mask-repeat'] = false; // default: no-repeat | ||
whiteList['mask-size'] = false; // default: border-box | ||
whiteList['mask-source-type'] = false; // default: auto | ||
whiteList['mask-type'] = false; // default: luminance | ||
whiteList['max-height'] = true; // default: none | ||
whiteList['max-lines'] = false; // default: none | ||
whiteList['max-width'] = true; // default: none | ||
whiteList['min-height'] = true; // default: 0 | ||
whiteList['min-width'] = true; // default: 0 | ||
whiteList['move-to'] = false; // default: normal | ||
whiteList['nav-down'] = false; // default: auto | ||
whiteList['nav-index'] = false; // default: auto | ||
whiteList['nav-left'] = false; // default: auto | ||
whiteList['nav-right'] = false; // default: auto | ||
whiteList['nav-up'] = false; // default: auto | ||
whiteList['object-fit'] = false; // default: fill | ||
whiteList['object-position'] = false; // default: 50% 50% | ||
whiteList['opacity'] = false; // default: 1 | ||
whiteList['order'] = false; // default: 0 | ||
whiteList['orphans'] = false; // default: 2 | ||
whiteList['outline'] = false; // default: depending on individual properties | ||
whiteList['outline-color'] = false; // default: invert | ||
whiteList['outline-offset'] = false; // default: 0 | ||
whiteList['outline-style'] = false; // default: none | ||
whiteList['outline-width'] = false; // default: medium | ||
whiteList['overflow'] = false; // default: depending on individual properties | ||
whiteList['overflow-wrap'] = false; // default: normal | ||
whiteList['overflow-x'] = false; // default: visible | ||
whiteList['overflow-y'] = false; // default: visible | ||
whiteList['padding'] = true; // default: depending on individual properties | ||
whiteList['padding-bottom'] = true; // default: 0 | ||
whiteList['padding-left'] = true; // default: 0 | ||
whiteList['padding-right'] = true; // default: 0 | ||
whiteList['padding-top'] = true; // default: 0 | ||
whiteList['page'] = false; // default: auto | ||
whiteList['page-break-after'] = false; // default: auto | ||
whiteList['page-break-before'] = false; // default: auto | ||
whiteList['page-break-inside'] = false; // default: auto | ||
whiteList['page-policy'] = false; // default: start | ||
whiteList['pause'] = false; // default: implementation dependent | ||
whiteList['pause-after'] = false; // default: implementation dependent | ||
whiteList['pause-before'] = false; // default: implementation dependent | ||
whiteList['perspective'] = false; // default: none | ||
whiteList['perspective-origin'] = false; // default: 50% 50% | ||
whiteList['pitch'] = false; // default: medium | ||
whiteList['pitch-range'] = false; // default: 50 | ||
whiteList['play-during'] = false; // default: auto | ||
whiteList['position'] = false; // default: static | ||
whiteList['presentation-level'] = false; // default: 0 | ||
whiteList['quotes'] = false; // default: text | ||
whiteList['region-fragment'] = false; // default: auto | ||
whiteList['resize'] = false; // default: none | ||
whiteList['rest'] = false; // default: depending on individual properties | ||
whiteList['rest-after'] = false; // default: none | ||
whiteList['rest-before'] = false; // default: none | ||
whiteList['richness'] = false; // default: 50 | ||
whiteList['right'] = false; // default: auto | ||
whiteList['rotation'] = false; // default: 0 | ||
whiteList['rotation-point'] = false; // default: 50% 50% | ||
whiteList['ruby-align'] = false; // default: auto | ||
whiteList['ruby-merge'] = false; // default: separate | ||
whiteList['ruby-position'] = false; // default: before | ||
whiteList['shape-image-threshold'] = false; // default: 0.0 | ||
whiteList['shape-outside'] = false; // default: none | ||
whiteList['shape-margin'] = false; // default: 0 | ||
whiteList['size'] = false; // default: auto | ||
whiteList['speak'] = false; // default: auto | ||
whiteList['speak-as'] = false; // default: normal | ||
whiteList['speak-header'] = false; // default: once | ||
whiteList['speak-numeral'] = false; // default: continuous | ||
whiteList['speak-punctuation'] = false; // default: none | ||
whiteList['speech-rate'] = false; // default: medium | ||
whiteList['stress'] = false; // default: 50 | ||
whiteList['string-set'] = false; // default: none | ||
whiteList['tab-size'] = false; // default: 8 | ||
whiteList['table-layout'] = false; // default: auto | ||
whiteList['text-align'] = true; // default: start | ||
whiteList['text-align-last'] = true; // default: auto | ||
whiteList['text-combine-upright'] = true; // default: none | ||
whiteList['text-decoration'] = true; // default: none | ||
whiteList['text-decoration-color'] = true; // default: currentColor | ||
whiteList['text-decoration-line'] = true; // default: none | ||
whiteList['text-decoration-skip'] = true; // default: objects | ||
whiteList['text-decoration-style'] = true; // default: solid | ||
whiteList['text-emphasis'] = true; // default: depending on individual properties | ||
whiteList['text-emphasis-color'] = true; // default: currentColor | ||
whiteList['text-emphasis-position'] = true; // default: over right | ||
whiteList['text-emphasis-style'] = true; // default: none | ||
whiteList['text-height'] = true; // default: auto | ||
whiteList['text-indent'] = true; // default: 0 | ||
whiteList['text-justify'] = true; // default: auto | ||
whiteList['text-orientation'] = true; // default: mixed | ||
whiteList['text-overflow'] = true; // default: clip | ||
whiteList['text-shadow'] = true; // default: none | ||
whiteList['text-space-collapse'] = true; // default: collapse | ||
whiteList['text-transform'] = true; // default: none | ||
whiteList['text-underline-position'] = true; // default: auto | ||
whiteList['text-wrap'] = true; // default: normal | ||
whiteList['top'] = false; // default: auto | ||
whiteList['transform'] = false; // default: none | ||
whiteList['transform-origin'] = false; // default: 50% 50% 0 | ||
whiteList['transform-style'] = false; // default: flat | ||
whiteList['transition'] = false; // default: depending on individual properties | ||
whiteList['transition-delay'] = false; // default: 0s | ||
whiteList['transition-duration'] = false; // default: 0s | ||
whiteList['transition-property'] = false; // default: all | ||
whiteList['transition-timing-function'] = false; // default: ease | ||
whiteList['unicode-bidi'] = false; // default: normal | ||
whiteList['vertical-align'] = false; // default: baseline | ||
whiteList['visibility'] = false; // default: visible | ||
whiteList['voice-balance'] = false; // default: center | ||
whiteList['voice-duration'] = false; // default: auto | ||
whiteList['voice-family'] = false; // default: implementation dependent | ||
whiteList['voice-pitch'] = false; // default: medium | ||
whiteList['voice-range'] = false; // default: medium | ||
whiteList['voice-rate'] = false; // default: normal | ||
whiteList['voice-stress'] = false; // default: normal | ||
whiteList['voice-volume'] = false; // default: medium | ||
whiteList['volume'] = false; // default: medium | ||
whiteList['white-space'] = false; // default: normal | ||
whiteList['widows'] = false; // default: 2 | ||
whiteList['width'] = true; // default: auto | ||
whiteList['will-change'] = false; // default: auto | ||
whiteList['word-break'] = true; // default: normal | ||
whiteList['word-spacing'] = true; // default: normal | ||
whiteList['word-wrap'] = true; // default: normal | ||
whiteList['wrap-flow'] = false; // default: auto | ||
whiteList['wrap-through'] = false; // default: wrap | ||
whiteList['writing-mode'] = false; // default: horizontal-tb | ||
whiteList['z-index'] = false; // default: auto | ||
return whiteList; | ||
} | ||
@@ -378,4 +381,5 @@ | ||
exports.whiteList = whiteList; | ||
exports.whiteList = getDefaultWhiteList(); | ||
exports.getDefaultWhiteList = getDefaultWhiteList; | ||
exports.onAttr = onAttr; | ||
exports.onIgnoreAttr = onIgnoreAttr; |
{ | ||
"name": "cssfilter", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Sanitize untrusted CSS with a configuration specified by a Whitelist. 根据白名单过滤CSS", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78981
1292