auto_strip_attributes
auto_strip_attributes copied to clipboard
\u2002 character is not stripped
Hi
\u2002 utf8 character doesn't seems to be stripped out.
The [[:space:]] special regex expression does detect it, but the gem doesn't remove it.
To reproduce:
class Person < ApplicationRecord
auto_strip_attributes :name
end
person.name = "John\u2002"
person.save
=> true
person.name
=> "John "
# Tested with GSUB and [[:space:]]
person.name.gsub(/[[:space:]]/, '')
=> "John"