mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1035131 - User decoded user entered URLs in suggeste image lookups (r=mfinkle)
This commit is contained in:
parent
4d4b03e37f
commit
8333c2f43c
@ -555,11 +555,14 @@ public class TopSitesPanel extends HomeFragment {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure we query suggested images without the user-entered wrapper.
|
||||
final String decodedUrl = StringUtils.decodeUserEnteredUrl(url);
|
||||
|
||||
// Suggested images have precedence over thumbnails, no need to wait
|
||||
// for them to be loaded. See: CursorLoaderCallbacks.onLoadFinished()
|
||||
final String imageUrl = BrowserDB.getSuggestedImageUrlForUrl(url);
|
||||
final String imageUrl = BrowserDB.getSuggestedImageUrlForUrl(decodedUrl);
|
||||
if (!TextUtils.isEmpty(imageUrl)) {
|
||||
final int bgColor = BrowserDB.getSuggestedBackgroundColorForUrl(url);
|
||||
final int bgColor = BrowserDB.getSuggestedBackgroundColorForUrl(decodedUrl);
|
||||
view.displayThumbnail(imageUrl, bgColor);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user