aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/text_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'rails/master'Xavier Noria2010-06-201-14/+18
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * Make text_helpers methods which return valid html to return it as safe and ↵Santiago Pastorino2010-06-171-6/+14
| | | | | | | | | | | | | | | | sanitize the input always unless :sanitize => false is set [#4825 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
| * truncate() should not try to produce HTML-safe outputWincent Colaiuta2010-06-171-8/+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>
* | Added titles and description.Rizwan Reza2010-06-161-0/+1
| |
* | Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-151-1/+1
|\ \ | |/ |/|
| * Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
| |
* | edit pass: the names of Rails components have a space, ie, "Active Record", ↵Xavier Noria2010-06-141-1/+1
| | | | | | | | not "ActiveRecord"
* | truncate safe method description changesNeeraj Singh2010-06-141-1/+1
| |
* | truncate documentation an examples added for :safe optionSantiago Pastorino2010-06-131-0/+10
| |
* | text_helper now escape the unsafe input instead of sanitizingSantiago Pastorino2010-06-111-4/+4
|/ | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Removed textilize, textilize_without_paragraph and markdown helpersSantiago Pastorino2010-06-091-83/+0
| | | | 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-2/+2
| | | | | | | | 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-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Makes text_helper methods sanitize the input if the input is not safe or ↵Santiago Pastorino2010-06-071-16/+22
| | | | :safe => true option is not provided
* revises the documentation of String#truncate and the truncate helperXavier Noria2010-06-021-9/+9
|
* Extracted String#truncate from TextHelper#truncate [DHH]David Heinemeier Hansson2010-06-011-11/+5
|
* avoid auto_linking already linked emails; more robust detection of linked URLsMislav Marohnić2010-05-241-9/+18
| | | | | | | | | | 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-3/+3
| | | | | | recognizes all URI scheme allowed characters, such as colon and period. [#3494 state:resolved]
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+1
|
* Merge branch 'master' into docrailswycats2010-03-261-2/+2
|\
| * Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-171-1/+1
| | | | | | | | warnings are in dependencies.
| * Some more tweaks on <% %>.Carlhuda2010-03-161-1/+1
| | | | | | | | * The cache helper is now semantically "mark this region for caching" * As a result, <% x = cache do %> no longer works
* | Nitpick: the first value should be odd, second is even.Ryan Bigg2010-02-271-1/+1
| |
* | Merge remote branch 'mainstream/master'Pratik Naik2010-02-141-3/+3
|\| | | | | | | | | | | | | | | Conflicts: railties/README railties/guides/source/active_support_core_extensions.textile railties/guides/source/getting_started.textile railties/lib/generators/rails/app/templates/README
| * simple_format returns a safe buffer escaping unsafe input [Santiago Pastorino]David Heinemeier Hansson2010-02-121-1/+1
| |
| * Safely concat the ending tag to simple_format or it will be escapedDavid Heinemeier Hansson2010-02-121-1/+1
| |
| * Fix pluralization for numbers formatted like '1.00'Gabriel Mansour2010-02-071-1/+1
| | | | | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | revises an example in the rdoc of TextHelper#concatXavier Noria2010-02-061-1/+1
|/
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-5/+5
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* Merge docrailsPratik Naik2010-01-171-4/+2
|
* adding fix for auto linking to master tooZach Brock2010-01-051-1/+1
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Support passing Redcloth options via textilize helper [#2973 state:resolved]rizwanreza2009-08-091-3/+11
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Update truncate documentation / examples to more clearly demonstrate its ↵Steve St. Martin2009-08-081-8/+10
| | | | | | | | actual behavior [#3016 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge docrailsPratik Naik2009-07-251-2/+2
|
* Truncate helper accepts a :separator for a more legible result [#1807 ↵Andy Stewart2009-05-181-1/+6
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure auto_link does not ignore multiple trailing punctuations [#2504 ↵Lance Ivy2009-05-171-6/+7
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2009-03-241-3/+3
|
* Ensure auto_link doesnt linkify URLs in the middle of a tag [#1523 ↵Eugene Pimenov2009-03-101-2/+3
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9 compat: removed redundant nested repeat operatorJoshua Peek2009-02-071-1/+1
|
* Using the highlight helper on text with html shouldn't highlight text inside ↵Dan Weinand2009-01-281-1/+1
| | | | | | html attributes. [#1302 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* allow options to be passed to email address auto generationAndrew Kaspick2008-12-011-4/+4
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1418 state:committed]
* Autoload HTML::Document and sanitizersJeremy Kemper2008-11-231-10/+0
|
* Fixed RedCloth and BlueCloth shouldn't preload. Instead just assume that ↵David Heinemeier Hansson2008-11-171-81/+69
| | | | they're available if you want to use textilize and markdown and let autoload require them [DHH]
* auto_link helper: add intelligent ending closing bracket handling. add new ↵Mislav Marohnić2008-11-151-9/+13
| | | | | | | tests and reorder new ones for readability Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1353 state:committed]
* refactor autolink helper. change tests to expect HTML-escaped URLsMislav Marohnić2008-11-151-26/+20
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* auto_link view helper was failing on URLs with colons after a query paramRich Manalang2008-11-071-2/+2
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1341 state:committed]
* Merge with docrailsPratik Naik2008-11-021-5/+5
|
* Remove special 1.9 version of excerpt helper.Manfred Stienstra2008-09-211-45/+45
|
* Change all calls to String#chars to String#mb_chars. Remove a exception for ↵Manfred Stienstra2008-09-211-87/+41
| | | | Ruby <= 1.9.
* Merge docrailsPratik Naik2008-09-031-1/+1
|