I\'m sure that the answer to this question is No, but I can\'t seem to find a way that simply transforming < and > to < and <
<
>
Not all XSS attacks include < or > at all, depending on where the data is being inserted.
https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#Why_Can.27t_I_Just_HTML_Entity_Encode_Untrusted_Data.3F