fix: sanitized inputs for people and course creation page

This commit is contained in:
Jannat Patel
2023-09-25 22:08:37 +05:30
parent 1c0644aa7a
commit 5727b7cd73
2 changed files with 12 additions and 2 deletions

View File

@@ -51,8 +51,13 @@ const create_tag = (e) => {
if ($(e.target).val() == "") {
return;
}
let tag_value = $(e.target)
.val()
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
let tag = `<button class="btn btn-secondary btn-sm mr-2 text-uppercase">
${$(e.target).val()}
${tag_value}
<span class="btn-remove">
<svg class="icon icon-sm">
<use class="" href="#icon-close"></use>