Urldecode & urlencode deprecated

Hi,

I was using urldecode and urlencode for my filtering tags but with php 8.2, it is deprecated, do you know how to modify it correctly ?

In my controller :

if ($tag = urldecode(param('tag'))) {
      $articles = $articles->filterBy('tags', $tag, ',');
   }

In my template :

href="<?= url($site->find('programme')->url(), ['params' => ['tag' => urlencode($category)]]) ?>"

Where did you find this information? I don’t think this is the case. Do you get an error message?

Having said that, I think Kirby rawurlencode()s your strings when using the url() helper with the params attribute, so using urlencode() won’t have an effect.

I should keep a screenshot of the debug mode saying " urlencode() is deprecated…because I know that it is not with PHP 8.2

But it appears that removing all urlencode and urldecode from the code is working well now, with special characters and space bewteen words.

Thx