mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-28 12:11:47 +00:00
Properly HTML escape fields for label template placeholders
Fixes issue #1446
This commit is contained in:
parent
5054642d41
commit
dcc431d28c
10 changed files with 43 additions and 42 deletions
|
|
@ -67,8 +67,8 @@ class BarcodeHelper
|
|||
{
|
||||
$svg = $this->barcodeAsSVG($content, $type);
|
||||
$base64 = $this->dataUri($svg, 'image/svg+xml');
|
||||
$alt_text ??= $content;
|
||||
|
||||
$alt_text ??= htmlspecialchars($content);
|
||||
|
||||
return '<img src="'.$base64.'" width="'.$width.'" style="min-height: 25px;" alt="'.$alt_text.'"/>';
|
||||
}
|
||||
|
||||
|
|
@ -94,4 +94,4 @@ class BarcodeHelper
|
|||
|
||||
return $repr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue