8000 \u2002 character is not stripped · Issue #38 · holli/auto_strip_attributes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
\u2002 character is not stripped #38
Open
@pasl

Description

@pasl

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0