Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
link
Commits
cc91389d
Commit
cc91389d
authored
Dec 13, 2006
by
Nathan Haug
Browse files
Correct regex preventing links from being entered. Issue #100366
parent
dbd748a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
link.module
View file @
cc91389d
...
@@ -340,7 +340,7 @@ function link_validate_url($text) {
...
@@ -340,7 +340,7 @@ function link_validate_url($text) {
$external_pattern
=
$external_pattern
=
// protocol
// protocol
'/^('
.
$allowed_protocols
.
':\/\/)?'
.
'/^(
(
'
.
$allowed_protocols
.
'
)
:\/\/)?'
.
'('
.
'('
.
// domains
// domains
'(([a-z0-9]([a-z0-9\-_]*\.)+)(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|mobi|[a-z]{2}))'
.
'(([a-z0-9]([a-z0-9\-_]*\.)+)(aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel|mobi|[a-z]{2}))'
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment