@@ -3475,6 +3475,7 @@ function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
34753475 'p {margin:5px 0;}' ,
34763476 'table {border-collapse:collapse;}' ,
34773477 'img {border:0;}' ,
3478+ 'noscript {display:none;}' ,
34783479 'table.ke-zeroborder td {border:1px dotted #AAA;}' ,
34793480 'img.ke-flash {' ,
34803481 ' border:1px solid #AAA;' ,
@@ -3505,7 +3506,7 @@ function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
35053506 ' width:16px;' ,
35063507 ' height:16px;' ,
35073508 '}' ,
3508- '.ke-script {' ,
3509+ '.ke-script, .ke-noscript {' ,
35093510 ' display:none;' ,
35103511 ' font-size:0;' ,
35113512 ' width:0;' ,
@@ -5669,7 +5670,10 @@ _plugin('core', function(K) {
56695670 } ) ;
56705671 } ) ;
56715672 self . beforeGetHtml ( function ( html ) {
5672- return html . replace ( / < i m g [ ^ > ] * c l a s s = " ? k e - ( f l a s h | r m | m e d i a ) " ? [ ^ > ] * > / ig, function ( full ) {
5673+ return html . replace ( / ( < (?: n o s c r i p t | n o s c r i p t \s [ ^ > ] * ) > ) ( [ \s \S ] * ?) ( < \/ n o s c r i p t > ) / ig, function ( $0 , $1 , $2 , $3 ) {
5674+ return $1 + _unescape ( $2 ) . replace ( / \s + / g, ' ' ) + $3 ;
5675+ } )
5676+ . replace ( / < i m g [ ^ > ] * c l a s s = " ? k e - ( f l a s h | r m | m e d i a ) " ? [ ^ > ] * > / ig, function ( full ) {
56735677 var imgAttrs = _getAttrList ( full ) ,
56745678 styles = _getCssList ( imgAttrs . style || '' ) ,
56755679 attrs = _mediaAttrs ( imgAttrs [ 'data-ke-tag' ] ) ;
@@ -5684,6 +5688,9 @@ _plugin('core', function(K) {
56845688 . replace ( / < d i v \s + [ ^ > ] * d a t a - k e - s c r i p t - a t t r = " ( [ ^ " ] * ) " [ ^ > ] * > ( [ \s \S ] * ?) < \/ d i v > / ig, function ( full , attr , code ) {
56855689 return '<script' + unescape ( attr ) + '>' + unescape ( code ) + '</script>' ;
56865690 } )
5691+ . replace ( / < d i v \s + [ ^ > ] * d a t a - k e - n o s c r i p t - a t t r = " ( [ ^ " ] * ) " [ ^ > ] * > ( [ \s \S ] * ?) < \/ d i v > / ig, function ( full , attr , code ) {
5692+ return '<noscript' + unescape ( attr ) + '>' + unescape ( code ) + '</noscript>' ;
5693+ } )
56875694 . replace ( / ( < [ ^ > ] * ) d a t a - k e - s r c = " ( [ ^ " ] * ) " ( [ ^ > ] * > ) / ig, function ( full , start , src , end ) {
56885695 full = full . replace ( / ( \s + (?: h r e f | s r c ) = " ) [ ^ " ] * ( " ) / i, '$1' + src + '$2' ) ;
56895696 full = full . replace ( / \s + d a t a - k e - s r c = " [ ^ " ] * " / i, '' ) ;
@@ -5711,6 +5718,9 @@ _plugin('core', function(K) {
57115718 . replace ( / < s c r i p t ( [ ^ > ] * ) > ( [ \s \S ] * ?) < \/ s c r i p t > / ig, function ( full , attr , code ) {
57125719 return '<div class="ke-script" data-ke-script-attr="' + escape ( attr ) + '">' + escape ( code ) + '</div>' ;
57135720 } )
5721+ . replace ( / < n o s c r i p t ( [ ^ > ] * ) > ( [ \s \S ] * ?) < \/ n o s c r i p t > / ig, function ( full , attr , code ) {
5722+ return '<div class="ke-noscript" data-ke-noscript-attr="' + escape ( attr ) + '">' + escape ( code ) + '</div>' ;
5723+ } )
57145724 . replace ( / ( < [ ^ > ] * ) ( h r e f | s r c ) = " ( [ ^ " ] * ) " ( [ ^ > ] * > ) / ig, function ( full , start , key , src , end ) {
57155725 if ( full . match ( / \s d a t a - k e - s r c = " [ ^ " ] * " / i) ) {
57165726 return full ;
0 commit comments