From 11b21308c099d98cf1ccdba5a6a3857a9c13922e Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 1 Feb 2015 05:35:09 +0100 Subject: [PATCH] fix: malformed filename in image search fix for http://mantis.tokeek.de/view.php?id=533 --- htroot/yacysearchitem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java index 552801aac..9fd353c61 100644 --- a/htroot/yacysearchitem.java +++ b/htroot/yacysearchitem.java @@ -307,7 +307,7 @@ public class yacysearchitem { try { image = theSearch.oneImageResult(item, timeout); final String imageUrlstring = image.imageUrl.toNormalform(true); - final String imageUrlExt = MultiProtocolURL.getFileExtension(imageUrlstring); + final String imageUrlExt = MultiProtocolURL.getFileExtension(image.imageUrl.getFileName()); final String target = sb.getConfig(imageUrlstring.matches(target_special_pattern) ? SwitchboardConstants.SEARCH_TARGET_SPECIAL : SwitchboardConstants.SEARCH_TARGET_DEFAULT, "_self"); final String license = URLLicense.aquireLicense(image.imageUrl); // this is just the license key to get the image forwarded through the YaCy thumbnail viewer, not an actual lawful license