Jump to content
Larry Ullman's Book Forums

Recommended Posts

I have just noticed a problem running the regex "matches.php" and "pcre.php" pages in Chapter 13. The problem is probably present in all forms, not just the ones in this chapter, but I guess this the first time I started throwing escape characters into form fields.

 

Basically if I type "\" in the form element "pattern", I get "\\" in from $_POST['pattern']. Any and all escape characters get doubled. This obviously breaks the pattern matches in this chapter's examples, but could be a real pain down the road.

 

This doesn't seem to be browser specific, as it happens in Safari, Firefox and Chrome.

 

Setup information:

Mac OS 10.6

Development server is MAMP running PHP 5.3.5.

 

 

EDIT: Never mind, fixed it. Missing magic quotes pref in ini file.

Link to comment
Share on other sites

 Share

×
×
  • Create New...