Discussion:
[PATCH] xdg-open: fix regression from 13d9b0c where & gets replaced with \\& in URLs
Jimmie Elvenmark
2015-03-23 18:11:35 UTC
Permalink
The characters doesn't need to be prefixed as they don't get
passed to sed anymore. Example: xdg-open 'https://www.google.se/?a=b&c=d'
---
scripts/xdg-open.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 678eae4..9964244 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -195,7 +195,7 @@ search_desktop_file()
;;
%[fFuU])
replaced=1
- arg="$(echo $target | sed 's/[&*\\]/\\\\&/g')"
+ arg="$target"
shift
set -- "$@" "$arg"
;;
--
2.3.3
Rex Dieter
2015-03-24 01:39:56 UTC
Permalink
committed, thanks.

-- rex
Post by Jimmie Elvenmark
The characters doesn't need to be prefixed as they don't get
passed to sed anymore. Example: xdg-open 'https://www.google.se/?a=b&c=d'
---
scripts/xdg-open.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 678eae4..9964244 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -195,7 +195,7 @@ search_desktop_file()
;;
%[fFuU])
replaced=1
- arg="$(echo $target | sed 's/[&*\\]/\\\\&/g')"
+ arg="$target"
shift
;;
Loading...