Commit 21af7fc7 authored by danielkorte's avatar danielkorte Committed by pifagor
Browse files

Issue #3041220 by Daniel Korte, nileema.jadhav, Deepak.Sharma, pifagor: False...

Issue #3041220 by Daniel Korte, nileema.jadhav, Deepak.Sharma, pifagor: False positive in link_validate_url() function with relative URLs with fragments
parent 2df0dbe7
......@@ -1447,7 +1447,7 @@ function link_validate_url($text, $langcode = NULL) {
$type = link_url_type($text);
if ($type && ($type == LINK_INTERNAL || $type == LINK_EXTERNAL)) {
$flag = valid_url($text, TRUE);
$flag = valid_url($text, $type == LINK_EXTERNAL);
if (!$flag) {
$normal_path = drupal_get_normal_path($text, $langcode);
$parsed_link = parse_url($normal_path, PHP_URL_PATH);
......
......@@ -650,6 +650,7 @@ class LinkValidateUrlLight extends DrupalWebTestCase {
$tempfile = drupal_tempnam('public://files', 'test');
$links = array(
'rss.xml',
'foo#bar',
file_uri_target($tempfile),
drupal_realpath($tempfile),
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment