Kaydet (Commit) fcdde111 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

fdo#69462 Properly escape URL in Mozilla -remote openURL(...) command

Verbatim ")" or "," in the URL will apparently cause problems when Mozilla-
derived browsers parse the openURL(...) command (see
<http://www-archive.mozilla.org/unix/remote.html> "remote control of unix
mozilla"), so percent-escape all "(", ")", and "," in the URL.  Also, remove the
space before "new-window" as "Commands should /not/ have spaces in them" (see
link above).

Change-Id: I4b0f3f6a19c94ed9346bb6c55e77d6eae82baba2
üst 7ff0a2e4
...@@ -38,7 +38,9 @@ run_mozilla() { ...@@ -38,7 +38,9 @@ run_mozilla() {
if [ $? -eq 2 ]; then if [ $? -eq 2 ]; then
"$1" "$2" & "$1" "$2" &
else else
"$1" -remote "openURL($2, new-window)" & "$1" -remote \
"openURL($(printf '%s' "$2" \
| sed -e 's/(/%28/g' -e 's/)/%29/g' -e 's/,/%2C/g'),new-window)" &
fi fi
else else
"$1" "$2" & "$1" "$2" &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment