GNOME Bugzilla – Bug 774318
Epiphany segfault when clicking 'Search the Web for “<text>”'
Last modified: 2016-11-12 19:14:24 UTC
In src/popup-commands.c, function get_search_term: search_term = strchr (text, '\'') + 1; search_term[strlen (search_term) - 1] = '\0'; The return value of strchr is NULL because it cannot find the ' symbol. The symbol ' has been replaced by “ and ” in bug 774217. Even if we revert the patch, it is still broken because the string is translatable. It can be translated to a string without any of ', ", “, ” symbol.
Also, the search text itself is being ellipsized, that's a regression from 3.22. Both require the same changes to fix.
The following fix has been pushed: 3e695d7 Improve handling of search the web menu item
Created attachment 339716 [details] [review] Improve handling of search the web menu item We shouldn't be putting the entire context menu item label into the GAction parameter. This is excessive and error-prone. We've started crashing after changing the quotation characters from ' to “”, for example. Also, some languages need to replace the quotation characters in translations, making the previous behavior especially risky. Lastly, extracting the search text from the ellipsized label means our search text itself will be ellipsized, which is undesirable and not the previous behavior prior to the GAction port.