|
|
Doesn't work with "quotes"
I constantly use select quotes in searches. For example I might search for:
Doesn't work with "quotes"
Change this:
$q = urldecode($_GET['q']); to this: $q = urldecode(stripslashes($_GET['q'])); This assumes that magic_quotes_gpc is ON (that's what is escaping the quotes in the first place), but shouldn't have any negative effect if it's off.
I made this fix in my lazysearch script as well.
Thanks!
You rock man....
Doesn't work with "quotes"
actually, it will cause problems if magic quoting is off... it will eat any backslashes. The following code checks first to see if they are on or not:
if you ever distribute the script, it should check for magic quoting something like that.
Yes
You're correct -- when I said it was unlikely to cause problems I was referring to the fact that the backslash is not a meaningful character for most search engines. But your way (with proper bracketing of course) is safest. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.42 seconds |
|