Created
May 12, 2009 17:02
-
-
Save stringbot/110599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warszawa:Desktop josh$ irb | |
>> require 'hpricot' | |
=> true | |
>> html = "<html> | |
<textarea><iframe></iframe></textarea> | |
</html>" | |
=> "<html>\n<textarea><iframe></iframe></textarea>\n</html>" | |
>> Hpricot(html)/'textarea' | |
=> #<Hpricot::Elements[{emptyelem <textarea>}]> | |
>> Hpricot(html) | |
=> #<Hpricot::Doc {elem <html> "\n" {emptyelem <textarea>} {emptyelem <iframe>} {bogusetag </textarea>} "\n" </html>}> | |
In 0.6.x you would get: | |
>> Hpricot(html)/"textarea" | |
=> #<Hpricot::Elements[{elem <textarea> {emptyelem <iframe>} </textarea>}]> | |
>> Hpricot(html) | |
=> #<Hpricot::Doc {elem <html> "\n" {elem <textarea> {emptyelem <iframe>} </textarea>} "\n" </html>}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment