| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Previously default translation keys that didn't end in `_html`, but came
after a missing key that ended in `_html` were being returned as
html_safe. Now they are not. Fixes #18257
|
|
|
|
| |
not required include ActionView::Helpers::TagHelper in test as well
|
| |
|
| |
|
|
|
|
| |
`options[:default]` and `options[:raise]` can be mistakenly added to the `options` hash. This can be a problem if you're reusing the same object.
|
|
|
|
|
| |
Add a config to setup whether raise exception for missing translation or
not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before ec16ba75a5493b9da972eea08bae630eba35b62f,
ActionView::Helpers::TranslationHelper#translate has raised errors with
specifying options[:raise] to true.
This should work by this fix:
begin
t(:"translations.missing", raise: true)
rescue I18n::MissingTranslationData
p :hello!
end
|
|
|
|
|
|
|
|
|
| |
i18n doesn't depend on active support which means it can't use our html_safe
code to do its escaping when generating the spans. Rather than try to sanitize
the output from i18n, just revert to our old behaviour of rescuing the error
and constructing the tag ourselves.
Fixes: CVE-2013-4491
|
|
|