Skip to content

Commit

Permalink
Fix: Annotator fast context special chars issues & statistics page sy…
Browse files Browse the repository at this point in the history
…ntax error (#561)

* fix statistics page syntax error

* update ontoportal instances home section title

* fix fast context option in annotator page

* remove special chars from annotator's input on submit to avoid errors
  • Loading branch information
Bilelkihal committed Jun 12, 2024
1 parent 88c6855 commit 6750e75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/controllers/annotator_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,13 @@ def remove_special_chars(input)
input
end

def remove_special_chars(input)
regex = /^[a-zA-Z0-9\s]*$/
unless input.match?(regex)
input.gsub!(/[^\w\s]/, '')
end
input
end

end

0 comments on commit 6750e75

Please sign in to comment.