How do you escape/clean $queryString params?

I am trying to pass a query param from an email and send it via a livewire form to an email and also to stored in a db so that I can track if the enquiry came via the email.

Example url:
www.someurl.com/?code=123ref
in my Component.php I have:
` public $code = ‘’;

protected $queryString =[
    'code' => ['except' => ''],
];`

in my component.blade.php I have:
<input type="hidden" name="code" wire:model="code">

How do I escape the query param to stop malicious code passing to the form?
Thanks

Hi!
What kind of rquest is accepting your route? You should pass parameters in the URL
www.someurl.com/code/123ref and pass during the mount methode to variables

Use the e helper function.

echo e('<html>Hi</html>');

/* &lt;html&gt;Hi&lt;/html&gt; */

Thanks for your help