Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
2016-06-03 16:45:27 +0800
Commit
89c8510eb587da93318a300179a62d4d6186c8d5
1 parent
13d8557c
url 判断是否包含http
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
library/Plugin/Helpers.php
library/WebPlugin/Helpers.php
library/Plugin/Helpers.php
View file @
89c8510
...
...
@@ -943,6 +943,10 @@ class Helpers
*/
public
static
function
getUrlSafe
(
$url
)
{
if
(
stripos
(
$url
,
'http://'
))
{
return
'//'
.
ltrim
(
strtr
(
$url
,
array
(
'http://'
=>
''
,
'https://'
=>
''
)),
'//'
);
}
return
$url
;
}
}
...
...
library/WebPlugin/Helpers.php
View file @
89c8510
...
...
@@ -1098,6 +1098,10 @@ class Helpers
*/
public
static
function
getUrlSafe
(
$url
)
{
if
(
stripos
(
$url
,
'http://'
))
{
return
'//'
.
ltrim
(
strtr
(
$url
,
array
(
'http://'
=>
''
,
'https://'
=>
''
)),
'//'
);
}
return
$url
;
}
}
...
...
Please
register
or
login
to post a comment