David Genord II
a186431414
form_for without :html and with :remote should not error
...
[#4902 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-18 13:59:28 -07:00
Santiago Pastorino
84d387bc0f
Make text_helpers methods which return valid html to return it as safe and sanitize the input always unless :sanitize => false is set
...
[#4825 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2010-06-17 13:34:10 -05:00
Wincent Colaiuta
a424808df9
truncate() should not try to produce HTML-safe output
...
As discussed in Lighthouse ticket #4825 and ticket #4878 , the truncate()
method cannot guarantee safe output for all possible inputs/offsets, so
it is best to leave the output unsafe so that it gets escaped when used
in a view.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2010-06-17 09:41:04 -05:00
Xavier Noria
f17159b029
edit pass: the names of Rails components have a space, ie, "Active Record", not "ActiveRecord"
2010-06-14 23:22:04 +02:00
Neeraj Singh
f587dec2c9
truncate safe method description changes
2010-06-14 09:12:10 -04:00
Rizwan Reza
bf7429041e
Merge branch 'master' of git://github.com/rails/rails
2010-06-14 13:13:13 +04:30
Neeraj Singh
e574ca920d
render(:inline) in a layout before yield replaces original content
...
[#4777 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-13 13:56:08 +02:00
Santiago Pastorino
27f337d54f
truncate documentation an examples added for :safe option
2010-06-13 06:11:23 -03:00
Xavier Noria
d433c504b5
removes spurious .rb in require
2010-06-12 22:10:59 +02:00
Xavier Noria
f2991fc9cc
Merge remote branch 'docrails/master'
2010-06-12 00:30:48 +02:00
Santiago Pastorino
b4976ce91b
text_helper now escape the unsafe input instead of sanitizing
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-11 16:34:53 +02:00
Xavier Noria
4278e7f2b3
adds missing require for having ActiveSupport::InheritableOptions defined
2010-06-11 15:23:24 +02:00
Xavier Noria
b69a2db952
adds missing require for having ActiveSupport::InheritableOptions defined
2010-06-11 15:20:26 +02:00
Slobodan Kovacevic
5a745575be
Updated all number helpers with :locale option.
2010-06-11 14:04:38 +02:00
Xavier Noria
6356066006
Merge remote branch 'rails/master'
2010-06-10 22:00:55 +02:00
José Valim
51590ad175
Remove punctuate_body! No code in lib was using it and it had no documentation.
2010-06-10 19:49:10 +02:00
José Valim
b67ec8ba20
class_attribute is not a direct replacement of class_inheritable_*.
...
If you are setting a hash or an array in class_attribute or you need
to freeze it, to ensure people won't modify it in place or you need
to dup it on inheritance.
2010-06-10 19:39:09 +02:00
Slobodan Kovacevic
59e89facc2
Added :locale option explanation for number_to_currency
2010-06-10 14:58:02 +02:00
Santiago Pastorino
0919c0dbca
Removed textilize, textilize_without_paragraph and markdown helpers
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-09 10:06:14 +02:00
David Chelimsky
bdcf70cca8
Memoize the object returned by _view in ActionView::TestCase::Behavior
...
[#4799 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-08 21:25:31 +02:00
David Heinemeier Hansson
585f8f27b1
Fixed double output from cache in no caching mode
2010-06-08 14:47:02 -04:00
rohit
47bf19c848
Made markdown honor :safe option and handle safe input. Also added tests for markdown.
...
[#4794 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-08 17:00:11 +02:00
rohit
67f411c57b
Fixed textilize_without_paragraph and added tests for it. [ #4792 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-08 09:11:34 +02:00
Mikel Lindsaar
21cc1ed437
Updating image_tag to support cid:content_id "URLs"
2010-06-07 21:53:31 -04:00
José Valim
981f81275b
Fix case when rendering a partial inside RJS with inherited layout [ #4786 state:resolved]
2010-06-07 22:22:54 +02:00
Santiago Pastorino
ab764ecbfe
Makes text_helper methods sanitize the input if the input is not safe or :safe => true option is not provided
2010-06-07 15:31:21 -04:00
Santiago Pastorino
399b493cb4
content_tag_string shouldn't escape_html if escape param is false
2010-06-07 15:31:11 -04:00
José Valim
5273bd97e6
Make AP test suite green once again and speed up performance in layouts lookup for some cases.
2010-06-07 10:13:41 +02:00
Jeremy Kemper
83729e2fe3
Formats should always be an array.
2010-06-06 19:59:52 -04:00
wycats
a6b3942843
Optimize LookupContext
2010-06-04 20:11:06 -07:00
wycats
ffe001f19d
Changes made while working on upgrading cells to Rails 3
2010-06-02 22:56:41 +02:00
Xavier Noria
315e8952df
revises the documentation of String#truncate and the truncate helper
2010-06-02 01:35:04 +02:00
David Heinemeier Hansson
d57397c4b6
Extracted String#truncate from TextHelper#truncate [DHH]
2010-06-01 16:38:42 -05:00
David Heinemeier Hansson
ea037ff557
Base options cant live in lazy loaded helpers as they then wont be available to set for config
2010-05-31 13:48:47 -05:00
wycats
0078df6b54
Update template to allow handlers to more cleanly handle encodings (ht: nex3)
2010-05-30 11:37:35 +02:00
Michael Koziarski
668f7dd5d0
Merge commit 'mislav/auto_link'
2010-05-29 14:05:56 +12:00
David Chelimsky
e02db06ece
In AV::TC, move protect_against_forgery? from the test_case to the
...
_helper module included in the view.
- ensures that protect_against_forgery? is present when a helper
included in a partial that is rendered by the template under test
calls it (which happens in FormTagHelper#extra_tags_for_form, for
example).
[#4700 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-26 15:59:03 +02:00
David Chelimsky
163152bfd0
Support configuration of controller.controller_path on instances of
...
ActionView::TestCase::TestController without stubs. Just say:
@controller.controller_path = "path/i/need/for/this/test"
[#4697 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-26 08:49:57 +02:00
Jeremy Kemper
f53a6d8149
i18n: t() handles single keys returning an Array, also
2010-05-24 20:30:21 -07:00
Jeremy Kemper
d8d38bedfd
HTML safety: fix textarea with nil content
2010-05-24 20:18:25 -07:00
Santiago Pastorino
b5f9c8822d
translate method doesn't support arrays anymore and is optimized to be used with strings or symbols
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 23:42:20 +02:00
Santiago Pastorino
2b8eb5404e
Revert "translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe"
...
This reverts commit 05c95b5c58 .
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 23:41:55 +02:00
David Chelimsky
8e583b69e8
Move AV::TC to AV::TC::Behavior [ #4678 state:resolved]
...
- enables alternative testing frameworks to include AV::TC::Behavior
instead of subclassing AV::TC
- also added tests and code for:
- test view delegates :notice to request.flash
- useful since generators generate views that use notice
- test case doesn't try to include modules that are actually
classes
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 22:58:46 +02:00
Santiago Pastorino
05c95b5c58
translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe
...
[#4675 ]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-24 20:12:43 +02:00
Mislav Marohnić
8f0b2138ee
avoid auto_linking already linked emails; more robust detection of linked URLs
...
References #1523 [#1862 state:resolved] [#3591 state:resolved]
Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped
[#2017 state:resolved]
2010-05-24 11:25:24 +02:00
Mislav Marohnić
133ada6ab0
auto_link: support arbitrary URI schemes like "ftp:" and "file:"
...
recognizes all URI scheme allowed characters, such as colon and period.
[#3494 state:resolved]
2010-05-24 11:25:24 +02:00
Santiago Pastorino
aacf2581cd
refactor evals and adds some __FILE__ and __LINE__
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-20 15:18:57 +02:00
Xavier Noria
7f07cc364a
Merge remote branch 'rails/master'
2010-05-19 23:29:39 +02:00
Santiago Pastorino
59c7b0c23a
Avoid instance variable @output_buffer not initialized
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-19 12:59:29 +02:00
Marius Nuennerich
aa4fe9fb33
fix documentation typo
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-05-18 19:29:17 -03:00