0
@@ -252,7 +252,7 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
-# %meta{'http-e
quiv' => 'Content-Type', :content => 'text/html'}/
0
+# %meta{'http-e
uiv' => 'Content-Type', :content => 'text/html'}/
0
@@ -633,6 +633,15 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
+# If the <tt>:escape_html</tt> option is set,
0
+# = will sanitize any HTML-sensitive characters generated by the script.
0
+# = '<script>alert("I\'m evil!");</script>'
0
+# <script>alert("I'm evil!");</script>
0
@@ -685,6 +694,40 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# \\ Look at \yon lack of backslash: #{foo}
0
+# An ampersand followed by an equals character
0
+# evaluates Ruby code just like the single equals,
0
+# but sanitizes any HTML-sensitive characters in the result of the code.
0
+# &= "I like cheese & crackers"
0
+# I like cheese & crackers
0
+# If the <tt>:escape_html</tt> option is set,
0
+# &= behaves identically to =.
0
+# An exclamation mark followed by an equals character
0
+# evaluates Ruby code just like the single equals,
0
+# but never sanitizes the HTML.
0
+# By default, the single equals doesn't sanitize HTML either.
0
+# However, if the <tt>:escape_html</tt> option is set, = will sanitize the HTML, but != still won't.
0
+# For example, if <tt>:escape_html</tt> is set:
0
+# != "I feel <strong>!"
0
+# I feel <strong>!
0
# Ruby blocks, like XHTML tags, don't need to be explicitly closed in Haml.
0
@@ -789,6 +832,12 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
# identical to :xhtml except there are no self-closing tags,
0
# XML prolog is ignored and correct DOCTYPEs are generated.
0
+# [<tt>:escape_html</tt>] Sets whether or not to escape HTML-sensitive characters in script.
0
+# If this is true, = behaves like &=;
0
+# otherwise, it behaves like !=.
0
+# <b>Note that this doesn't affect attributes or == interpolation.</b>
0
# [<tt>:suppress_eval</tt>] Whether or not attribute hashes and Ruby scripts
0
# designated by <tt>=</tt> or <tt>~</tt> should be
0
# evaluated. If this is true, said scripts are
Comments
No one has commented yet.