aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/template_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* html_escape should escape single quotesSantiago Pastorino2012-08-021-1/+1
| | | | | | | | | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215 Conflicts: actionpack/test/template/erb_util_test.rb actionpack/test/template/form_tag_helper_test.rb actionpack/test/template/text_helper_test.rb actionpack/test/template/url_helper_test.rb activesupport/lib/active_support/core_ext/string/output_safety.rb
* Don't wrap the raise with ensureSantiago Pastorino2012-02-211-1/+1
|
* Fix a failing testSantiago Pastorino2012-02-201-0/+2
|
* only load converter if the encodings are differentAaron Patterson2011-12-091-1/+1
|
* load the encoding converter to work around [ruby-core:41556] when switching ↵Aaron Patterson2011-12-081-0/+1
| | | | encodings
* Revert "Skip test_default_external_works on the CI for Ruby 1.9.3."Jon Leighton2011-11-061-11/+0
| | | | This reverts commit 10773f94eae0dacf10e2ed0c28f6bb73805c2521.
* Skip test_default_external_works on the CI for Ruby 1.9.3.Jon Leighton2011-11-051-0/+11
| | | | | | | | | | | | | | | | | | | This test is affected by a bug in Ruby 1.9.3p0 and trunk: http://redmine.ruby-lang.org/issues/5564 Given we cannot fix it for ourselves, it is better to skip for now so that we will easily see if further failures are introduced. Jon Leighton is monitoring the bug report and will revert this when a suitable solution is found (either a new Ruby release or a generic workaround). If you are using 1.9.3 in your app and have templates that are not in UTF-8, you should add a workaround early on in the boot process. For example, if your templates are Shift_JIS encoded, then add the following in an initializer: Encoding::Converter.new('Shift_JIS', 'UTF-8')
* Stub find_template so that when handle_render_error is called in ↵Jon Leighton2011-11-031-0/+3
| | | | | | ActionView::Template, we get to see the actual underlying error rather than a NoMethodError. This shows an encoding bug on Ruby 1.9.3.
* Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"Santiago Pastorino and José Ignacio Costa2011-06-101-5/+0
| | | | This reverts commit 115e80dccc65c3ed9a9750649d9ca4ea2a7e64f1.
* Make sure that we don't perform in-place mutation on SafeBuffer stringPrem Sichanugrist2011-06-101-0/+5
| | | | | | This will make sure `render :inline` is working. Closes #1633
* remove warning: assigned but unused variableSantiago Pastorino2011-06-081-1/+0
|
* Remove dependency from _template.José Valim2011-05-011-6/+4
|
* Buffer should be an option passed down to template rendering.José Valim2011-04-161-38/+0
|
* all tests passartemave2010-12-261-2/+2
|
* Fix for ActionView::Template#refresh in rails 3.1.0.betaAndré Camargo2010-10-151-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove :cache => true on lookup templates initialization.José Valim2010-10-141-8/+0
|
* Use identifiers for template equality.José Valim2010-10-101-0/+8
|
* Clean up unused methods from AV::Base and pass in the template object on ↵José Valim2010-10-101-8/+10
| | | | rendering.
* Add expire! and rerender to the template API. This will be used by SASS ↵José Valim2010-10-101-2/+47
| | | | template handler.
* Add some unit tests to Template#refresh.José Valim2010-10-101-4/+28
|
* Deprecate old template handler API. Remove old handlers.José Valim2010-10-101-2/+2
|
* Add more docs and tests to templates.José Valim2010-10-091-0/+12
|
* Fix 1.9.2 failures.José Valim2010-10-081-4/+4
|
* Remove locals dependency from template.José Valim2010-10-071-0/+1
| | | | | | This means that templates does not need to store its source anymore, allowing us to reduce the ammount of memory taken by our Rails processes. Naively speaking, if your app/views contains 2MB of files, each of your processes (after being hit by a bunch of requests) will take 2MB less of memory after this commit. This is extremely important for the upcoming features. Since Rails will also render CSS and JS files, their source won't be stored as well allowing us to decrease the ammount of memory taken.
* Use helper method here.Emilio Tagua2010-09-281-6/+5
|
* Silence warnings here, only setting Encoding.default_external for testing.Emilio Tagua2010-09-281-2/+3
|
* Initialize @_virtual_path path ivar.Emilio Tagua2010-09-281-0/+1
|
* Move encoding settings for testing purposes to abstract_unit fileSantiago Pastorino2010-08-211-8/+1
|
* Update template to allow handlers to more cleanly handle encodings (ht: nex3)wycats2010-05-301-4/+13
|
* Make sure encoding changes don't break 1.8wycats2010-05-171-4/+6
|
* Significantly improved internal encoding heuristics and support.wycats2010-05-161-0/+128
* Default Encoding.default_internal to UTF-8 * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file * Read templates as BINARY, use default_external or template-wide magic comments inside the Template to set the initial encoding * This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default) * Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding * Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work * Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used Also: * Fixed a few tests that were assert() rather than assert_equal() and were caught by Minitest requiring a String for the message * Fixed a test where an assert_select was misformed, also caught by Minitest being more restrictive * Fixed a test where a Rack response was returning a String rather than an Enumerable