summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-05-24 16:06:05 +0200
committermguetlein <martin.guetlein@gmail.com>2011-05-24 16:06:05 +0200
commit0d87789eec37f7ae09d01937dbfc72af1ef17252 (patch)
treed5c206425a9b06e9a32c8e55fc5cd3a20747d95b
parent8a20cf940c346fd04649d3c3c8f7ad4c1fcb20cb (diff)
fix small errors in to-html method
-rw-r--r--lib/to-html.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/to-html.rb b/lib/to-html.rb
index 66a3e74..51602d7 100644
--- a/lib/to-html.rb
+++ b/lib/to-html.rb
@@ -6,7 +6,7 @@ class String
# encloses URI in text with with link tag
# @return [String] new text with marked links
def link_urls
- self.gsub(/(?i)http(s?):\/\/[^\r\n\s']*/, '<a href=\0>\0</a>')
+ self.gsub(/(?i)http(s?):\/\/[^\r\n\s']*/, '<a href="\0">\0</a>')
end
end
@@ -30,7 +30,7 @@ module OpenTox
title = nil #$sinatra.url_for($sinatra.request.env['PATH_INFO'], :full) if $sinatra
html = "<html>"
html += "<title>"+title+"</title>" if title
- html += "<img src="+OT_LOGO+"><body>"
+ html += "<img src=\""+OT_LOGO+"\"><\/img><body>"
if AA_SERVER
user = OpenTox::Authorization.get_user(subjectid) if subjectid
@@ -63,7 +63,7 @@ module OpenTox
html += "<h3>Content</h3>" if description || related_links
html += "<pre><p style=\"padding:15px; border:10px solid \#5D308A\">"
html += text.link_urls
- html += "</p></pre></body><html>"
+ html += "</p></pre></body></html>"
html
end
@@ -78,7 +78,7 @@ module OpenTox
"<tr><td>password:</td><td><input type='password' name='password' size='15' /></td></tr>"+
#"<input type=hidden name=back_to value="+back_to.to_s+">"+
"<tr><td><input type='submit' value='Login' /></td></tr>"
- html += "</table></p></pre></form></body><html>"
+ html += "</table></p></pre></form></body></html>"
html
end
end