only show the pin if we display the label and fix the test

This commit is contained in:
Mario
2025-06-19 08:26:31 +00:00
parent 7766e5d420
commit 7320149fd8
2 changed files with 3 additions and 3 deletions

View File

@@ -1350,8 +1350,8 @@ function bbcode($text, $options = []) {
function ($matches) {
$before = $matches[1];
$geo_uri = $matches[2];
$label = ((!empty($matches[4])) ? urldecode($matches[4]) : $geo_uri);
return $before . '<a href="' . htmlspecialchars($geo_uri) . '" target="_blank" rel="nofollow noopener">📍' . htmlspecialchars($label) . '</a>';
$label = ((!empty($matches[4])) ? '📍' . urldecode($matches[4]) : $geo_uri);
return $before . '<a href="' . htmlspecialchars($geo_uri) . '" target="_blank" rel="nofollow noopener">' . htmlspecialchars($label) . '</a>';
},
$text
);