Florian Weingarten
eb409ff237
Cherry pick security fix ( #274 ) to 2-6-stable
2014-01-10 11:22:28 -05:00
Florian Weingarten
6cb5a9b7cc
Merge pull request #234 from Shopify/fix_mapping_procs
...
Fix mapping over procs
2013-10-09 16:32:53 -04:00
Florian Weingarten
4207d1f086
Merge pull request #232 from Shopify/to_liquid_stuff
...
Always call 'to_liquid' on stuff in map filter and allow to_liquid to be...
2013-10-09 16:32:45 -04:00
Florian Weingarten
988a1694fd
Use invoke_drop in map filter
2013-10-09 16:32:38 -04:00
Florian Weingarten
0f5441b09e
Convert legacy tab indentation to spaces and remove trailing whitespace from all lines
2013-06-26 19:53:09 -04:00
Florian Weingarten
8ca4868bff
Merge branch 'master' of https://github.com/ndwebgroup/liquid into ndwebgroup-master
2013-06-18 04:13:49 +02:00
Florian Weingarten
f92da6948d
Merge branch 'strip-html-fix' of https://github.com/jamesallardice/liquid into jamesallardice-strip-html-fix
...
Conflicts:
lib/liquid/standardfilters.rb
2013-06-18 04:11:11 +02:00
Florian Weingarten
a1b156f0d4
strip_html multi-line comment test
2013-06-18 04:06:35 +02:00
Florian Weingarten
eca520025c
Merge branch 'strip-html' of https://github.com/joliss/liquid into joliss-strip-html
...
Conflicts:
lib/liquid/standardfilters.rb
2013-06-18 04:04:49 +02:00
Florian Weingarten
f488058789
UTF8 truncate test
2013-06-17 11:48:03 -04:00
Florian Weingarten
e47d1af03a
Fix broken 'raw' tag parsing (issue #204 )
2013-06-14 12:47:27 -04:00
Florian Weingarten
5cfa13d7a4
Merge pull request #205 from phoet/stricter_handling_of_variables_in_for
...
rejects variables like a/b in for loops, closes #150
2013-06-13 15:26:00 -07:00
Peter Schröder
cb12497859
add test for allowing whitespace between tokens
2013-06-13 18:21:49 -04:00
Florian Weingarten
4c2e2f8a24
Merge pull request #203 from phoet/strip_carriage_return
...
handle carriage return in strip_newline, closes #126
2013-06-13 12:54:17 -07:00
Peter Schröder
a2df5a421d
rejects variables like a/b in for loops, closes #150
2013-06-11 17:22:33 -04:00
Peter Schröder
fd263bba0f
handle carriage return in strip_newline, closes #126
2013-06-09 10:24:35 -04:00
Daniel Huckstep
076ae903c0
Make sure the context gets set
2013-06-06 10:19:20 -06:00
Daniel Huckstep
ba5e65f685
Better test, resuse Hash block
2013-06-06 10:18:47 -06:00
Daniel Huckstep
b699c93bae
Allow a Liquid::Drop to be passed into Template#render
2013-06-06 10:17:01 -06:00
Arthur Neves
ab760649ee
use BigDecimal on filters to have better precision
2013-06-05 16:09:05 -04:00
Florian Weingarten
a5cd494717
Merge pull request #176 from unreal/master
...
Add reverse filter
2013-06-05 09:04:53 -07:00
Dylan Thacker-Smith
482115d784
Merge pull request #173 from jsw0528/master
...
fix `can't convert Fixnum into String` for `replace`
2013-06-04 13:09:42 -07:00
Florian Weingarten
1e8c081b42
Create new resource_limits hash on Template initialization
2013-05-31 09:41:59 -04:00
Florian Weingarten
2b17e24b16
Mutate resource_limits hash to flag that the limit was reached (for outside observation)
2013-05-31 09:34:23 -04:00
Florian Weingarten
9075b428b1
Resource limits: Don't raise Error but render error message (but abort after first error)
2013-05-31 09:25:25 -04:00
Florian Weingarten
8760b5e8c4
Add optional resource usage limitations to number of rendering calls, length of rendering output and/or number of variable/capture assignments
2013-05-30 17:04:26 -04:00
Tom Burns
50b2ebee56
Merge pull request #189 from Shopify/cache_partials
...
Cache tokenized partial templates
2013-05-29 07:51:12 -07:00
Dylan Thacker-Smith
23203c0122
Fix some old templates that abused colon as an argument separator.
...
This is a fallback for keyword argument parsing since this feature broke
old templates that accidentally used a colon as a filter argument
separator.
2013-05-21 17:47:46 -04:00
Tom Burns
8913a5615a
Revert "Merge pull request #185 from ISSIntel/liquid-utf8"
...
This reverts commit c5dfcd29b0 , reversing
changes made to f7d1e1d0c1 .
2013-05-20 19:53:13 -04:00
Tasos Stathopoulos
8c1bbfec57
Use array instead of Hash to keep the registered filters
...
1.8.7 compatibility fix
In Ruby 1.8.7, Hash does not preserve insertion ordering as Array does.
This could cause a problem when registering filters which depend on others and
the registration order is important.
So, the @@filters variable was changed to array where the order of the filters is
the same as the insertion order.
2013-05-17 14:12:57 +03:00
Tom Burns
485340713a
Add tests for caching partial includes
2013-05-13 02:34:19 -04:00
Ozéias Sant'ana
f9c289372d
Merge branch 'master' into liquid-utf8
...
Conflicts:
lib/liquid/variable.rb
2013-04-23 13:10:16 -03:00
Jay Strybis
a556ae6c26
Add reverse filter
2013-03-07 16:29:39 -06:00
Dylan Smith
9913895b81
Merge branch 'master' into remove-symbolizing
...
Conflicts:
lib/liquid/variable.rb
2013-03-05 15:25:11 -05:00
Dylan Smith
d706db3bd7
Add support for filter keyword arguments. Closes #175
2013-03-05 15:17:14 -05:00
wǒ_is神仙
17dd85868d
add tests for replace filter
2013-02-21 10:52:46 +08:00
Dylan Smith
38b4543bf1
Use sets to check if methods are invokable without symbolizing.
2013-02-05 14:45:08 -05:00
Jason Roelofs
1300210f05
Convert Strainer to white-list method protection
...
After moving the method existence check from Context into Strainer,
updated Strainer to only accept invokation methods that were added via
filter Modules, and done in a way that respond_to? is never called,
preventing unconstrained Symbol table growth.
2013-01-16 11:14:01 -05:00
Jason Roelofs
7bcb565668
Remove #to_sym calls from Drop and Variable
...
Symbols are not needed here and using plain strings is nicer on Ruby
2013-01-16 09:46:17 -05:00
Jason Roelofs
c3e6cde67f
Add security tests to show that the symbol table doesn't grow
2013-01-16 09:46:17 -05:00
Adam Tanner
0b36540b78
Liquid has UTF8 support.
2012-12-26 18:14:36 -08:00
Dylan Smith
ee41b3f4a3
Fix filter parser regex for filter args without separating spaces.
...
The regex was using \S+ to match the comma between the filters
arguments, but would continue to match idependent quote characters and
filter separators. This can result in multiple filters being interpreted as
a single one with many arguments.
2012-12-18 01:23:31 -05:00
Jon Daniel
9c183bea83
added interrupt class for continue/break statements
...
When a continue or break statement is executed it pushes an interrupt to a
stack in context. If any non-handled interrupts are present blocks will cease
to execute. The for loop can handle the most recent interrupt in the stack.
2012-08-21 13:14:27 -04:00
Jon Daniel
484fd18612
added break and continue tags
2012-08-21 00:00:02 -04:00
Paul Barry
d2827c561b
Class name does not match file name
2012-08-19 07:44:35 -04:00
Dylan Smith
f5a20ff8e8
Fix a regression in tablerow limit parameter.
...
I had accidentally read slice_collection_using_each as using to as an
inclusive limit rather than exclusive, and no tests covered the offset or
limit parameters.
2012-06-21 14:56:05 -04:00
Dylan Smith
d0184555d9
Allow tablerow to work with any Enumerable. Closes #132
2012-06-20 11:07:11 -04:00
Jason Normore
515b31158e
strip_html to ignore comments with html tags. fixes #1650
2012-06-11 10:32:12 -04:00
Jeremy Friesen
740cd6e762
Merge branch 'master' of git://github.com/Shopify/liquid
...
* 'master' of git://github.com/Shopify/liquid:
* Seperated 'Howto' into 'How to'. * Added periods to the second list as the first item has them. I guess I'm anally retentive like that. :)
Fix conditions using negative number comparisons
2012-04-19 10:59:44 -04:00
Jeremy Friesen
5d0004a87e
Added tests to verify that {{ 'now' | date :'%Y' }} and {{ 'today' | date :'%Y' }} work.
...
In the case of Ruby 1.9.3, 'now' is no longer parsed. For safe
measures, I've added 'today' as well.
2012-04-19 10:48:55 -04:00