diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-08 18:13:52 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-08 18:13:52 +0100 |
commit | 13c05e7937d3e0fe033204daad57cf9c0d194078 (patch) | |
tree | 75cfa2cbea9853688827ca6f3982a8881d4c67be /include | |
parent | c6e9bca76ca6c077aedcb3bb46eef182592bfc6a (diff) | |
parent | 3706afbd01164c9f322c605d6ec242e6ca4770fa (diff) | |
download | volse-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.php | 2 |
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"; } |