File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 131131 object-fit : cover;
132132}
133133
134+ /* Inline SVG in thumbnail should scale to fit */
135+ .qn-live-search-thumb svg {
136+ width : 100% ;
137+ height : 100% ;
138+ display : block;
139+ }
140+
134141.qn-live-search-thumb i {
135142 font-size : 16px ;
136143 color : # 6c757d ;
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ function initQuickNavigationMediaLiveSearch() {
137137
138138 if ( item . thumbnail . type === 'image' ) {
139139 thumbnail = '<img src="' + item . thumbnail . src + '" alt="' + item . thumbnail . alt + '" loading="lazy">' ;
140+ } else if ( item . thumbnail . type === 'svg' ) {
141+ // inline SVG markup - already sanitized server-side
142+ thumbnail = item . thumbnail . svg ;
140143 } else if ( item . thumbnail . type === 'icon' ) {
141144 thumbnail = '<i class="' + item . thumbnail . icon + '" title="' + item . thumbnail . title + '"></i>' ;
142145 } else if ( item . thumbnail . type === 'error' ) {
You can’t perform that action at this time.
0 commit comments