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

Helpers should return safe html #11

Open
fnando opened this issue Feb 6, 2010 · 5 comments
Open

Helpers should return safe html #11

fnando opened this issue Feb 6, 2010 · 5 comments

Comments

@fnando
Copy link

fnando commented Feb 6, 2010

All HTML strings should be marked as safe on Rails 3; otherwise, the tags will be escaped.

You can do this by calling the "html_safe" method before returning the strings.

@fnando
Copy link
Author

fnando commented Feb 10, 2010

Implemented here: http://github.com/fnando/asset_packager/tree/rails3

@lardawge
Copy link

Fix for this is here (link above not working). This will work for rails >= 2.3.6 as well as 3.0.

http://github.com/lardawge/asset_packager/commit/eb633dea77fe8ddd19dfd1e43bf7afcc895abb63

@airhorns
Copy link

This should be merged into master.

@chip
Copy link

chip commented Mar 30, 2011

Excellent work on this repo! Is it still actively maintained?

The reason I ask is that I am running into the same Rails 3 issue, downloaded the latest repository and cannot find evidence of the html_safe fix. I intended on writing a test submitting a patch, but running "rake test:plugins PLUGIN=asset_manager" returned this error:

➜ rake test:plugins PLUGIN=asset_packager
(in /Users/deploy/Sites/rails_invoice)
/Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in require': no such file to load -- action_controller/test_process (LoadError) from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:inrequire'
from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:innew_constants_in'
from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in load_dependency' from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:inrequire'
from ./vendor/plugins/asset_packager/test/asset_package_helper_development_test.rb:9
from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in load' from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:ineach'
from /Users/deploy/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/Users/deploy/.rvm/rubies/ree-1.8.7-2010.0...]

(See full trace by running task with --trace)

@avitus
Copy link

avitus commented Apr 7, 2011

Had same problem with the html_safe code not being included in the library I downloaded. Fixed it myself but makes me wonder what else is missing now.

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

No branches or pull requests

5 participants