fix: better sanitization of form fields

This commit is contained in:
Jannat Patel
2026-03-27 11:26:04 +05:30
parent 6e852cb86f
commit 5efcaab95a
10 changed files with 23 additions and 51 deletions
@@ -112,7 +112,7 @@
</template>
<script setup lang="ts">
import { computed, ref, watch } from 'vue'
import { escapeHTML } from '@/utils'
import { sanitizeHTML } from '@/utils'
import {
Badge,
Button,
@@ -213,7 +213,7 @@ const fetchTestCases = () => {
}
const validateTitle = () => {
exercise.value.title = escapeHTML(exercise.value.title.trim())
exercise.value.title = sanitizeHTML(exercise.value.title.trim())
}
watch(