Browse Source

Do not trim a sufficiently shortened Opengraph description

master
Max Kostikov 1 year ago
parent
commit
3706afbd01
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      include/opengraph.php

+ 1
- 1
include/opengraph.php View File

@ -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";
}

Loading…
Cancel
Save