diff --git a/lib/html_sanitizer.rb b/lib/html_sanitizer.rb
index ae37b9a2b..65bcccff4 100644
--- a/lib/html_sanitizer.rb
+++ b/lib/html_sanitizer.rb
@@ -132,6 +132,10 @@ satinize html string based on whiltelist
# prepare links
if node['href']
href = cleanup_target(node['href'])
+ if external && !href.downcase.start_with?('//') && href.downcase !~ %r{^.{1,6}://.+?}
+ node['href'] = "http://#{node['href']}"
+ href = node['href']
+ end
next if !href.downcase.start_with?('http', 'ftp', '//')
node.set_attribute('href', href)
node.set_attribute('rel', 'nofollow')
diff --git a/test/unit/aaa_string_test.rb b/test/unit/aaa_string_test.rb
index 8641ffd59..eb34a3dcd 100644
--- a/test/unit/aaa_string_test.rb
+++ b/test/unit/aaa_string_test.rb
@@ -663,6 +663,15 @@ Men-----------------------'
result = "http://facebook.de/examplesrbog"
assert_equal(result, html.html2html_strict)
+ html = "web
+www.example.de
Ihrer Lesezeichen-Symbolleiste zu ergänzen.