php - What is the reason of using strip_tag or a write list for text input -
this question has answer here:
i know both use prevent xss attack. when use htmlspecialchars , seems ok. <script>
, <?php ?>
displayed on screen. means not functioning, right? so, question , htmlspecialchars enough preventing xss. if so, reason using strip_tag or white list of tag?
htmlspecialchars
safe enough. common displays same user typed, makes harmless. strip_tags
takes tags away, usefull alot of other things.
Comments
Post a Comment