aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--config/initializers/single_quote_escape_workaround.rb31
-rw-r--r--doc/INSTALL.md9
3 files changed, 38 insertions, 5 deletions
diff --git a/README.md b/README.md
index 76fcdaf17..4bba49af7 100644
--- a/README.md
+++ b/README.md
@@ -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