Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Feeds
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Feeds
Commits
69f261c4
Commit
69f261c4
authored
3 years ago
by
Andrew Dolgov
Browse files
Options
Downloads
Patches
Plain Diff
revise previous a little bit
parent
e9c062a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/urlhelper.php
+3
-3
3 additions, 3 deletions
classes/urlhelper.php
with
3 additions
and
3 deletions
classes/urlhelper.php
+
3
−
3
View file @
69f261c4
...
...
@@ -31,8 +31,8 @@ class UrlHelper {
*
* @param string $base_url Base URL (i.e. from where the document is)
* @param string $rel_url Possibly relative URL in the document
* @param string $owner_element Owner
node
tag name (i.e.
A
) (optional)
* @param string $owner_attribute Owner attribute (i.e. href) (optional)
* @param string $owner_element Owner
element
tag name (i.e.
"a"
) (optional)
* @param string $owner_attribute Owner attribute (i.e.
"
href
"
) (optional)
*
* @return string Absolute URL
*/
...
...
@@ -47,7 +47,7 @@ class UrlHelper {
}
else
if
(
strpos
(
$rel_url
,
"//"
)
===
0
)
{
return
self
::
validate
(
"https:"
.
$rel_url
);
// allow some extra schemes for A href
}
else
if
(
in_array
(
$rel_parts
[
"scheme"
]
??
""
,
self
::
EXTRA_HREF_SCHEMES
)
&&
}
else
if
(
in_array
(
$rel_parts
[
"scheme"
]
??
""
,
self
::
EXTRA_HREF_SCHEMES
,
true
)
&&
$owner_element
==
"a"
&&
$owner_attribute
==
"href"
)
{
return
$rel_url
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment