| 18 | b[4]||b[6],l=!1,c=[c,a[k++]];k<f;k++){if(l){if(">"===a[k])break}else 0<=a[k].indexOf(b)&&(l=!0);c.push(a[k])}if(f<=k)break;c=c.join("")}else{var l=b[1].toLowerCase(),j;if(b[2]){j=b[3];var i=j.charCodeAt(0);if(34===i||39===i)j=j.substr(1,j.length-2);j=x(j.replace(ba,""))}else j=l;g.push(l,j);c=c.substr(b[0].length)}else c=c.replace(/^[\s\S][^a-z\s]*/,"");e.B=g;e.next=k+1;return e}}function J(a){function d(a,b){e||b.push(a)}var b,e;return E({startDoc:function(){b=[];e=!1},startTag:function(c,d,f){if(!e&& |
| 19 | h.f.hasOwnProperty(c)){var g=h.f[c];if(!(g&h.d.FOLDABLE))if(d=a(c,d)){g&h.d.EMPTY||b.push(c);f.push("<",c);c=0;for(g=d.length;c<g;c+=2){var i=d[c],j=d[c+1];j!==o&&void 0!==j&&f.push(" ",i,'="',y(j),'"')}f.push(">")}else e=!(g&h.d.EMPTY)}},endTag:function(a,d){if(e)e=!1;else if(h.f.hasOwnProperty(a)){var f=h.f[a];if(!(f&(h.d.EMPTY|h.d.FOLDABLE))){if(f&h.d.OPTIONAL_ENDTAG)for(f=b.length;0<=--f;){var g=b[f];if(g===a)break;if(!(h.f[g]&h.d.OPTIONAL_ENDTAG))return}else for(f=b.length;0<=--f&&b[f]!==a;); |
| 20 | if(!(0>f)){for(var i=b.length;--i>f;)g=b[i],h.f[g]&h.d.OPTIONAL_ENDTAG||d.push("</",g,">");b.length=f;d.push("</",a,">")}}}},pcdata:d,rcdata:d,cdata:d,endDoc:function(a){for(;b.length;b.length--)a.push("</",b[b.length-1],">")}})}function K(a,d,b,e,c){if(!c)return o;var h=(""+a).match(ca);return h&&(!h[1]||da.test(h[1]))?c(a,d,b,e):o}function p(a,d,b,e,c){b||a(d+" removed",{C:"removed",tagName:d});if(e!==c){var h="changed";e&&!c?h="removed":!e&&c&&(h="added");a(d+"."+b+" "+h,{C:h,tagName:d,G:b,oldValue:e, |
| 21 | newValue:c})}}function L(a,d,b){d=d+"::"+b;if(a.hasOwnProperty(d))return a[d];d="*::"+b;if(a.hasOwnProperty(d))return a[d]}function M(a,d,b,e,c){for(var i=0;i<d.length;i+=2){var f=d[i],g=d[i+1],l=g,j=o,m;if((m=a+"::"+f,h.k.hasOwnProperty(m))||(m="*::"+f,h.k.hasOwnProperty(m)))j=h.k[m];if(j!==o)switch(j){case h.e.NONE:break;case h.e.SCRIPT:g=o;c&&p(c,a,f,l,g);break;case h.e.STYLE:if("undefined"===typeof v){g=o;c&&p(c,a,f,l,g);break}var n=[];v(g,{H:function(a,c){var d=a.toLowerCase(),e=N[d];if(e){O(d, |
| 22 | e,c,b?function(a){return K(a,h.A.D,h.z.F,{TYPE:"CSS",CSS_PROP:d},b)}:o);n.push(a+": "+c.join(" "))}}});g=0<n.length?n.join(" ; "):o;c&&p(c,a,f,l,g);break;case h.e.ID:case h.e.IDREF:case h.e.IDREFS:case h.e.GLOBAL_NAME:case h.e.LOCAL_NAME:case h.e.CLASSES:g=e?e(g):g;c&&p(c,a,f,l,g);break;case h.e.URI:g=K(g,L(h.w,a,f),L(h.v,a,f),{TYPE:"MARKUP",XML_ATTR:f,XML_TAG:a},b);c&&p(c,a,f,l,g);break;case h.e.URI_FRAGMENT:g&&"#"===g.charAt(0)?(g=g.substring(1),g=e?e(g):g,g!==o&&void 0!==g&&(g="#"+g)):g=o;c&&p(c, |
| 23 | a,f,l,g);break;default:g=o,c&&p(c,a,f,l,g)}else g=o,c&&p(c,a,f,l,g);d[i+1]=g}return d}function P(a,d,b){return function(e,c){if(h.f[e]&h.d.UNSAFE)b&&p(b,e,void 0,void 0,void 0);else return M(e,c,a,d,b)}}function Q(a,d){var b=[];J(d)(a,b);return b.join("")}var v,O,N;"undefined"!==typeof window&&(v=window.parseCssDeclarations,O=window.sanitizeCssProperty,N=window.cssSchema);var w={lt:"<",gt:">",amp:"&",nbsp:"\u00a0",quot:'"',apos:"'"},T=/^#(\d+)$/,U=/^#x([0-9A-Fa-f]+)$/,ba=/\0/g,V=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g, |
| 24 | $=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,W=/&/g,Y=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,B=/[<]/g,C=/>/g,X=/\"/g,aa=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Z=3==="a,b".split(/(,)/).length,H=h.d.CDATA|h.d.RCDATA,n={},z={},ca=/^(?:([^:/?# ]+):)?/,da=/^(?:https?|mailto)$/i,i={};i.I=i.escapeAttrib=y;i.J=i.makeHtmlSanitizer=J;i.K=i.makeSaxParser=E;i.L=i.makeTagPolicy=P;i.M=i.normalizeRCData=D;i.N=i.sanitize=function(a,d,b,e){return Q(a,P(d,b,e))}; |