xdg-open truncates URLs at the first '&'

Bug #1526566 reported by Robert Bruce Park on 2015-12-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xdg-utils
Confirmed
Medium
launchpadlib
Undecided
Unassigned
xdg-utils (Ubuntu)
Medium
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'

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

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.

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.

affects: launchpadlib → xdg-utils
affects: xdg-utils → launchpadlib

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.

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
karthikkn (karthikkn) wrote :

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

Changed in xdg-utils (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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