aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename _snowman_ to _snowman to be in sync with _method and _csrf_token.José Valim2010-06-292-2/+2
|
* Restores the escaping of urls generated from hashes. [#4765 state:resolved]Andrew White2010-06-281-8/+4
| | | | | | | | | | | | | | HTML specifications recommend the escaping of urls in web pages, which url_for does by default for string urls and consquently urls generated by path helpers as these return strings. Hashes passed to url_for are not escaped by default and this commit reverses this default so that they are escaped. Undoes the changes of this commit: http://github.com/rails/rails/commit/1b3195b63ca44f0a70b61b75fcf4991cb2fbb944 Signed-off-by: José Valim <jose.valim@gmail.com>
* Strip_tags never ending attribute should not raise a TypeError [#4870 ↵Bruno Michel2010-06-281-0/+4
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix several known web encoding issues:wycats2010-06-274-194/+253
| | | | | | | | | | | | | | | | | | | | | | | * Specify accept-charset on all forms. All recent browsers, as well as IE5+, will use the encoding specified for form parameters * Unfortunately, IE5+ will not look at accept-charset unless at least one character in the form's values is not in the page's charset. Since the user can override the default charset (which Rails sets to UTF-8), we provide a hidden input containing a unicode character, forcing IE to look at the accept-charset. * Now that the vast majority of web input is UTF-8, we set the inbound parameters to UTF-8. This will eliminate many cases of incompatible encodings between ASCII-8BIT and UTF-8. * You can safely ignore params[:_snowman_] TODO: * Validate inbound text to confirm it is UTF-8 * Combine the whole_form implementations in form_helper_test and form_tag_helper_test
* Normalize recall params when the route is not a standard route otherwise ↵Andrew White2010-06-271-0/+22
| | | | | | :controller and :action may appear in the generated url [#4326 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Change reference to Test::Unit::AssertionFailedError to the generic ↵David Trasbo2010-06-261-1/+1
| | | | | | ActiveSupport::TestCase::Assertion [#4987 state:commited] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Do not wrap hidden fields with error proc [#4962 state:resolved]Carlos Antonio da Silva2010-06-251-0/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-5/+5
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* Expose view via the view() method in AV::TestCase::BehaviorDavid Chelimsky2010-06-231-12/+16
| | | | | | | | | | - was exposed as _view, which suggested it was private - left _view as an alias of view as not to break any extensions that are relying on _view [#4932 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* In ActionView::TestCase::Behavior, assign variables right beforeDavid Chelimsky2010-06-231-0/+9
| | | | | | | | | | | rendering the view. - Previously, _assigns were locked down the first time _view was referenced. [#4931 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* make text_field and hidden_field omit the value attribute if the developer ↵Jeff Dean2010-06-231-0/+10
| | | | | | explicitly passes in :value => nil [#4839 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Tidy up asset tag a bit and make railties tests green again.José Valim2010-06-231-2/+2
|
* refactored the javascript asset tag helpers and moved the default scripts ↵Josh Kalderimis2010-06-231-15/+7
| | | | | | setup within the railtie Signed-off-by: José Valim <jose.valim@gmail.com>
* test for #4862Neeraj Singh2010-06-221-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Add support for specifying locals in view tests with assert template [#4927 ↵David Chelimsky2010-06-221-2/+16
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed date_select date_separator when discard_month and/or discard_day are ↵Thibaud Guillaume-Gentil2010-06-201-0/+27
| | | | | | true [#4856 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Adding missing test to autolink with other protocols (file) [#4886 ↵Carlos Antonio da Silva2010-06-201-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Support render_template in view tests. Useful for specifying whichDavid Chelimsky2010-06-201-0/+8
| | | | | | | | partials are rendered under different conditions. [#4903 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* option_groups_from_collection_for_select should return HTML-safe string ↵Wincent Colaiuta2010-06-191-18/+12
| | | | | | [#4879 state:resolved] Signed-off-by: Xavier Noria <fxn@hashref.com>
* form_for without :html and with :remote should not errorDavid Genord II2010-06-181-0/+20
| | | | | | [#4902 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make text_helpers methods which return valid html to return it as safe and ↵Santiago Pastorino2010-06-171-40/+28
| | | | | | | | sanitize the input always unless :sanitize => false is set [#4825 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* excerpt shoudn't return safe output test addedSantiago Pastorino2010-06-171-0/+4
| | | | | | [#4878] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* truncate() should not try to produce HTML-safe outputWincent Colaiuta2010-06-171-14/+4
| | | | | | | | | | 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>
* render(:inline) in a layout before yield replaces original contentNeeraj Singh2010-06-131-0/+6
| | | | | | [#4777 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Change sanitize to escape in test names of text_helper_test [#4844 ↵rohit2010-06-121-9/+9
| | | | state:resolved]
* text_helper now escape the unsafe input instead of sanitizingSantiago Pastorino2010-06-111-9/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove punctuate_body! No code in lib was using it and it had no documentation.José Valim2010-06-101-25/+0
|
* Removed textilize, textilize_without_paragraph and markdown helpersSantiago Pastorino2010-06-091-108/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Memoize the object returned by _view in ActionView::TestCase::BehaviorDavid Chelimsky2010-06-081-0/+4
| | | | | | [#4799 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Made markdown honor :safe option and handle safe input. Also added tests for ↵rohit2010-06-081-0/+36
| | | | | | | | markdown. [#4794 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed textilize_without_paragraph and added tests for it. [#4792 state:resolved]rohit2010-06-081-0/+32
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Updating image_tag to support cid:content_id "URLs"Mikel Lindsaar2010-06-071-0/+9
|
* Makes text_helper methods sanitize the input if the input is not safe or ↵Santiago Pastorino2010-06-071-6/+96
| | | | :safe => true option is not provided
* content_tag_string shouldn't escape_html if escape param is falseSantiago Pastorino2010-06-071-0/+2
|
* Make AP test suite green once again and speed up performance in layouts ↵José Valim2010-06-071-14/+2
| | | | lookup for some cases.
* Update template to allow handlers to more cleanly handle encodings (ht: nex3)wycats2010-05-301-4/+13
|
* Now that we always return a proxy from mb_chars, even in 1.9, all Strings ↵wycats2010-05-291-3/+5
| | | | coming back from AS are UTF-8.
* Merge commit 'mislav/auto_link'Michael Koziarski2010-05-291-18/+40
|\
| * avoid auto_linking already linked emails; more robust detection of linked URLsMislav Marohnić2010-05-241-7/+30
| | | | | | | | | | | | | | | | | | | | 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]
| * auto_link: support arbitrary URI schemes like "ftp:" and "file:"Mislav Marohnić2010-05-241-11/+10
| | | | | | | | | | | | recognizes all URI scheme allowed characters, such as colon and period. [#3494 state:resolved]
* | In AV::TC, move protect_against_forgery? from the test_case to theDavid Chelimsky2010-05-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | _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>
* | reorganize tests for AV::TCDavid Chelimsky2010-05-261-140/+138
| | | | | | | | | | | | | | | | - decouple tests from the test case class by moving them outside - split out more TestCase subs as cleaner way of avoiding bleed of class level concepts Signed-off-by: José Valim <jose.valim@gmail.com>
* | Support configuration of controller.controller_path on instances ofDavid Chelimsky2010-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | i18n: t() handles single keys returning an Array, alsoJeremy Kemper2010-05-241-0/+10
| |
* | HTML safety: fix textarea with nil contentJeremy Kemper2010-05-241-0/+6
| |
* | translate method doesn't support arrays anymore and is optimized to be used ↵Santiago Pastorino2010-05-241-14/+2
| | | | | | | | | | | | with strings or symbols Signed-off-by: José Valim <jose.valim@gmail.com>
* | Revert "translation method for arrays on TranslationHelper module returns an ↵Santiago Pastorino2010-05-241-15/+14
| | | | | | | | | | | | | | | | array where values for keys of the form (.|_)html keys are html_safe" This reverts commit 05c95b5c5815c0b3ae55fda7a897922b7f3ec2c7. Signed-off-by: José Valim <jose.valim@gmail.com>
* | Move AV::TC to AV::TC::Behavior [#4678 state:resolved]David Chelimsky2010-05-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | translation method for arrays on TranslationHelper module returns an array ↵Santiago Pastorino2010-05-241-14/+15
|/ | | | | | | | where values for keys of the form (.|_)html keys are html_safe [#4675] Signed-off-by: José Valim <jose.valim@gmail.com>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-3/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>