Prevent Code based words in Assigned to and Email Dialogue Box

Dear Community,

in sales Invoice Doctype , we had Filter option under it has Assigned to while open dialogue box it assigned here it also allow code based language like < or > etc, how to restrict the code signs.

Also need in Email dialogue box

image

how to prevent code based language in fields