diff --git a/includes/common.php b/includes/common.php index 3656d39..eef5949 100644 --- a/includes/common.php +++ b/includes/common.php @@ -241,7 +241,7 @@ $site_info = getSiteInfo(); $global_site_info = $site_info['site_info']; $row = $site_info['site_info']; $title = trim($row['title']); -$baseurl = trim($row['baseurl']); +$baseurl = paste_protocol() . rtrim(trim($row['baseurl']), '/'); $site_name = trim($row['site_name']); $email = trim($row['email']); $additional_scripts = trim($row['additional_scripts']); diff --git a/includes/functions.php b/includes/functions.php index 7b8c680..f5e639d 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -8,17 +8,15 @@ function tagsToHtml(array | Collection $tags) : string { $tag = $tagObj->name; $tag_lower = strtolower($tag); if ($tag_lower === 'nsfw' || $tag_lower === 'explicit') { - $tag = strtoupper($tag); $tagcolor = "tag is-danger"; } elseif ($tag_lower === 'safe') { - $tag = strtoupper($tag); $tagcolor = "tag is-success"; } elseif ($tag[0] === '/' && $tag[-1] === '/') { $tagcolor = "tag is-primary"; } else { $tagcolor = "tag is-info"; } - $output .= '' . pp_html_escape(ucfirst($tag)) . ''; + $output .= '' . pp_html_escape($tag) . ''; } return $output; } @@ -43,17 +41,15 @@ function tagsToHtmlUser(string | array | Collection $tags, $profile_username) : foreach ($tagsSplit as $tag) { $tag_lower = strtolower($tag); if ($tag_lower === 'nsfw' || $tag_lower === 'explicit') { - $tag = strtoupper($tag); $tagcolor = "tag is-danger"; } elseif ($tag_lower === 'safe') { - $tag = strtoupper($tag); $tagcolor = "tag is-success"; } elseif ($tag[0] === '/' && $tag[-1] === '/') { $tagcolor = "tag is-primary"; } else { $tagcolor = "tag is-info"; } - $output .= '' . pp_html_escape(ucfirst($tag)) . ''; + $output .= '' . pp_html_escape($tag) . ''; } return $output; }