fix: escape HTML tags in lesson validation messages

Prevent HTML elements like <details>, <option>, <form> from being
rendered as actual elements in hint messages by properly escaping
them with &lt; &gt; and wrapping in <kbd> tags.
This commit is contained in:
2025-12-30 12:25:22 +01:00
parent 2b131d0865
commit 95fdc15342
6 changed files with 15 additions and 15 deletions

View File

@@ -36,7 +36,7 @@
{
"type": "element_exists",
"value": "form[method='dialog']",
"message": "Add a <form method=\"dialog\"> for closing"
"message": "Add a <kbd>&lt;form method=\"dialog\"&gt;</kbd> for closing"
},
{
"type": "element_exists",
@@ -70,7 +70,7 @@
{
"type": "element_exists",
"value": "form[method='dialog']",
"message": "Add a <form method=\"dialog\"> for the buttons"
"message": "Add a <kbd>&lt;form method=\"dialog\"&gt;</kbd> for the buttons"
},
{
"type": "element_count",