Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple_format should not edit it in place. (Fixes https://github.com/rails/rails/issues/1980) #2421

Merged
merged 1 commit into from
Aug 4, 2011

Conversation

pivotal-casebook
Copy link

ActionView::Helpers::TextHelper#simple_format should not change the text in place. Now it duplicates it.

simple_format should not edit the string in place, but rather should duplicate and return a modified copy. We were running into the cumulative paragraphs error (see #1980). Also note that this was changing the string pointed to by the model, if only for the duration of the request. This is bad.

spastorino added a commit that referenced this pull request Aug 4, 2011
Simple_format should not edit it in place. (Fixes #1980)
@spastorino spastorino merged commit d7e55c3 into rails:master Aug 4, 2011
@bdimcheff
Copy link

Any chance someone can backport this to 3-0-stable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants