fix ignore empty content
@@ -694,20 +694,26 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
// meta thumbnail
final Node thumbnailNode = getXPathAPI().selectSingleNode(document, META_NAME_THUMBNAIL_CONTENT);
if (thumbnailNode != null) {
- final URL thumbnailUrl = getURL(responseData.getUrl(), thumbnailNode.getTextContent());
+ final String content = thumbnailNode.getTextContent();
+ if (StringUtil.isNotBlank(content)) {
+ final URL thumbnailUrl = getURL(responseData.getUrl(), content);
if (thumbnailUrl != null) {
return thumbnailUrl.toExternalForm();
}
}
+ }
// meta og:image
final Node ogImageNode = getXPathAPI().selectSingleNode(document, META_PROPERTY_OGIMAGE_CONTENT);
if (ogImageNode != null) {
- final URL thumbnailUrl = getURL(responseData.getUrl(), ogImageNode.getTextContent());
+ final String content = ogImageNode.getTextContent();
+ if (StringUtil.isNotBlank(content)) {
+ final URL thumbnailUrl = getURL(responseData.getUrl(), content);
if (thumbnailUrl != null) {
return thumbnailUrl.toExternalForm();
}
}
+ }
final NodeList imgNodeList = getXPathAPI().selectNodeList(document, "//IMG");
Node firstSrcNode = null;
