nekohayo / specto

Automatically exported from code.google.com/p/specto
0 stars 0 forks source link

Ampersands in watched URLs result in truncated address when passed to browser. #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a watched URL containing an ampersand (&)  An example case would be
http://www.google.com/webhp&thiswilldisappear
2. Click on the "Jump to" button

What is the expected output? What do you see instead?

In the example above, the desired result would be to see
"http://www.google.com/webhp&thiswilldisappear" in the address bar after
clicking the "Jump to" button.  Instead, the ampersand and anything
following it are removed from the URL, resulting in your browser going to
http://www.google.com/webhp instead.

What version of the product are you using? On what operating system?
SVN revision 109 on Ubuntu Linux 7.04 with kernel 2.6.20-15

Please provide any additional information below.
The attached patch should correct the problem.  It simply replaces any
ampersands in the URL passed to the browser with "\&".

Original issue reported on code.google.com by bkei...@gmail.com on 9 May 2007 at 12:49

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, thanks for the patches! Tried them, but they are not really fixing the 
issues
directly, as they seem to replace the ampersands in only two places.

I get these errors in the terminal (they are gtk warning telling me that I am 
using
ampersands; this should not happen). Can you fix this? To reproduce:
1- create a new web watch
2- name it "bob & joe" (without quotes)
3- give it some url such as "example.com/foo&bar=baz"
4- enjoy the show :)

/home/jeff/trunks/specto/spectlib/main.py:181: GtkWarning: Failed to set text 
from
markup due to error parsing markup: Error on line 1: Character ' ' is not valid 
at
the start of an entity name; the & character begins an entity; if this ampersand
isn't supposed to be an entity, escape it as &
  gtk.main_iteration_do(False)
/home/jeff/trunks/specto/spectlib/watch_web_static.py:82: GtkWarning: Failed to 
set
text from markup due to error parsing markup: Error on line 1: Character ' ' is 
not
valid at the start of an entity name; the & character begins an entity; if this
ampersand isn't supposed to be an entity, escape it as &
  gtk.main_iteration()
/home/jeff/trunks/specto/spectlib/notifier.py:261: GtkWarning: Failed to set 
text
from markup due to error parsing markup: Error on line 1: Character ' ' is not 
valid
at the start of an entity name; the & character begins an entity; if this 
ampersand
isn't supposed to be an entity, escape it as &
  gtk.main_iteration_do(False)
/home/jeff/trunks/specto/spectlib/watch_web_static.py:85: GtkWarning: Failed to 
set
text from markup due to error parsing markup: Error on line 1: Character ' ' is 
not
valid at the start of an entity name; the & character begins an entity; if this
ampersand isn't supposed to be an entity, escape it as &
  gtk.main_iteration()

Original comment by nekoh...@gmail.com on 10 May 2007 at 3:00

GoogleCodeExporter commented 9 years ago
fixed in SVN 114, please test so that I can mark this as Verified.

Original comment by nekoh...@gmail.com on 1 Jul 2007 at 12:12

GoogleCodeExporter commented 9 years ago

Original comment by nekoh...@gmail.com on 18 Mar 2008 at 2:13