docs: add XSS safety comment for VM display name annotation (#1019)

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2026-07-17 17:30:59 +08:00 committed by GitHub
parent 7c3b2730ab
commit b813bc578e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,6 +93,9 @@ export default {
const hostname = this.value.spec.template.spec.hostname || '';
// Display name can contain arbitrary strings. There is no XSS risk because the value is
// rendered via Vue's {{ }} interpolation which auto-escapes HTML; v-html is never used for
// this field. See harvester/harvester#10423 for details.
const customizeDisplayName = !!(this.value.metadata?.annotations?.[HCI_ANNOTATIONS.VM_DISPLAY_NAME]);
return {