File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ Lexer.prototype.token = function(src, top) {
434
434
: 'html' ,
435
435
pre : ! this . options . sanitizer
436
436
&& ( cap [ 1 ] === 'pre' || cap [ 1 ] === 'script' || cap [ 1 ] === 'style' ) ,
437
- text : cap [ 0 ]
437
+ text : this . options . sanitize ? ( this . options . sanitizer ? this . options . sanitizer ( cap [ 0 ] ) : escape ( cap [ 0 ] ) ) : cap [ 0 ]
438
438
} ) ;
439
439
continue ;
440
440
}
@@ -847,7 +847,7 @@ InlineLexer.prototype.output = function(src) {
847
847
if ( cap = this . rules . text . exec ( src ) ) {
848
848
src = src . substring ( cap [ 0 ] . length ) ;
849
849
if ( this . inRawBlock ) {
850
- out += this . renderer . text ( cap [ 0 ] ) ;
850
+ out += this . renderer . text ( this . options . sanitize ? ( this . options . sanitizer ? this . options . sanitizer ( cap [ 0 ] ) : escape ( cap [ 0 ] ) ) : cap [ 0 ] ) ;
851
851
} else {
852
852
out += this . renderer . text ( escape ( this . smartypants ( cap [ 0 ] ) ) ) ;
853
853
}
You can’t perform that action at this time.
0 commit comments