diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index e245dc8d95..dace217ce5 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -315,6 +315,8 @@ export const Et2WithSearchMixin = >(superclass if(changedProperties.has("searchUrl") && this.searchUrl) { this.search = true; + // Decode URL, possibly again. If set in template, it can wind up double-encoded. + this.searchUrl = this.egw().decodePath(this.searchUrl); } } @@ -840,7 +842,7 @@ export const Et2WithSearchMixin = >(superclass */ protected remoteQuery(search : string, options : object) { - return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.searchUrl), + return this.egw().request(this.egw().link(this.egw().ajaxUrl(this.egw().decodePath(this.searchUrl)), {query: search, ...options}), [search, options]).then((result) => { this.processRemoteResults(result); diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index df03d18c60..a00301485f 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -1461,6 +1461,11 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes) attrValue = widget.egw().lang(attrValue); } } + else if(attrValue && [Object, Array].indexOf(typeof property === "object" ? property.type : property) != -1) + { + // Value was not supposed to be a string, but was run through here for expandName + attrValue = JSON.parse(attrValue); + } break; }