fix for bug #1404 Share Updates to skip gif images in URL Preview

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@120290 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-11-17 15:10:49 +00:00
parent c296d54710
commit d0a4578f42
1 changed files with 6 additions and 1 deletions

View File

@ -218,8 +218,13 @@ public class TextTransfromUtils {
for (int i = 0; i < upTo; i++) {
if (imgs[i].hasAttribute("src")) {
String imageUrl = getImageUrlFromSrcAttribute(pageURL, imgs[i].getAttributeByName("src"));
images.add(imageUrl);
_log.trace("[FOUND image] " + imageUrl);
if (imageUrl.endsWith(".gif") || imageUrl.endsWith(".GIF"))
_log.trace("[Gif image] SKIP " + imageUrl);
else {
images.add(imageUrl);
}
}
}
return images;