diff --git a/public/js/wn/form/formatters.js b/public/js/wn/form/formatters.js index 398065afd2..1f75eef90c 100644 --- a/public/js/wn/form/formatters.js +++ b/public/js/wn/form/formatters.js @@ -35,9 +35,10 @@ wn.form.formatters = { if(!value) return ""; if(docfield && docfield.options) { - return repl('%(icon)s%(name)s', { - doctype: docfield.options, - name: value, + return repl('%(icon)s%(label)s', { + doctype: encodeURIComponent(docfield.options), + name: encodeURIComponent(value), + label: value, icon: (options && options.no_icon) ? "" : (' ') });