From 596ed479cc4c8e0fca15e83e2fdc3c1133367b2b Mon Sep 17 00:00:00 2001 From: maxgithubprofile <21055122+maxgithubprofile@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:20:33 +0300 Subject: [PATCH] fix: links preview (#1126) --- minimize.js | 4 ++-- php/og.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/minimize.js b/minimize.js index c891b728d8..04e6e0f159 100644 --- a/minimize.js +++ b/minimize.js @@ -120,7 +120,7 @@ if (!args.sha) { var vars = { test : { - proxypath : '"https://test.pocketnet.app:8899/"', + proxypath : '"http://test.pocketnet.app:8898/"', domain : _meta[args.project].turl, packageVersion: package.version, test : '', @@ -134,7 +134,7 @@ var vars = { run : args.run || false, }, prod : { - proxypath : '"https://pocketnet.app:8899/"', + proxypath : '"http://pocketnet.app:8898/"', domain : _meta[args.project].url, packageVersion: package.version, test : '', diff --git a/php/og.php b/php/og.php index 8b74ab483d..645f9370ef 100644 --- a/php/og.php +++ b/php/og.php @@ -342,8 +342,14 @@ public function get(){ $this->currentOg['title']= urldecode($r->c); $title = true; } - - $this->currentOg['description'] = substr(strip_tags(urldecode($r->m)), 0, 130).'...'; + + if(isset($r->s) && isset($r->s->v) && $r->s->v == 'a'){ + $this->currentOg['description'] = ''; + } + else{ + $this->currentOg['description'] = substr(strip_tags(urldecode($r->m)), 0, 130).'...'; + } + $description = true; $this->currentOg['type'] = 'article';