xdg-open truncates URLs at the first '&'

Bug #1526566 reported by Robert Bruce Park
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xdg-utils
Confirmed
Medium
launchpadlib
Invalid
Undecided
Unassigned
xdg-utils (Ubuntu)
Invalid
Low
Unassigned

Bug Description

$ xdg-open 'http://example.com/?foo&bar'

Expected behavior: that URL opens in my browser

Actual behavior: browser opens 'http://example.com/?foo'

Revision history for this message
William Grant (wgrant) wrote :

If even gnome-terminal can't open the link properly, this isn't anything Launchpad-specific.

Changed in launchpadlib:
status: New → Incomplete
status: Incomplete → Invalid
Revision history for this message
Robert Bruce Park (robru) wrote : Re: [Bug 1526566] Re: Wrong URL opens in browser when generating oauth token

How does lplib open the link the first time though? That has the same issue
and presumably it isn't lplib telling gnome terminal to open the link for
it.

Revision history for this message
William Grant (wgrant) wrote :

On 19/12/15 07:50, Robert Bruce Park wrote:
> How does lplib open the link the first time though? That has the same issue
> and presumably it isn't lplib telling gnome terminal to open the link for
> it.

launchpadlib uses Python's "webbrowser" module. That should use xdg-open
by default, if it's installed. gnome-terminal probably does the same.

Revision history for this message
Robert Bruce Park (robru) wrote : Re: Wrong URL opens in browser when generating oauth token
affects: launchpadlib → xdg-utils
affects: xdg-utils → launchpadlib
Revision history for this message
In , Robert Bruce Park (robru) wrote :

Hi, in latest Ubuntu Xenial, I am experiencing the following behavior:

$ xdg-open 'http://example.com/?foo&bar'

The page that opens in the browser is simply 'http://example.com/?foo'

This is with xdg-utils package 1.1.0~rc3+git20150907-1ubuntu3

It's not clear to me if this is a duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=44046 which sounds related, but is also 4 years old, and I definitely have not been experiencing this issue for the last 4 years.

Let me know if there's any other information I can provide to debug, thanks.

Revision history for this message
Robert Bruce Park (robru) wrote :
Changed in xdg-utils (Ubuntu):
status: New → Confirmed
summary: - Wrong URL opens in browser when generating oauth token
+ xdg-open truncates URLs at the first '&'
description: updated
Changed in xdg-utils (Ubuntu):
milestone: none → ubuntu-16.04
Changed in xdg-utils:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
karthikkn (karthikkn) wrote :

All tested URLs works for me without any problem in 16.04.

Mathew Hodson (mhodson)
Changed in xdg-utils (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Nicholas Guriev (mymedia) wrote :

The bug is no longer reproducible using Firefox with latest version of xdg-utils in clean test environment. If it is still case for you, please attach an output of the command with "bash -x" prepended (without quotes).

Changed in xdg-utils (Ubuntu):
status: Confirmed → Incomplete
Changed in xdg-utils (Ubuntu):
importance: Medium → Low
status: Incomplete → New
status: New → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.