diff --git a/link.module b/link.module
index 4be7309..dd8f95b 100644
--- a/link.module
+++ b/link.module
@@ -1043,8 +1043,8 @@ function link_validate_url($text) {
   $external_pattern = '/^'. $protocol .'?'. $authentication .'?('. $domain .'|'. $ipv4 .'|'. $ipv6 .' |localhost)'. $port .'?';
 
   // Pattern specific to internal links.
-  $internal_pattern = "/^(?:[a-z0-9". $LINK_ICHARS ."_\-+\[\]]+)";
-  $internal_pattern_file = "/^(?:[a-z0-9". $LINK_ICHARS ."_\-+\[\]\.]+)$/i";
+  $internal_pattern = "/^(?:[a-z0-9". $LINK_ICHARS ."_\-+\[\] ]+)";
+  $internal_pattern_file = '/[^\0]+/';
 
   $directories = "(?:\/[a-z0-9". $LINK_ICHARS ."_\-\.~+%=&,$'#!():;*@\[\]]*)*";
   // Yes, four backslashes == a single backslash.
@@ -1076,7 +1076,7 @@ function link_validate_url($text) {
   if (preg_match($external_pattern . $end, $text)) {
     return LINK_EXTERNAL;
   }
-  if (preg_match($internal_pattern_file, $text)) {
+  if (preg_match($internal_pattern_file, $text) && is_file($text)) {
     return LINK_INTERNAL;
   }
 
