Summary: | xdg-open with x-scheme-handler replaces & in URLs with %U | ||
---|---|---|---|
Product: | Portland | Reporter: | Stephan Sokolow <freedesktop.zen.ssokolow> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | freedesktop |
Version: | TP | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Stephan Sokolow
2011-12-22 03:02:30 UTC
This is due to the following line in xdg-open: arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$1"'"*g'`" In sed parlance the "&" is special, from the sed man page: "The replacement may contain the special character & to refer to that portion of the pattern space which matched" So any & in the URL will be replaced with the arguments. The simple fix for this is to escape & in the input string, though a more robust fix is probably in order (not using PCRE perhaps) the following patch fixes the problem. argone=`echo $1|sed 's/&/\\\\&/g'` arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$argone"'"*g'`" > (not using PCRE perhaps)
s/PC//
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/55. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.