Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bd4e7c98
Commit
bd4e7c98
authored
Aug 10, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stricter RFC1788 obeying UrlEncode
parent
fd014e1e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
include/network.h
include/network.h
+9
-7
No files found.
include/network.h
View file @
bd4e7c98
...
...
@@ -222,19 +222,23 @@ static inline void vlc_UrlClean( vlc_url_t *url )
static
inline
char
*
vlc_UrlEncode
(
const
char
*
psz_url
)
{
char
*
psz_enc
,
*
out
;
const
char
*
in
;
const
unsigned
char
*
in
;
psz_enc
=
(
char
*
)
malloc
(
3
*
strlen
(
psz_url
)
+
1
);
if
(
psz_enc
==
NULL
)
return
NULL
;
out
=
psz_enc
;
for
(
in
=
psz_url
;
*
in
;
in
++
)
for
(
in
=
(
const
unsigned
char
*
)
psz_url
;
*
in
;
in
++
)
{
unsigned
char
c
=
*
(
unsigned
char
*
)
in
;
unsigned
char
c
=
*
in
;
if
(
(
c
<=
32
)
||
(
c
==
'%'
)
||
(
c
==
'?'
)
||
(
c
==
'&'
)
||
(
c
==
'+'
)
||
(
c
>=
128
)
)
if
(
(
(
unsigned
char
)(
c
-
'a'
)
<
26
)
||
(
(
unsigned
char
)(
c
-
'A'
)
<
26
)
||
(
(
unsigned
char
)(
c
-
'9'
)
<
10
)
||
strchr
(
"$-_.+!*'(),"
,
c
)
!=
NULL
)
*
out
++
=
(
char
)
c
;
else
{
*
out
++
=
'%'
;
*
out
++
=
(
(
c
>>
4
)
>=
0xA
)
?
'A'
+
(
c
>>
4
)
-
0xA
...
...
@@ -242,8 +246,6 @@ static inline char *vlc_UrlEncode( const char *psz_url )
*
out
++
=
(
(
c
&
0xf
)
>=
0xA
)
?
'A'
+
(
c
&
0xf
)
-
0xA
:
'0'
+
(
c
&
0xf
);
}
else
*
out
++
=
(
char
)
c
;
}
*
out
++
=
'\0'
;
...
...
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