Skip to content

Commit

Permalink
- This really, really tiny change fixes a problem that people had wit…
Browse files Browse the repository at this point in the history
  • Loading branch information
yankidank committed Dec 18, 2013
1 parent 1d72393 commit 698bde0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function do_submit1() {
$main_smarty->assign('Submit_Require_A_URL', Submit_Require_A_URL);

// check if URL is valid format
$pattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w]([-\d\w]{0,253}[\d\w])?\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.,\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.,\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.,\/\d\w]|%[a-fA-f\d]{2,2})*)?$/';
$pattern = '/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w]([-\d\w]{0,253}[\d\w])?\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.,\d\w]|%[a-fA-f\d]{2,2})*)*(\??(&?([-+_~.,\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.,\/\d\w]|%[a-fA-f\d]{2,2})*)?$/';
$isLink = preg_match($pattern, $url); // Returns true if a link

if($url == "http://" || $url == ""){
Expand Down

0 comments on commit 698bde0

Please sign in to comment.