mirror of
https://github.com/immich-app/immich.git
synced 2026-04-04 16:22:02 -04:00
fix: escape html (#27469)
This commit is contained in:
parent
37823bcd51
commit
c8ae99e7d7
@ -19,6 +19,7 @@
|
||||
import { ResolutionPlugin } from '@photo-sphere-viewer/resolution-plugin';
|
||||
import { SettingsPlugin } from '@photo-sphere-viewer/settings-plugin';
|
||||
import '@photo-sphere-viewer/settings-plugin/index.css';
|
||||
import { escape } from 'lodash-es';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
// Adapted as well as possible from classlist 'border-solid border-white border-3 rounded-lg'
|
||||
@ -138,7 +139,7 @@
|
||||
|
||||
const fontSize = (1.4 * width) / box.text.length; // fits almost all strings within the box, depends on font family
|
||||
const transform = `matrix3d(${matrix.join(',')})`;
|
||||
const content = `<div class="${OCR_TOOLTIP_HTML_CLASS}" style="font-size: ${fontSize}px; width: ${width}px; height: ${height}px; transform: ${transform}; transform-origin: 0 0;">${box.text}</div>`;
|
||||
const content = `<div class="${OCR_TOOLTIP_HTML_CLASS}" style="font-size: ${fontSize}px; width: ${width}px; height: ${height}px; transform: ${transform}; transform-origin: 0 0;">${escape(box.text)}</div>`;
|
||||
|
||||
if (updateOnly) {
|
||||
markersPlugin.updateMarker({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user