Issue updating HTMLEditFormat to EncodeForHTML

I am facing issue when updating this function as CF25 don’t support old one and will be deprecated, but moreover in input field and in cfset its encoding @ also to @ and also when I use encodeForHTMLAttribute then also found same but this is happening all over project where as earlier HTMLEditFormat was being used in all 3 places i.e input field, cfset like setting values and also in output display and code has no issues there