[issue3330] webbrowser module doesn't correctly handle '|' character.

Adrian Petrescu report at bugs.python.org
Wed Jul 9 23:37:00 CEST 2008


New submission from Adrian Petrescu <apetresc at gmail.com>:

The webbrowser module seems to treat URLs containing the "|" character
differently based on whether the browser is already running or not.

For instance, consider the following python script:

import webbrowser
url = "http://foo.com/bar.html?var=x|y|z"
webbrowser.open(url)


If you run this script while the browser is already running (so that
webbrowser.open creates a new tab) this behaves as you would expect,
with the given URL as an address.

However, if a browser is not already running, when webbrowser.open
creates it, it seems to interpret the "|" as a seperator character, so
that the browser will open with THREE tabs, one open to
"http://foo.com/bar.html?var=x", one to "http://y" and one to "http://z".

This is clearly a bug, webbrowser module should be smart enough to
escape the "|" character if the browser is interpreting that line
differently.

This happens in Linux with Python 2.5 and Firefox 3.0. Not sure if it
happens with anything else.

----------
components: Library (Lib)
messages: 69488
nosy: AdrianP
severity: normal
status: open
title: webbrowser module doesn't correctly handle '|' character.
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3330>
_______________________________________


More information about the Python-bugs-list mailing list