mirror of
https://github.com/neocities/neocities.git
synced 2025-06-15 17:04:34 +02:00
check for bad characters
This commit is contained in:
parent
0c1812e457
commit
7576b52ab6
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,11 @@ get '/browse/?' do
|
|||
@page = params[:page]
|
||||
@page = 1 if @page.not_an_integer?
|
||||
|
||||
params.delete 'tag' if params[:tag].nil? || !params[:tag].is_a?(String) || params[:tag].strip.empty? || params[:tag].match?(Tag::INVALID_TAG_REGEX)
|
||||
begin
|
||||
params.delete 'tag' if params[:tag].nil? || !params[:tag].is_a?(String) || params[:tag].strip.empty? || params[:tag].match?(Tag::INVALID_TAG_REGEX)
|
||||
rescue Encoding::CompatibilityError
|
||||
params.delete 'tag'
|
||||
end
|
||||
|
||||
if is_education?
|
||||
ds = education_sites_dataset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue