GNOME Bugzilla – Bug 673301
Nearby Sites (zeroconf) bookmark matches any string in address bar
Last modified: 2012-04-11 14:11:55 UTC
Epiphany displays the following Zeroconf bookmark for me in Bookmarks->Nearby Sites: Photosmart C309a series [0BEDFB] [0BEDFC] This is potentially useful. Unfortunately this bookmark matches *any* string that I enter in the address bar. (And it appears above all other matches in the dropdown list, adding to the inconvenience.)
Wow, this is really weird. What are the keywords for that bookmark?
The bookmark appears only under the All and Nearby Sites topics in the Bookmarks window.
I debugged a bit. When Epiphany calls should_add_bookmark_to_model() to test whether the search string should match this particular bookmark, the keywords argument is null: should_add_bookmark_to_model: search = x, title = Photosmart C309a series [0BEDFB] [0BEDFC], location = http://192.168.1.3:80/, keywords = (null) This causes g_regex_match to return true (and report an assertion somewhere, presumably), so the bookmark matches any string.
(In reply to comment #3) > I debugged a bit. When Epiphany calls should_add_bookmark_to_model() to test > whether the search string should match this particular bookmark, the keywords > argument is null: > > should_add_bookmark_to_model: search = x, title = Photosmart C309a series > [0BEDFB] [0BEDFC], location = http://192.168.1.3:80/, keywords = (null) > > This causes g_regex_match to return true (and report an assertion somewhere, > presumably), so the bookmark matches any string. Thank you, I suspected something like that, since we had a similar bug earlier with title/location being NULL. I'll just normalize the keywords too.
Created attachment 211187 [details] [review] normalize-add-bookmark.diff Adam, could you try this and see if it works? The code was actually already trying to make this case work, but not correctly.
The patch fixes the problem. Thanks!
Great, pushed it to master and gnome-3-4. Thanks for the great bug report.
*** Bug 673908 has been marked as a duplicate of this bug. ***