Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/childsj/ruby-openid
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Chen committed Mar 23, 2012
2 parents bf5c85a + 973eb80 commit 7aca01d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ Or, if you installed via rubygems:
$> irb
irb$> require "rubygems"
=> true
irb$> require_gem "ruby-openid"
irb$> require_gem "ruby-openid"
=> true

== Run the test suite

Go into the test directory and execute the *runtests.rb* script.
Go into the admin directory and execute the *runtests.rb* script.

== Next steps

* Run consumer.rb in the examples directory.
* Run consumer.rb in the examples directory.
* Get started writing your own consumer using OpenID::Consumer
* Write your own server with OpenID::Server
* Use the OpenIDLoginGenerator! Read example/README for more info.
33 changes: 17 additions & 16 deletions lib/openid/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,23 @@ def Util.log(message)
end

def Util.auto_submit_html(form, title='OpenID transaction in progress')
return "
<html>
<head>
<title>#{title}</title>
</head>
<body onload='document.forms[0].submit();'>
#{form}
<script>
var elements = document.forms[0].elements;
for (var i = 0; i < elements.length; i++) {
elements[i].style.display = \"none\";
}
</script>
</body>
</html>
"
return "<html>
<head>
<title>#{title}</title>
<style>form { visibility: hidden }</style>
<script>
var server_proceed = setTimeout(function() {
if (typeof document.forms[0] == 'object') {
clearTimeout(server_proceed);
document.forms[0].submit();
}
}, 100);
</script>
</head>
<body>
#{form}
</body>
</html>"
end

ESCAPE_TABLE = { '&' => '&amp;', '<' => '&lt;', '>' => '&gt;', '"' => '&quot;', "'" => '&#039;' }
Expand Down

0 comments on commit 7aca01d

Please sign in to comment.