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 21262126 // If "filter" option is provided, then filter content
21272127 if ( slide . opts . filter ) {
21282128 content = $ ( "<div>" )
2129- . html ( content )
2129+ . html ( DOMPurify . sanitize ( content ) )
21302130 . find ( slide . opts . filter ) ;
21312131 }
21322132 }
23202320 . children ( )
23212321 . eq ( 0 )
23222322 . empty ( )
2323- . html ( caption ) ;
2323+ . html ( DOMPurify . sanitize ( caption ) ) ;
23242324
23252325 captionH = $clone . outerHeight ( true ) ;
23262326
29682968 $caption
29692969 . children ( )
29702970 . eq ( 0 )
2971- . html ( caption ) ;
2971+ . html ( DOMPurify . sanitize ( caption ) ) ;
29722972 } else {
29732973 self . $caption = null ;
29742974 }
29782978 }
29792979
29802980 // 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 ) ) ;
29832983
29842984 $container . find ( "[data-fancybox-prev]" ) . prop ( "disabled" , ! current . opts . loop && index <= 0 ) ;
29852985 $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