diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index 79a0ba56..dfd5f2f5 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -23,6 +23,6 @@
\==================================================
/ Placed at the end of the document so the pages load faster
:javascript
- I18n = {locale: '#{I18n.locale}'}
+ I18n = {locale: '#{j(I18n.locale.to_s)}'}
= javascript_include_tag "application"
= yield(:javascript)