aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/text_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Highlight defaults to HTML5 `mark` elementBrian Cardarella2012-02-051-12/+12
|
* remove obsolete commented asserts in TextHelper testsSergey Nartimov2012-01-061-6/+0
|
* 'with_kcode' removed. Arun Agrawal2011-12-211-2/+0
| | | | Testing Sandbox removed.
* Remove unused conditions for 1.9Rahul P. Chaudhari2011-12-211-34/+11
|
* Fix and simplify highlight regexpAlexey Vakhov2011-11-101-0/+4
|
* ActionView::Helpers::TextHelper#simple_format should not change the text in ↵Casebook Developer2011-08-041-2/+2
| | | | place. Now it duplicates it.
* Do not change a frozen text passed to simple_format text helperTadas Tamosauskas2011-06-201-2/+9
|
* remove warning: assigned but unused variableSantiago Pastorino2011-06-081-2/+2
|
* removing auto_link and moving it to the rails_autolink gem. :bomb:Aaron Patterson2011-05-021-254/+0
|
* do not return html safe strings from auto_linkAaron Patterson2011-04-051-5/+11
|
* auto_link: avoid recognizing full width chars as a part of URI schemeAkira Matsuda2011-02-011-1/+7
| | | | | | | | fixes regression by http://github.com/rails/rails/commit/133ada6ab0f0cb7bef2bd40dbc18f2d5bc6b964e [#5503 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove more warnings shadowing outer local variable.Emilio Tagua2010-09-271-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove more warnings shadowing outer local variable.Emilio Tagua2010-09-271-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-6/+6
| | | | 's/[ \t]*$//' -i {} \;)
* Adding missing test to autolink with other protocols (file) [#4886 ↵Carlos Antonio da Silva2010-06-201-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Make text_helpers methods which return valid html to return it as safe and ↵Santiago Pastorino2010-06-171-40/+28
| | | | | | | | sanitize the input always unless :sanitize => false is set [#4825 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* excerpt shoudn't return safe output test addedSantiago Pastorino2010-06-171-0/+4
| | | | | | [#4878] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* truncate() should not try to produce HTML-safe outputWincent Colaiuta2010-06-171-14/+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>
* Change sanitize to escape in test names of text_helper_test [#4844 ↵rohit2010-06-121-9/+9
| | | | state:resolved]
* text_helper now escape the unsafe input instead of sanitizingSantiago Pastorino2010-06-111-9/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Removed textilize, textilize_without_paragraph and markdown helpersSantiago Pastorino2010-06-091-108/+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-0/+36
| | | | | | | | 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-0/+32
| | | | 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-6/+96
| | | | :safe => true option is not provided
* Now that we always return a proxy from mb_chars, even in 1.9, all Strings ↵wycats2010-05-291-3/+5
| | | | coming back from AS are UTF-8.
* avoid auto_linking already linked emails; more robust detection of linked URLsMislav Marohnić2010-05-241-7/+30
| | | | | | | | | | 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-11/+10
| | | | | | recognizes all URI scheme allowed characters, such as colon and period. [#3494 state:resolved]
* Explicit source encodingJeremy Kemper2010-04-241-0/+1
|
* simple_format returns a safe buffer escaping unsafe input [Santiago Pastorino]David Heinemeier Hansson2010-02-121-0/+12
|
* Fix pluralization for numbers formatted like '1.00'Gabriel Mansour2010-02-071-0/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* adding fix for auto linking to master tooZach Brock2010-01-051-0/+14
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix that RedCloth shouldn't be required to run testsJeremy Kemper2009-08-091-12/+18
|
* Support passing Redcloth options via textilize helper [#2973 state:resolved]rizwanreza2009-08-091-0/+17
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Truncate helper accepts a :separator for a more legible result [#1807 ↵Andy Stewart2009-05-181-0/+3
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure auto_link does not ignore multiple trailing punctuations [#2504 ↵Lance Ivy2009-05-171-0/+7
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
| * Ensure auto_link doesnt linkify URLs in the middle of a tag [#1523 ↵Eugene Pimenov2009-03-101-0/+6
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Temporarily modifies setup to call super directly. This can support more ↵Yehuda Katz and Carl Lerche2009-04-081-0/+1
|/ | | | T::U runners.
* Using the highlight helper on text with html shouldn't highlight text inside ↵Dan Weinand2009-01-281-0/+23
| | | | | | 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-1/+6
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1418 state:committed]
* auto_link helper: add intelligent ending closing bracket handling. add new ↵Mislav Marohnić2008-11-151-47/+81
| | | | | | | 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-13/+24
| | | | 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-0/+1
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1341 state:committed]
* Added TextHelper#current_cycle to return the current cycle for better design ↵Ken Collins2008-08-271-0/+34
| | | | | | | | options. [#417 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Refactored TextHelper#truncate, highlight, excerpt, word_wrap and auto_link ↵Clemens Kofler2008-07-271-9/+42
| | | | | | to accept options hash [#705 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Allow single quote (the ' character) in the middle of URL when ↵Cheah Chu Yeow2008-06-271-0/+1
| | | | | | auto_link-ing. [#471 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Check whether blocks are called from erb using a special __in_erb_template ↵Jeremy Kemper2008-06-191-3/+1
| | | | variable visible in block binding.
* Use output_buffer reader and writer methods exclusively instead of hitting ↵Jeremy Kemper2008-06-081-3/+3
| | | | the instance variable so others can override the methods.
* concat should ignore nilJeremy Kemper2008-06-061-0/+8
|
* Fix auto_link helper for already linked urls. [#72 state:resolved]Kevin Glowacz2008-05-221-0/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>