Commit e6c28ae3 authored by Nathan Haug's avatar Nathan Haug
Browse files

*Commas and colons are now allowed in the URL query string. Issue #80465. Thanks karna

parent 500b2140
......@@ -326,9 +326,9 @@ function _link_field_view($field, $value, $addlfields = array(), $node = NULL) {
if (strlen(trim($value['title']))) {
$output = l($value['title'],$value['link'],$attributes);
}
// Build the link with the URL as the title
// Build the link with the URL as the title (max 80 characters)
else {
$output = l($value['link'],$value['link'],$attributes);
$output = l(strlen($value['link']) > 80 ? substr($value['link'],0,80)."..." : $value['link'],$value['link'],$attributes);
}
return $output;
}
......@@ -412,7 +412,7 @@ function link_validate_link($text) {
// port number
'(:([0-9]{1,4}))?'.
// the rest of the path
'(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.\/%=&]*)?)?'.
'(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.\/%=&,:]*)?)?'.
// forward slash 0 or 1 times
'(\/)?'.
// end of the expression, case insensitive
......
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