lib/link_thumbnailer/scrapers/base.rb in link_thumbnailer-3.2.0 vs lib/link_thumbnailer/scrapers/base.rb in link_thumbnailer-3.2.1
- old
+ new
@@ -45,10 +45,10 @@
def meta_xpaths(options = {})
key = options.fetch(:key, :property)
value = options.fetch(:value, :content)
attribute = options.fetch(:attribute, attribute_name)
- document.xpath("//meta[translate(@#{key},'#{abc.upcase}','#{abc}') = '#{attribute}' and @#{value}]")
+ document.xpath("//meta[translate(@#{key},'#{abc.upcase}','#{abc}') = '#{attribute}' and string-length(@#{value}) > 0]")
end
def abc
'abcdefghijklmnopqrstuvwxyz'
end