Xss attacks protect

In filament when i try adding script alert to text input it show me alert in page. it is dangerous. how can i protect from xss attack?
Was this page helpful?