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
escape tag problems #29
Comments
Sorry, I think part of your code was escaped by Github. Could you please post again? |
What do you mean with post again ? The only code on this matter is , that is when one has an has many association the show_for do not display a list but e.g the text
i.e show_for do not use html_safe on association lists |
Could you please check if you've changed the @@default_collection_proc = lambda { |value| "<li>#{ERB::Util.html_escape(value)}</li>".html_safe } But the initializer that's copied to your application has this example: # The default iterator to be used when invoking a collection/association.
# config.default_collection_proc = lambda { |value| "<li>#{value}</li>" } Which does not contain the escape/html safe part, that might be the issue. I'll update the template with the proper fix, but please check your config. Thanks. |
I have used the he default iterator to be used when invoking a collection/association config.default_collection_proc = lambda { |value| "I think that was the default in the configuration file I got I have now changed it as you suggested and it works Hans Marmolin 25 jan 2012 kl. 01.24 skrev Carlos Antonio da Silva:
|
Carlos Hans Marmolin 25 jan 2012 kl. 01.24 skrev Carlos Antonio da Silva:
|
Glad to know it's working now. Btw, I forgot to ask which version are you using? About blank values, I think they can be configured in your locale file generated by ShowFor. |
I use the gem specification in bundle You cannot use html-tags in the locale file if you dont has a blank_html key or or add a html key, I think. One cannot ad .html_safe to the yaml file. or sv: and that should require some change in the code Hans Marmolin 25 jan 2012 kl. 11.49 skrev Carlos Antonio da Silva:
|
It is possible to use html in the yaml files, but the |
When using your excellent show_for in a rails 3.1 application as follows
the result is
Groups:
I think you forgot to add html_safe to some content_tag. If you have content in content each part has t have a html_safe according to my experience
The text was updated successfully, but these errors were encountered: