aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/handlers
Commit message (Collapse)AuthorAgeFilesLines
* Override <%== to always behave as literal text rather than toggling based on ↵Jeremy Kemper2012-12-031-0/+11
| | | | | | | whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged. Conflicts: actionpack/test/template/template_test.rb
* Merge pull request #8235 from tilsammans/dont_escape_actionmailer_when_plaintextJosé Valim2012-11-161-0/+5
| | | | | | | | Introduce `ActionView::Template::Handlers::ERB.escape_whitelist` Conflicts: actionpack/CHANGELOG.md actionpack/test/template/template_test.rb
* format lookup for partials is derived from the format in which the template ↵Santiago Pastorino2012-02-221-4/+0
| | | | | | is being rendered Closes #5025 part 2
* Fixes for using action view template in isolation.José Valim2011-11-302-2/+11
|
* corrected the ActionMailer tests which broke due to some code removed from ↵Josh Kalderimis2011-05-251-0/+1
| | | | ActionPack
* removed deprecated methods, and related tests, from ActionPackJosh Kalderimis2011-05-241-1/+0
|
* fixed some ruby 19 warnings, including circular requires and variable name reuseJosh Kalderimis2011-05-211-1/+0
|
* Yo dawg, I heard you like streaming. So I put a fiber, inside a block, ↵José Valim2011-04-161-14/+4
| | | | inside a body, so you can stream.
* Buffer should be an option passed down to template rendering.José Valim2011-04-161-1/+1
|
* removes the RJS template handlerXavier Noria2011-04-131-13/+0
|
* s/ERb/ERB/gAkira Matsuda2011-04-031-1/+1
| | | | | The author of ERB sais, his eRuby implementation was originally named "ERb/ERbLight" and then renamed to "ERB" when started bundled as a Ruby standard lib. http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
* Action Pack typos.R.T. Lechow2011-03-051-1/+1
|
* Make safe_append= live on AV::OutputBuffer not AS::SafeBufferMichael Koziarski2010-11-081-0/+1
| | | | | | Conflicts: actionpack/lib/action_view/template/handlers/erb.rb
* Added support for Erubis <%== tagJan Maurits Faber2010-11-081-1/+5
| | | | | | | <%== x %> is syntactic sugar for <%= raw(x) %> Signed-off-by: Michael Koziarski <michael@koziarski.com> [#5918 status:committed]
* Deprecate old template handler API. Remove old handlers.José Valim2010-10-103-22/+23
|
* Remove deprecated support to <% form_for %> and several ↵José Valim2010-08-291-15/+0
| | | | ActionController::Base methods.
* Update template to allow handlers to more cleanly handle encodings (ht: nex3)wycats2010-05-301-27/+25
|
* Make sure encoding changes don't break 1.8wycats2010-05-171-1/+3
|
* Significantly improved internal encoding heuristics and support.wycats2010-05-161-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Initial work to improve the state of encodings for templateswycats2010-05-161-45/+53
|
* Check blocks are not incorrectly detected when compiling erubis templates ↵Simon Jefford2010-05-161-1/+1
| | | | | | [#4575 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add deprecation notices for <% %>.Carlhuda2010-03-151-1/+18
| | | | | | | | | | | | | | | | * The approach is to compile <% %> into a method call that checks whether the value returned from a block is a String. If it is, it concats to the buffer and prints a deprecation warning. * <%= %> uses exactly the same logic to compile the template, which first checks to see whether it's compiling a block. * This should have no impact on other uses of block in templates. For instance, in <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array, not a String, so the result is not concatenated * In two cases (#capture and #cache), a String can be returned that should *never* be concatenated. We have temporarily created a String subclass called NonConcattingString which behaves (and is serialized) identically to String, but is not concatenated by the code that handles deprecated <% %> block helpers. Once we remove support for <% %> block helpers, we can remove NonConcattingString.
* Finish cleaning up rendering stack from views and move assigns evaluation to ↵José Valim2010-03-121-2/+1
| | | | controller (so plugins and/or controllers can overwrite just one method).
* %= works for content_tag and does not require parenthesis on method callJosé Valim2010-03-121-47/+6
|
* Delegate #encoding to SafeBuffer tooJeremy Kemper2010-03-111-0/+4
|
* Make form helpers work with <%= wycats2010-03-091-0/+8
|
* Deprecate block_called_from_erb? pending a solution for getting it into appsCarlhuda2010-03-091-5/+41
|
* Rename erubis_implementation to erb_implementation.José Valim2010-02-221-3/+3
|
* Add support for compile-time <%= raw %>Yehuda Katz2010-01-311-1/+5
|
* Deleted all references to ActionView::SafeBuffer in favor of ↵Santiago Pastorino2010-01-311-1/+1
| | | | | | ActiveSupport::SafeBuffer Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Instead of marking raw text in templates as safe, and then putting them ↵Yehuda Katz2009-12-241-1/+2
| | | | through String#<< which checks if the String is safe, use safe_concat, which uses the original (internal) String#<< and leaves the safe flag as is. Results in a significant performance improvement.
* Reorganize autoloads:Carlhuda2009-12-023-6/+6
| | | | | | | | | | | | | | | | | | | | | * A new module (ActiveSupport::Autoload) is provide that extends autoloading with new behavior. * All autoloads in modules that have extended ActiveSupport::Autoload will be eagerly required in threadsafe environments * Autoloads can optionally leave off the path if the path is the same as full_constant_name.underscore * It is possible to specify that a group of autoloads live under an additional path. For instance, all of ActionDispatch's middlewares are ActionDispatch::MiddlewareName, but they live under "action_dispatch/middlewares/middleware_name" * It is possible to specify that a group of autoloads are all found at the same path. For instance, a number of exceptions might all be declared there. * One consequence of this is that testing-related constants are not autoloaded. To get the testing helpers for a given component, require "component_name/test_case". For instance, "action_controller/test_case". * test_help.rb, which is automatically required by a Rails application's test helper, requires the test_case.rb for all active components, so this change will not be disruptive in existing or new applications.
* Make encodings work with Erubis and 1.9 againYehuda Katz2009-10-161-3/+5
|
* Make the erubis implementation easier for plugins to change.Michael Koziarski2009-10-151-1/+4
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-3/+25
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Restore split between require-time and runtime load path mungery. Simplifies ↵Jeremy Kemper2009-09-241-1/+1
| | | | vendor requires.
* Rollback AS bundler work and improve activation of vendored dependenciesJoshua Peek2009-09-131-1/+1
|
* Fix pattern to match various magic comment formatsAkira Matsuda2009-07-011-1/+1
|
* Try speeding up rails bootingYehuda Katz + Carl Lerche2009-06-252-3/+3
|
* Cleaning up if defined?(ActionController::Http) blocks from the pre new base ↵Yehuda Katz + Carl Lerche2009-06-171-2/+1
| | | | era.
* Fixing pending tests and fixed some formats / partial rendering semanticsYehuda Katz + Carl Lerche2009-06-171-1/+0
|
* Ensure ERB source begins with the encoding commentJeremy Kemper2009-06-011-1/+3
|
* Ruby 1.9: ERB template encoding using a magic comment at the top of the fileJeremy Kemper2009-05-281-5/+1
|
* Remove some response content type concepts from ActionViewYehuda Katz + Carl Lerche2009-05-213-0/+10
|
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
|
* First, very early, AbstractController code. More to comeYehuda Katz2009-02-241-0/+2
|
* Begin unifying the interface between ActionController and ActionViewYehuda Katz2009-01-223-0/+52