diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | config/initializers/single_quote_escape_workaround.rb | 31 | ||||
-rw-r--r-- | doc/INSTALL.md | 9 |
3 files changed, 38 insertions, 5 deletions
@@ -22,3 +22,6 @@ There's background information and a more documentation on [our wiki](https://github.com/sebbacon/alaveteli/wiki/Home/), and lots of useful information (including a blog) on [the project website](http://alaveteli.org) + +Looking for the latest stable release? It's on the +[master branch](https://github.com/sebbacon/alaveteli/tree/master). diff --git a/config/initializers/single_quote_escape_workaround.rb b/config/initializers/single_quote_escape_workaround.rb new file mode 100644 index 000000000..2e713b982 --- /dev/null +++ b/config/initializers/single_quote_escape_workaround.rb @@ -0,0 +1,31 @@ +class ERB
+ module Util
+
+ if "html_safe exists".respond_to?(:html_safe)
+ def html_escape(s)
+ s = s.to_s
+ if s.html_safe?
+ s
+ else
+ Rack::Utils.escape_html(s).html_safe
+ end
+ end
+ else
+ def html_escape(s)
+ s = s.to_s
+ Rack::Utils.escape_html(s).html_safe
+ end
+ end
+
+ remove_method :h
+ alias h html_escape
+
+ class << self
+ remove_method :html_escape
+ remove_method :h
+ end
+
+ module_function :html_escape
+ module_function :h
+ end
+end
diff --git a/doc/INSTALL.md b/doc/INSTALL.md index b71b89676..588f8e4fe 100644 --- a/doc/INSTALL.md +++ b/doc/INSTALL.md @@ -19,12 +19,11 @@ Next, get hold of the Alaveteli source code from github: git clone https://github.com/sebbacon/alaveteli.git cd alaveteli -This will get the current stable release from the master branch (which -always contains the latest release). If you are a developer and want -to add or try new features, you might want to swap to the development -branch: +This will get the development branch, which has the latest (possibly +buggy) code. If you don't want to add or try new features, swap to the +master branch (which always contains the latest stable release): - git checkout develop + git checkout master # Install system dependencies |