File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
uni-app/components/mp-html Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -866,7 +866,15 @@ lexer.prototype.checkClose = function (method) {
866866 this . i += selfClose ? 2 : 1
867867 this . start = this . i
868868 this . handler . onOpenTag ( selfClose )
869- this . state = this . text
869+ if ( this . handler . tagName == 'script' ) {
870+ this . i = this . content . indexOf ( '</' , this . i )
871+ if ( this . i != - 1 ) {
872+ this . i += 2
873+ this . start = this . i
874+ }
875+ this . state = this . endTag
876+ } else
877+ this . state = this . text
870878 return true
871879 }
872880 return false
Original file line number Diff line number Diff line change @@ -934,7 +934,15 @@ lexer.prototype.checkClose = function (method) {
934934 this . i += selfClose ? 2 : 1
935935 this . start = this . i
936936 this . handler . onOpenTag ( selfClose )
937- this . state = this . text
937+ if ( this . handler . tagName == 'script' ) {
938+ this . i = this . content . indexOf ( '</' , this . i )
939+ if ( this . i != - 1 ) {
940+ this . i += 2
941+ this . start = this . i
942+ }
943+ this . state = this . endTag
944+ } else
945+ this . state = this . text
938946 return true
939947 }
940948 return false
You can’t perform that action at this time.
0 commit comments