Procházet zdrojové kódy

Merge pull request #432 from webnotes/hotfix

Encode URI component in link field formatter
version-14
Nabin Hait před 11 roky
rodič
revize
5c595f3e11
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +4
    -3
      public/js/wn/form/formatters.js

+ 4
- 3
public/js/wn/form/formatters.js Zobrazit soubor

@@ -35,9 +35,10 @@ wn.form.formatters = {
if(!value) if(!value)
return ""; return "";
if(docfield && docfield.options) { if(docfield && docfield.options) {
return repl('%(icon)s<a href="#Form/%(doctype)s/%(name)s">%(name)s</a>', {
doctype: docfield.options,
name: value,
return repl('%(icon)s<a href="#Form/%(doctype)s/%(name)s">%(label)s</a>', {
doctype: encodeURIComponent(docfield.options),
name: encodeURIComponent(value),
label: value,
icon: (options && options.no_icon) ? "" : icon: (options && options.no_icon) ? "" :
('<i class="icon-fixed-width '+wn.boot.doctype_icons[docfield.options]+'"></i> ') ('<i class="icon-fixed-width '+wn.boot.doctype_icons[docfield.options]+'"></i> ')
}); });


Načítá se…
Zrušit
Uložit