flavorjones/loofah — pull request #62 by batter (2014-02-05 15:52:18+00:00)
Title: Add an encoding option to DocumentFragment#parse to mimic Nokogiri's behavior

According to [the comments on `Loofah.fragment`](https://github.com/flavorjones/loofah/blob/v1.2.1/lib/loofah.rb#L42), 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`](https://github.com/sparklemotion/nokogiri/blob/v1.5.5/lib/nokogiri/html/document_fragment.rb#L8).