Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\u2002 character is not stripped #38

Open
pasl opened this issue May 15, 2024 · 0 comments
Open

\u2002 character is not stripped #38

pasl opened this issue May 15, 2024 · 0 comments

Comments

@pasl
Copy link

pasl commented May 15, 2024

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant