mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
catch utf-8 encoding errors
This commit is contained in:
parent
3e39b6f5c7
commit
6662774be1
1 changed files with 1 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -98,7 +98,7 @@ before do
|
|||
if params[:tag]
|
||||
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
|
||||
rescue Encoding::CompatibilityError, ArgumentError
|
||||
params.delete 'tag'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue