aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string
Commit message (Collapse)AuthorAgeFilesLines
* Stop SafeBuffer#clone_empty from issuing warningsCarlos Antonio da Silva2012-03-021-3/+1
| | | | | | | | | | | | Logic in clone_empty method was dealing with old @dirty variable, which has changed by @html_safe in this commit: https://github.com/rails/rails/commit/139963c99a955520db6373343662e55f4d16dcd1 This was issuing a "not initialized variable" warning - related to: https://github.com/rails/rails/pull/5237 The logic applied by this method is already handled by the [] override, so there is no need to reset the variable here.
* Ensure [] respects the status of the buffer.José Valim2012-02-291-12/+18
|
* delete vulnerable AS::SafeBuffer#[]Akira Matsuda2012-02-201-6/+0
|
* add AS::SafeBuffer#clone_emptyAkira Matsuda2012-02-201-0/+6
|
* Change ActiveRecord::Errors to ActiveModel::Errors in guidesCarlos Antonio da Silva2012-01-251-2/+2
| | | | | | | Use ActiveModel::Errors in inflection example docs as well. Also fixes wrong information and link to locale file related to Errors#full_messages in I18n guide.
* Remove duplicate html_escape docsJeremy Kemper2011-12-111-10/+1
|
* Use 1.9 native XML escaping to speed up html_escape and shush regexp warningsJeremy Kemper2011-12-111-15/+36
| | | | | | | | | | | | length user system total real before 6 0.010000 0.000000 0.010000 ( 0.012378) after 6 0.010000 0.000000 0.010000 ( 0.012866) before 60 0.040000 0.000000 0.040000 ( 0.046273) after 60 0.040000 0.000000 0.040000 ( 0.036421) before 600 0.390000 0.000000 0.390000 ( 0.390670) after 600 0.210000 0.000000 0.210000 ( 0.209094) before 6000 3.750000 0.000000 3.750000 ( 3.751008) after 6000 1.860000 0.000000 1.860000 ( 1.857901)
* fix nodocsVijay Dev2011-12-091-1/+1
|
* Restore performance of ERB::Util.html_escapeJon Jensen2011-12-031-1/+1
| | | | | | | Revert html_escape to do a single gsub again, but add the "n" flag (no language, i.e. not multi-byte) to protect against XSS via invalid utf8 Signed-off-by: José Valim <jose.valim@gmail.com>
* fixes a typo (thanks to Alexey Vakhov)Xavier Noria2011-10-301-1/+1
|
* defines Module#qualified_const_(defined?|get|set) and String#deconstantizeXavier Noria2011-10-291-0/+15
| | | | | | | | | | This commit also implements a faster version of #demodulize I was unable to isolate with git add --patch. Not a big fan of the name #deconstantize. It complements #demodulize getting rid of the rightmost constant, hence the name, but it is unrelated to the well-known #constantize. So unsure. Could not come with anything better, please feel free to rename.
* Merge pull request #3151 from zenprogrammer/pluralize_without_countJosé Valim2011-10-171-3/+14
|\ | | | | Added include_count parameter to pluralize.
| * Modified String#pluralize to take an optional count parameter.Ryan Oblak2011-09-281-3/+14
| |
* | ruby193: String#prepend is also unsafeAkira Matsuda2011-10-051-1/+1
| |
* | override unsafe methods only if defined on StringAkira Matsuda2011-10-051-10/+12
|/
* remove superfluous to_s in ERB::Util.html_escapeAlexey Vakhov2011-09-241-1/+1
|
* Minor doc fix to String#constantizeRyan Oblak2011-09-231-3/+3
|
* Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; ↵Ryan Oblak2011-09-231-3/+16
| | | | refactored common constantize tests into ConstantizeTestCases
* fix incorrect commentVijay Dev2011-09-221-1/+1
|
* Proper lines numbers for stack trace infoSantiago Pastorino2011-09-161-1/+1
|
* revert the changes from c60995f3 - related to marking sub,gsub as ↵Vijay Dev2011-09-091-20/+1
| | | | unavailable to use with safe strings
* Revert removing gsub and sub from safe buffer.José Valim2011-09-081-3/+3
|
* this should have gone with the previous commitXavier Noria2011-09-081-4/+4
|
* copy-edits a couple of exception messagesXavier Noria2011-09-081-4/+4
| | | | | | | "Safe Buffer" should either be the constant with the class name, or go in lower case. I've chosen to follow the same terminology that is used in the AS core extensiong guide, "safe string", though "safe buffer" is also used elsewhere, we should pick one.
* better method documentation on disable safe string methodsDamien Mathieu2011-09-081-6/+12
|
* make gsub and sub unavailable in SafeBuffers - Closes #1555Damien Mathieu2011-09-081-3/+16
|
* properly escape html to avoid invalid utf8 causing XSS attacksAaron Patterson2011-08-161-1/+1
|
* Reset @dirty to false when slicing an instance of SafeBufferBrian Cardarella2011-07-291-0/+6
|
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-07-241-1/+1
|\
| * Changed a few instances of of words in the API docs written in British ↵Oemuer Oezkir2011-07-241-1/+1
| | | | | | | | | | | | English to American English(according to Weber)
* | adds a couple of missing magic comments [fixes #1374]Xavier Noria2011-07-231-0/+1
|/
* Merge pull request #1463 from psanford/masterSantiago Pastorino2011-07-061-2/+2
|\ | | | | Fix timezone handling in String.to_time
| * Make String.to_time respect timezonesNate Mueller2011-06-021-2/+2
| |
* | Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-07-051-8/+8
|\ \
| * | document meta methodsVijay Dev2011-07-031-8/+8
| | |
* | | all numerics should be html_safe - Closes #1935Damien Mathieu2011-07-031-1/+1
| | |
* | | Merge pull request #1648 from dlee/acronymsXavier Noria2011-06-241-1/+0
|\ \ \ | |/ / |/| | Inflector support for acronyms (Issue #1366)
| * | RefactorDavid Lee2011-06-111-1/+0
| | |
* | | calling unsafe methods which don't return a string shouldn't failDamien Mathieu2011-06-221-2/+2
| | |
* | | safe_concat should not work on dirty buffers.José Valim2011-06-161-4/+13
| | |
* | | Fix safe buffer by adding a dirty status.José Valim2011-06-161-12/+24
| | |
* | | Define ActiveSupport#to_param as to_str - closes #1663Andrew White2011-06-121-0/+4
|/ /
* | ensuring that json_escape returns html safe strings when passed an html safe ↵Aaron Patterson2011-06-091-1/+2
| | | | | | | | string
* | Prefer 'each' over 'for in' syntax.Sebastian Martinez2011-06-071-1/+1
| |
* | Ensure that the strings returned by SafeBuffer#gsub and friends aren't ↵Michael Koziarski2011-06-071-0/+13
|/ | | | | | | | | | considered html_safe? Also make sure that the versions of those methods which modify a string in place such as gsub! can't be called on safe buffers at all. Conflicts: activesupport/test/safe_buffer_test.rb
* minor fixesVijay Dev2011-05-073-4/+3
|
* Add String#inquiry as a convenience method for turning a string into a ↵David Heinemeier Hansson2011-04-181-0/+13
| | | | StringInquirer object [DHH]
* 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
* Active Support typos.R.T. Lechow2011-03-052-2/+2
|
* Example descriptions and their examples were flipped. Fix.Ben Orenstein2011-03-051-3/+3
|