Skip to content

Commit

Permalink
add xss option to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Sep 27, 2010
1 parent 4af595f commit 32890ae
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Readme.md
Expand Up @@ -99,6 +99,13 @@ You do not have to translate this into english "Model", if you use the
namespace-aware translation
s_('Car|Model') == 'Model' #when no translation was found

XSS / html_safe
===============
If you trust your translators and all your usages of % on translations:
(% on string is atm buggy with always staying html_safe, no matter what was replaced)
# config/environment.rb
GettextI18nRails.translations_are_html_safe = true

ActiveRecord - error messages
=============================
ActiveRecord error messages are translated through Rails::I18n, but
Expand Down Expand Up @@ -148,6 +155,12 @@ Sometimes translations like `_("x"+"u")` cannot be fond. You have 4 options:
- add a Logger to a translation Chain, so every unfound translations is logged ([example]((http://github.com/grosser/fast_gettext)))


TODO
=====
- add Railtie for rake tasks on Rails 3
- fix % on string to respect html_safe: `("<a>%{x}</a>".html_safe % {:x=>'<script>y</script>'})` should escape the `<script>y</script>` part)
- refactor Readme

Contributors
======
- [ruby gettext extractor](http://github.com/retoo/ruby_gettext_extractor/tree/master) from [retoo](http://github.com/retoo)
Expand Down

0 comments on commit 32890ae

Please sign in to comment.