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

Refactor CustomScrubber to fix support of data-attr #3217

Merged
merged 1 commit into from
Jul 14, 2016

Conversation

bricesanchez
Copy link
Member

No description provided.

end

def scrub_attribute?(name)
!attributes.include?(name) && !(name =~ /\Adata-[\w-]+\z/).present?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use exclude? here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use
&& name !~ /\Adata-[\w-]+\z/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

@parndt parndt merged commit 2fc691d into master Jul 14, 2016
@parndt parndt deleted the bugfix/allow-data-attr branch July 14, 2016 09:29
@kreker92
Copy link

It has success. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants