Skip to content

Commit

Permalink
Possible searchbar XSS attack #167
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Dec 17, 2021
1 parent 640a230 commit 546dfaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,15 @@ const search = () => {
<div class="flex justify-center">
<div class="mx-auto rounded-2xl bg-gray-800 mb-8 w-2/3">
<h3 class="pt-3">No results found!</h3>
<h4>Not found search results for "${document.querySelector("#search").value}".</h4>
<h4 id="searchResult">Not found search results.</h4>
</div>
</div>
`

element.setAttribute("id", "noResult")
document.querySelector(".content").appendChild(element)

document.querySelector("#searchResult").textContent = `Not found search results for "${document.querySelector("#search").value}".`
}

// if search empty
Expand Down

0 comments on commit 546dfaf

Please sign in to comment.