mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Don't destructively modify SafeBuffers.
Closes gh-399 Closes gh-400
This commit is contained in:
parent
fb5ab2675f
commit
fc5a5cb21d
3 changed files with 5 additions and 3 deletions
|
@ -12,6 +12,8 @@
|
|||
|
||||
* Fix html2haml.
|
||||
|
||||
* Fix an issue where destructive modification was sometimes performed on Rails SafeBuffers.
|
||||
|
||||
## 3.1.1
|
||||
|
||||
* Update the vendored Sass to version 3.1.0.
|
||||
|
|
|
@ -379,7 +379,7 @@ END
|
|||
value = Haml::Helpers.preserve(escaped)
|
||||
if escape_attrs
|
||||
# We want to decide whether or not to escape quotes
|
||||
value.gsub!('"', '"')
|
||||
value = value.gsub('"', '"')
|
||||
this_attr_wrapper = attr_wrapper
|
||||
if value.include? attr_wrapper
|
||||
if value.include? other_quote_char
|
||||
|
|
|
@ -170,10 +170,10 @@ MESSAGE
|
|||
result = capture_haml(i, &block)
|
||||
|
||||
if result.count("\n") > 1
|
||||
result.gsub!("\n", "\n ")
|
||||
result = result.gsub("\n", "\n ")
|
||||
result = "\n #{result.strip}\n"
|
||||
else
|
||||
result.strip!
|
||||
result = result.strip
|
||||
end
|
||||
|
||||
"<li>#{result}</li>"
|
||||
|
|
Loading…
Reference in a new issue