Jump to content
Larry Ullman's Book Forums

Chapter 5 Script 5.4


Recommended Posts

Greetings while goofing around with script 5.4 I had an interesting result no errors were reported. I typed in an incomplete URL <a href="http://www.somedomain.com and the results were interesting I got a link to no where in the response. The sentence outside of the php code is a proper html paragraph and worked fine until I got this. I believe it worked as it should for my other tests. Comments?

 

Script_5_4_results.jpg

Link to comment
Share on other sites

Good test! The strip_tags() function requires syntactically valid HTML (or whatever) to work. With an opening A that's not closed, strip_tags() can't see the HTML in order to strip it out. If that's a concern for you with something like this, you could apply strip_tags() and then htmlentities() as an extra precaution.

Link to comment
Share on other sites

 Share

×
×
  • Create New...