summaryrefslogtreecommitdiff
path: root/lib/to-html.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-05-25 13:37:06 +0200
committermr <mr@mrautenberg.de>2011-05-25 13:37:06 +0200
commitd5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (patch)
treedb88d9b1a7f01f7a24a597a05b293d9307dc1d3f /lib/to-html.rb
parent796ef9b86fcdcf5f9520b958c09cb37ae1374bf4 (diff)
parent52e73a3da8e99da9a0a973b6ef9934297bc6511e (diff)
Merge branch 'development' of github.com:opentox/opentox-ruby into development
Diffstat (limited to 'lib/to-html.rb')
-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