Is it safe to use input Filter and output transcoding in conjunction with httponly for XSS attacks?

during the Tencent interview the day before yesterday, I was asked a question: XSS attack is it safe to use input Filter and output transcoding with httponly ? (you"d better paste the code and give chestnut instructions, thank you)

Jul.25,2021

if there is something like a html editor on the page, you need to drop some tags and attributes on Filter, such as < link >, < script > < iframe > tags, element events, image onerror and so on.
link changes the style. Script tags can introduce harmful js. Element events and some attributes have the ability to execute js code (such as the onerror attribute of img)

for example,
< script src= " http://a/danger.js";>
http://danger.com'">


Brother Meituan recently released a column against XSS attacks. You can take a look. It is clear that XSS has no absolute defense method. It can only be said that through the cooperation of the front and back ends of their own code specifications to avoid XSS attacks. I hope you can read that article is very nutritious, I also have a collection of specific methods to prevent XSS. I hope it will be of some help to you.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35bb3-e508.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35bb3-e508.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?