diff options
author | Vitaly Takmazov | 2017-08-24 12:04:30 +0000 |
---|---|---|
committer | Vitaly Takmazov | 2017-08-24 12:04:30 +0000 |
commit | ef5d9183c318882ab9209e25568d88f29d7111f4 (patch) | |
tree | 781dbcc43df7d360eda9d5b0e789796d619e5625 /juick-www/src/main/java/com/juick | |
parent | e0ff1c128782bb448018e2cedc45b4c9ceeee843 (diff) |
www: description meta for Yandexbot
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/UserThread.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java index 0d7538fb..5a1bac97 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java +++ b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java @@ -109,11 +109,13 @@ public class UserThread { } String cardType = StringUtils.isNotEmpty(msg.getAttachmentType()) ? "summary_large_image" : "summary"; String msgImage = StringUtils.isNotEmpty(msg.getAttachmentType()) ? msg.getPhotoURLs().getMedium() : "//i.juick.com/a/" + msg.getUser().getUid() + ".png"; + String cardDescription = StringEscapeUtils.escapeHtml4(PlainTextFormatter.formatTwitterCard(msg)); headers += "<meta name=\"twitter:card\" content=\"" + cardType + "\" />\n" + "<meta name=\"twitter:site\" content=\"@juick\" />\n" + "<meta property=\"og:url\" content=\"" + pageUrl + "\" />\n" + "<meta property=\"og:title\" content=\"" + msg.getUser().getName() + " at Juick\" />\n" + - "<meta property=\"og:description\" content=\"" + StringEscapeUtils.escapeHtml4(PlainTextFormatter.formatTwitterCard(msg)) + "\" />\n" + + "<meta property=\"og:description\" content=\"" + cardDescription + "\" />\n" + + "<meta property=\"description\" content=\"" + cardDescription + "\" />\n" + "<meta property=\"og:image\" content=\"" + msgImage + "\" />"; String twitterName = crosspostService.getTwitterName(msg.getUser().getUid()); if (StringUtils.isNotEmpty(twitterName)) { |