lukemods / phurl

Automatically exported from code.google.com/p/phurl
0 stars 0 forks source link

URL with single quotes ( ' ) don't work #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter the URL to shorten, containing a ' (example
http://veekun.com/dex/pokemon/farfetch'd)
2. Shorten

What is the expected output? What do you see instead?
The expected output would be the URL I entered. Instead, the shortened
version links to http://veekun.com/dex/pokemon/farfetch\\\'d, which doesn't
work.

What version of the product are you using? On what operating system?
Phurl 2.0.0 BETA 2 (it worked with the non-beta version I had before, but I
don't remember the version number). Mac OS X.

Original issue reported on code.google.com by monaminemo@hotmail.com on 15 Nov 2009 at 10:03

GoogleCodeExporter commented 9 years ago
This is because of the mysql_real_escape_string() function to stop sql 
injection attacks.

Original comment by cookjord...@gmail.com on 25 May 2010 at 6:04

GoogleCodeExporter commented 9 years ago

Original comment by cookjord...@gmail.com on 25 May 2010 at 6:31

GoogleCodeExporter commented 9 years ago
This should be fixed as it is a block for some sites. I believe it can be fixed 
using a simple stripslashes() after the URL is retrieved from the database - 
you would still maintain the mysql_real... functionality without breaking some 
urls

Original comment by dcedr...@gmail.com on 3 Jul 2010 at 5:43