check tag input

This commit is contained in:
Kyle Drake 2024-02-17 10:55:51 -06:00
parent 6444fe7e94
commit 9800a4ad4b
3 changed files with 3 additions and 2 deletions

View file

@ -4,7 +4,7 @@ get '/browse/?' do
@page = params[:page]
@page = 1 if @page.not_an_integer?
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
params.delete 'tag' if params[:tag].nil? || !params[:tag].is_a?(String) || params[:tag].strip.empty? || params[:tag].match?(Tag::INVALID_TAG_REGEX)
if is_education?
ds = education_sites_dataset