aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-11-08 18:13:52 +0100
committerMax Kostikov <max@kostikov.co>2019-11-08 18:13:52 +0100
commit13c05e7937d3e0fe033204daad57cf9c0d194078 (patch)
tree75cfa2cbea9853688827ca6f3982a8881d4c67be /include
parentc6e9bca76ca6c077aedcb3bb46eef182592bfc6a (diff)
parent3706afbd01164c9f322c605d6ec242e6ca4770fa (diff)
downloadvolse-hubzilla-13c05e7937d3e0fe033204daad57cf9c0d194078.tar.gz
volse-hubzilla-13c05e7937d3e0fe033204daad57cf9c0d194078.tar.bz2
volse-hubzilla-13c05e7937d3e0fe033204daad57cf9c0d194078.zip
Merge branch 'dev' into 'dev'
Do not trim a sufficiently shortened Opengraph description See merge request hubzilla/core!1774
Diffstat (limited to 'include')
-rw-r--r--include/opengraph.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/opengraph.php b/include/opengraph.php
index ba97d4f4f..9de021d54 100644
--- a/include/opengraph.php
+++ b/include/opengraph.php
@@ -43,7 +43,7 @@
$ogdesc = str_replace("\n", " ", $ogdesc);
while (strpos($ogdesc, " ") !== false)
$ogdesc = str_replace(" ", " ", $ogdesc);
- $ogdesc = rtrim(substr($ogdesc, 0, strrpos($ogdesc, " ")), "?.,:;!-") . "...";
+ $ogdesc = (strlen($ogdesc) < 298 ? $ogdesc : rtrim(substr($ogdesc, 0, strrpos($ogdesc, " ")), "?.,:;!-") . "...");
$ogtype = "article";
}