timneyb Posted May 17, 2011 Share Posted May 17, 2011 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 More sharing options...
HartleySan Posted May 18, 2011 Share Posted May 18, 2011 Was just about to say that it's probably a magic quotes issue, but then you answered it yourself. Nice work. 1 Link to comment Share on other sites More sharing options...
Recommended Posts