lib/awestruct/context_helper.rb in awestruct-0.4.4 vs lib/awestruct/context_helper.rb in awestruct-0.4.5
- old
+ new
@@ -39,10 +39,10 @@
def fully_qualify_urls(base_url, text)
doc = Hpricot( text )
doc.search( "//a" ).each do |a|
- a['href'] = fix_url( base_url, a['href'] )
+ a['href'] = fix_url( base_url, a['href'] ) if a['href']
end
doc.search( "//link" ).each do |link|
link['href'] = fix_url( base_url, link['href'] )
end
doc.search( "//img" ).each do |img|