auto_strip_attributes icon indicating copy to clipboard operation
auto_strip_attributes copied to clipboard

\u2002 character is not stripped

Open pasl opened this issue 1 month ago • 0 comments

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"

pasl avatar May 15 '24 17:05 pasl