diff --git a/frappe/public/js/frappe/social/components/Post.vue b/frappe/public/js/frappe/social/components/Post.vue index 400ac2b708..cd637693e8 100644 --- a/frappe/public/js/frappe/social/components/Post.vue +++ b/frappe/public/js/frappe/social/components/Post.vue @@ -133,13 +133,18 @@ export default { frappe.xcall('frappe.social.doctype.post.post.get_link_info', { 'url': link_element.href }).then(info => { - if (info['og:title'] || info['title']) { + const title = frappe.ellipsis(info['og:title'] || info['title'], 60) + const description = frappe.ellipsis(info['og:description'] || info['description'], 280) + const image = info['og:image']; + const url = info['og:url']; + + if (title) { link_element.insertAdjacentHTML('afterend', ` - - + +
-
${info['og:title'] || info['title']}
-

${info['og:description'] || info['description']}

+
${title}
+

${description}

` );