diff options
Diffstat (limited to 'app/assets/javascripts/locale')
-rw-r--r-- | app/assets/javascripts/locale/sprintf.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/locale/sprintf.js b/app/assets/javascripts/locale/sprintf.js index a3557fbf3fb..7ab4e725d99 100644 --- a/app/assets/javascripts/locale/sprintf.js +++ b/app/assets/javascripts/locale/sprintf.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { escape } from 'lodash'; /** Very limited implementation of sprintf supporting only named parameters. @@ -17,7 +17,7 @@ export default (input, parameters, escapeParameters = true) => { if (parameters) { Object.keys(parameters).forEach(parameterName => { const parameterValue = parameters[parameterName]; - const escapedParameterValue = escapeParameters ? _.escape(parameterValue) : parameterValue; + const escapedParameterValue = escapeParameters ? escape(parameterValue) : parameterValue; output = output.replace(new RegExp(`%{${parameterName}}`, 'g'), escapedParameterValue); }); } |