Fixed: encode umlauts for filter
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
df178c8186
commit
38d434aef8
|
@ -24,7 +24,7 @@ abstract class Filter extends Data
|
||||||
public static function fromRequest(array|string|null $request = null): static
|
public static function fromRequest(array|string|null $request = null): static
|
||||||
{
|
{
|
||||||
$payload = is_string($request)
|
$payload = is_string($request)
|
||||||
? json_decode(base64_decode($request), true)
|
? json_decode(rawurldecode(base64_decode($request)), true)
|
||||||
: $request;
|
: $request;
|
||||||
|
|
||||||
return static::fromPost($payload);
|
return static::fromPost($payload);
|
||||||
|
|
|
@ -9,7 +9,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filterString() {
|
filterString() {
|
||||||
return btoa(JSON.stringify(this.inner.meta.filter));
|
return btoa(encodeURIComponent(JSON.stringify(this.inner.meta.filter)));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -192,9 +192,9 @@ class IndexTest extends TestCase
|
||||||
{
|
{
|
||||||
$this->withoutExceptionHandling()->login()->loginNami();
|
$this->withoutExceptionHandling()->login()->loginNami();
|
||||||
|
|
||||||
$searchResponse = $this->callFilter('member.index', ['search' => 'Max']);
|
$searchResponse = $this->callFilter('member.index', ['search' => 'Maxö']);
|
||||||
|
|
||||||
$this->assertInertiaHas('Max', $searchResponse, 'data.meta.filter.search');
|
$this->assertInertiaHas('Maxö', $searchResponse, 'data.meta.filter.search');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testItLoadsGroups(): void
|
public function testItLoadsGroups(): void
|
||||||
|
|
|
@ -20,7 +20,7 @@ trait MakesHttpCalls
|
||||||
public function filterUrl(string $routeName, array $filter): string
|
public function filterUrl(string $routeName, array $filter): string
|
||||||
{
|
{
|
||||||
$params = [
|
$params = [
|
||||||
'filter' => base64_encode(json_encode($filter)),
|
'filter' => base64_encode(rawurlencode(json_encode($filter))),
|
||||||
];
|
];
|
||||||
|
|
||||||
return route($routeName, $params);
|
return route($routeName, $params);
|
||||||
|
|
Loading…
Reference in New Issue