Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
5192c7c9
Commit
5192c7c9
authored
Jul 08, 2014
by
Jörg Bleyel
Committed by
Felix Paul Kühne
Jul 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't prepend http:// if already exists
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
69362184
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Sources/VLCAppDelegate.m
Sources/VLCAppDelegate.m
+6
-3
No files found.
Sources/VLCAppDelegate.m
View file @
5192c7c9
...
...
@@ -146,9 +146,12 @@
/* Safari & al mangle vlc://http:// so fix this */
if
(
location
!=
NSNotFound
&&
[
parsedString
characterAtIndex
:
location
-
1
]
!=
0x3a
)
{
// :
parsedString
=
[
NSString
stringWithFormat
:
@"%@://%@"
,
[
parsedString
substringToIndex
:
location
],
[
parsedString
substringFromIndex
:
location
+
2
]];
}
else
parsedString
=
[
@"http://"
stringByAppendingString
:[
receivedUrl
substringFromIndex
:
6
]];
}
else
{
parsedString
=
[
receivedUrl
substringFromIndex
:
6
];
if
(
!
[
parsedString
hasPrefix
:
@"http://"
]
&&
!
[
parsedString
hasPrefix
:
@"https://"
]
&&
!
[
parsedString
hasPrefix
:
@"ftp://"
])
{
parsedString
=
[
@"http://"
stringByAppendingString
:[
receivedUrl
substringFromIndex
:
6
]];
}
}
url
=
[
NSURL
URLWithString
:
parsedString
];
}
}
...
...
Write
Preview
Markdown
is supported
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