diff --git a/lib/html2markdown/converter.rb b/lib/html2markdown/converter.rb
index 2bb23c9..90c6fd7 100644
--- a/lib/html2markdown/converter.rb
+++ b/lib/html2markdown/converter.rb
@@ -27,7 +27,7 @@ def parse_element(ele)
# wrap node with markdown
def wrap_node(node,contents=nil)
- result = ''
+ result = ''.dup
contents.strip! unless contents==nil
# check if there is a custom parse exist
if respond_to? "parse_#{node.name}"
diff --git a/lib/html2markdown/html_page.rb b/lib/html2markdown/html_page.rb
index afb2062..ad9977e 100644
--- a/lib/html2markdown/html_page.rb
+++ b/lib/html2markdown/html_page.rb
@@ -9,7 +9,7 @@ def initialize(options,&content_extrator)
@host = options[:host]
@url = options[:url]
if (@contents = options[:contents]) == nil
- doc = Nokogiri::HTML(open(@url))
+ doc = Nokogiri::HTML(URI.open(@url))
@contents = doc.at_css('body').send(:inner_html) || doc.inner_html
end
@content_extrator = content_extrator