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

"ArgumentError: NULL pointer given" on calling doc.meta_encoding #115

Closed
arndtjenssen opened this issue Aug 4, 2009 · 1 comment
Closed

Comments

@arndtjenssen
Copy link

Is thrown on (malformed) documents with missing encoding info on v1.3.2
Steps to reproduce:

require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.europapress.es/valencia/noticia-moby-dick-john-huston-obrira-cap-setmana-filmoteca-destiu-valencia-20090731183544.html'))
doc.meta_encoding

results in:
ArgumentError: NULL pointer given
from (irb):55:in `meta_encoding'
from (irb):55
from :0

@tenderlove
Copy link
Member

returns nil when an HTML document does not declare a meta encoding tag. closed by d0e9312

This issue was closed.
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

No branches or pull requests

2 participants