asset_packager
asset_packager copied to clipboard
Helpers should return safe html
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.
Implemented here: http://github.com/fnando/asset_packager/tree/rails3
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
This should be merged into master.
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)
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.