Reflected Cross-Site scripting (XSS)

Hi all,
I'm trying to find a way to prevent XSS, for example if an user try to write some script in URL of the application.
There is a way to sanitize the input of the value of parameter, removing special characters like ', <, >, ( etc?
For example typing the URL followed by a code (http://127.0.0.1:88/$/StartCheck? < svg/onload=alert(1)>) someone can redirect or execute script in uor application.
Thanks in advance!
I'm trying to find a way to prevent XSS, for example if an user try to write some script in URL of the application.
There is a way to sanitize the input of the value of parameter, removing special characters like ', <, >, ( etc?
For example typing the URL followed by a code (http://127.0.0.1:88/$/StartCheck? < svg/onload=alert(1)>) someone can redirect or execute script in uor application.
Thanks in advance!