Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
39b600e9
Unverified
Commit
39b600e9
authored
May 15, 2022
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lib): encode all arguments besides the first in `omz_urlencode`
Fixes
https://github.com/ohmyzsh/ohmyzsh/commit/140c977a3d82410f48c198596de193d2d6b7b9b5#commitcomment-73688165
parent
dfee71c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
functions.zsh
lib/functions.zsh
+2
-2
No files found.
lib/functions.zsh
View file @
39b600e9
...
...
@@ -144,7 +144,7 @@ zmodload zsh/langinfo
# Returns nonzero if encoding failed.
#
# Usage:
# omz_urlencode [-r] [-m] [-P] <string>
# omz_urlencode [-r] [-m] [-P] <string>
[<string> ...]
#
# -r causes reserved characters (;/?:@&=+$,) to be escaped
#
...
...
@@ -156,7 +156,7 @@ function omz_urlencode() {
local
-a
opts
zparseopts
-D
-E
-a
opts r m P
local
in_str
=
$1
local
in_str
=
"
$@
"
local
url_str
=
""
local
spaces_as_plus
if
[[
-z
$opts
[(
r
)
-P
]
]]
;
then
spaces_as_plus
=
1
;
fi
...
...
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