aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-2/+2
|
* Suppress `warning: BigDecimal.new is deprecated`Yasuo Honda2017-12-151-4/+4
| | | | | | | | | | | | | | | | | | | | `BigDecimal.new` has been deprecated in BigDecimal 1.3.3 which will be a default for Ruby 2.5. Refer https://github.com/ruby/bigdecimal/commit/533737338db915b00dc7168c3602e4b462b23503 * This commit has been made as follows: ``` cd rails git grep -l BigDecimal.new | grep -v guides/source/5_0_release_notes.md | grep -v activesupport/test/xml_mini_test.rb | xargs sed -i -e "s/BigDecimal.new/BigDecimal/g" ``` - `activesupport/test/xml_mini_test.rb` Editmanually to remove `.new` and `::` - guides/source/5_0_release_notes.md This is a Rails 5.0 release notes.
* Enable `Layout/SpaceBeforeComma` rubocop rule, and fixed moreRyuta Kamizono2017-12-121-2/+2
| | | | Follow up of #31390.
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-2/+2
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-12/+12
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Ensure values are strings before calling gsubMike Virata-Stone2016-08-121-0/+8
|
* ensure tag/content_tag escapes " in attribute valsAndrew Carpenter2016-08-111-0/+10
| | | | | | Many helpers mark content as HTML-safe without escaping double quotes -- including `sanitize`. Regardless of whether or not the attribute values are HTML-escaped, we want to be sure they don't include double quotes, as that can cause XSS issues. For example: `content_tag(:div, "foo", title: sanitize('" onmouseover="alert(1);//'))` CVE-2016-6316
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+1
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-7/+7
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-20/+20
|
* applies new string literal convention in actionview/testXavier Noria2016-08-061-45/+45
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* New syntax for tag helpers i.e. tag.br instead of tag(br) #25195Marek2016-06-271-4/+160
|
* Test to check if the data-attr if nil is same or notSourav Moitra2016-02-141-0/+6
| | | | | | | | | | if data attribute is nil it is ignored if value is nil the pair is ignored if value is nil it is skipped Improved test for data attr nil
* html_safe is not supposed to be public API for AV. This change removes usage ↵Vipul A M2016-01-201-2/+2
| | | | | | of html_safe in favour of raw() in AV helpers. Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
* Test to ensure content_tag works when fixing #17661Jon Atack2014-12-161-0/+5
| | | | | | | | | | | | | | | After c2fe093, which was reverted yesterday, there will likely be future PRs to address #17661. The test `actionview/test/template/capture_helper_test.rb #test_capture_returns_nil_if_the_returned_value_is_not_a_string` should have errored with c2fe093, but it was rewritten in the PR to not raise. My guess is that it may have seemed irrelevant to the content_tag tests or already covered by them. This test provides additional protection by being in the content_tag test suite to explicitly raise a red flag in future cases. It foregoes some redundancy for safety — at least until #17661 is closed.
* Regression test for #18024Santiago Pastorino2014-12-151-0/+5
|
* Revert "Re-enable capture'ing non-String values"Santiago Pastorino2014-12-151-5/+0
| | | | This reverts commit c2fe0938d7201d4ce0bb2f25e72bf5f70df128af.
* Re-enable capture'ing non-String valuesCarsten Zimmermann2014-12-141-0/+5
| | | | | | | This has been discussed in #17661 and partially reverts the changes made in 9de83050d3a4b260d4aeb5d09ec4eb64f913ba64 and 986cac73e3c56b3dfa22fd1464f6913e38d32cc3 The test case added to content_for acts as a regression / acceptance test.
* Add support for ARIA attributes in tagsPaoMar2014-09-031-0/+7
|
* Fix escape_once double-escaping hex-encoded entitiesJohn F. Douthat2014-07-021-0/+1
| | | | (This is a manual merge of #9102)
* In tag helper, honor html_safe on array parameters; also make safe_join more ↵Paul Grayson2014-06-121-0/+24
| | | | similar to Array.join by first calling flatten.
* Convert CDATA input to string before gsub'ingCarsten Zimmermann2013-10-291-0/+4
| | | | | Rails 3.2 API allowed arbitrary input for cdata_section; this change re-introduces the old behaviour.
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-0/+130