ag-grid-odata
ag-grid-odata copied to clipboard
BUG: Filter can't handle special characters (eg. &)
When filtering with values containing special characters it might fail.
You should encode values for use in uri when building the query string.
Suggestion for change in toQuery
:
if (options.sort && options.sort.length > 0) {
path.push("$orderby=" + encodeURIComponent(options.sort.join(",")));
}
if (options.filter && options.filter.length > 0) {
path.push("$filter=" + encodeURIComponent(options.filter.join(" and ")));
}
if (options.apply && options.apply.length > 0) {
path.push("$apply=" + encodeURIComponent(options.apply.join("/")));
}
if (options.expand && options.expand.length > 0) {
path.push("$expand=" + encodeURIComponent(options.expand.join(",")));
}
if (options.select && options.select.length > 0) {
path.push("$select=" + encodeURIComponent(options.select.join(",")));
}