php - What is the reason of using strip_tag or a write list for text input -


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

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -