File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 2126
2126
// If "filter" option is provided, then filter content
2127
2127
if ( slide . opts . filter ) {
2128
2128
content = $ ( "<div>" )
2129
- . html ( content )
2129
+ . html ( DOMPurify . sanitize ( content ) )
2130
2130
. find ( slide . opts . filter ) ;
2131
2131
}
2132
2132
}
2320
2320
. children ( )
2321
2321
. eq ( 0 )
2322
2322
. empty ( )
2323
- . html ( caption ) ;
2323
+ . html ( DOMPurify . sanitize ( caption ) ) ;
2324
2324
2325
2325
captionH = $clone . outerHeight ( true ) ;
2326
2326
2968
2968
$caption
2969
2969
. children ( )
2970
2970
. eq ( 0 )
2971
- . html ( caption ) ;
2971
+ . html ( DOMPurify . sanitize ( caption ) ) ;
2972
2972
} else {
2973
2973
self . $caption = null ;
2974
2974
}
2978
2978
}
2979
2979
2980
2980
// Update info and navigation elements
2981
- $container . find ( "[data-fancybox-count]" ) . html ( self . group . length ) ;
2982
- $container . find ( "[data-fancybox-index]" ) . html ( index + 1 ) ;
2981
+ $container . find ( "[data-fancybox-count]" ) . html ( DOMPurify . sanitize ( self . group . length ) ) ;
2982
+ $container . find ( "[data-fancybox-index]" ) . html ( DOMPurify . sanitize ( index + 1 ) ) ;
2983
2983
2984
2984
$container . find ( "[data-fancybox-prev]" ) . prop ( "disabled" , ! current . opts . loop && index <= 0 ) ;
2985
2985
$container . find ( "[data-fancybox-next]" ) . prop ( "disabled" , ! current . opts . loop && index >= self . group . length - 1 ) ;
You can’t perform that action at this time.
0 commit comments