This project is archived and is in readonly mode.

Changeset [a424808df95c5ebe66d02f0d743e741a1864baa7] by Wincent Colaiuta

June 17th, 2010 @ 03:41 PM

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
http://github.com/rails/rails/commit/a424808df95c5ebe66d02f0d743e74...

Committed by Wincent Colaiuta

  • M actionpack/lib/action_view/helpers/text_helper.rb
  • M actionpack/test/template/text_helper_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>