Commit Diff


commit - 7778664471978474be9f5b361beda24f6c53a632
commit + 518df2473eeea72f9ffe9e2b246d99e42230bade
blob - a9e39fb8e353ac0cb20f80fdfa911dd00ba31ca0
blob + 4d96623819f8e3bf27bb7b516f61964e9239cde3
--- index.php
+++ index.php
@@ -23,7 +23,7 @@ function count_urls($mysqli) {
 }
 
 function generate_short($url, $mysqli) {
-	$url = stripslashes($url);
+	$url = mysqli_real_escape_string($mysqli, $url);
 	if(!preg_match("/^((https?|ftp)[:\/\/].*\/{2,})/i",$url)) {
 		return false;
 	}