Skip to content

Commit

Permalink
javascript before is odd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobmaker55 committed Sep 15, 2024
1 parent f2825ee commit 60074cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/javascript/modules/majorProjectForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default class MajorProjectForm {
this.tags_written = true
document.getElementsByClassName("placeholder").item(0).remove()
}
let txt = input.value.replace(/[^a-zA-Z0-9\+\-\.\#]/g, ''); // allowed characters list
if (txt) input.before('<span class="skill-tag">' + txt + '</span>');
let txt = input.value.replace(/[^a-zA-Z0-9\+\-\.\# ]/g, ''); // allowed characters list
if (txt) input.insertAdjacentHTML("beforebegin", '<span class="skill-tag">' + txt + '</span>');
input.value = "";
input.focus();

Expand Down

0 comments on commit 60074cf

Please sign in to comment.