Bug 23319 - xdg-open can't handle arguments with # symbol
Summary: xdg-open can't handle arguments with # symbol
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.0
Hardware: x86 (IA32) FreeBSD
: medium normal
Assignee: Fathi Boudra
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-08-14 18:55 UTC by Dmitry Marakasov
Modified: 2009-10-12 07:06 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Dmitry Marakasov 2009-08-14 18:55:40 UTC
xdg-utils 1.0.2, FreeBSD 8.0-BETA i386.

# xdg-open "http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/applications.html#PORTS-MAJOR-UPGRADE"
sed: 1: "s#%s#http://www.freebsd ...": bad flag in substitute command: 'P'

xdg-open:367:
browser_with_arg=`echo "$browser" | sed s#%s#"$1"#`

obviously, $1 should be escaped, or (likely better) printf should be used instead of echo.
Comment 1 Fathi Boudra 2009-08-18 09:08:48 UTC
related to bug 20015: http://bugs.freedesktop.org/show_bug.cgi?id=20015
we should fix both issue at the same time.
Comment 2 Dmitry Marakasov 2009-08-19 16:09:04 UTC
FYI, fix used in FreeBSD for the time being:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/xdg-utils/files/patch-scripts_xdg-open?rev=1.2;content-type=text%2Fplain
Comment 3 Fathi Boudra 2009-10-12 05:51:42 UTC
*** Bug 24375 has been marked as a duplicate of this bug. ***


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.