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

Add encoding arg to DocumentFragment#parse to mimic Nokogiri #62

Merged

Conversation

batter
Copy link
Contributor

@batter batter commented Feb 5, 2014

According to the comments on Loofah.fragment, it accepts the same parameters as Nokogiri::HTML::DocumentFragment.parse. I'm sure this was probably true at original time of writing but it is no longer true, due to the fact that Nokogiri::HTML::DocumentFragment.parse now accepts an encoding argument, which is used to set the encoding of the parent Document for the DocumentFragment (or defaults to 'UTF-8' if nothing is fed in). This pull adds that encoding argument to Loofah::HTML::DocumentFragment, and makes it mimic the functionality of the parse method for Loofah::HTML::DocumentFragment.parse.

flavorjones added a commit that referenced this pull request Apr 23, 2014
Add encoding arg to DocumentFragment#parse to mimic Nokogiri
@flavorjones flavorjones merged commit a263b6f into flavorjones:master Apr 23, 2014
@flavorjones
Copy link
Owner

Merged, thank you so much!

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

Successfully merging this pull request may close these issues.

2 participants