Use escapejs filter on JavaScript strings

The escapejs filter will correctly escape single quotes from JavaScript
strings which may otherwise trigger syntax errors. In this case, the
issue was visible using the French translation.

Also removed a trailing paranthesis coming out of nowhere.

Change-Id: I25001815e17be5afa8eb28cc28c5423e3dcd973c
Closes-Bug: #1311047
(cherry picked from commit bc6f40b51d53682054cc4ba28b55b5045d6c8605)
Merge "Use escapejs filter on JavaScript strings" into stable/icehouse