mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Fix implementation of escape and money filters
This commit is contained in:
@@ -202,10 +202,10 @@ module Liquid
|
||||
RUBY
|
||||
},
|
||||
"escape" => ->(compiler, expr, args, kwargs) {
|
||||
"(_t = #{expr}; CGI.escape(_t) unless _t)"
|
||||
"(_t = #{expr}; CGI.escape(_t) if _t)"
|
||||
},
|
||||
"money" => ->(compiler, expr, args, kwargs) {
|
||||
"(_m = #{expr}; _m.nil? ? '' : \"\#{(_m / 100.0).round(2)}\")"
|
||||
"(_m = #{expr}; _m.nil? ? '' : \"$ \#{(_m / 100.0).round(2)}\")"
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user