aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-03-15 14:31:50 +0100
committerMario Vavti <mario@mariovavti.com>2018-03-15 14:31:50 +0100
commit6c709551ce49feaa93b68253cb5767ad4cab66c1 (patch)
tree13e744e2b8b2856f2ed3db69d5e6263314cd8b5f /include
parentaa4f8b2901bbd15cac0a6dec704bc800686a1eb0 (diff)
downloadvolse-hubzilla-6c709551ce49feaa93b68253cb5767ad4cab66c1.tar.gz
volse-hubzilla-6c709551ce49feaa93b68253cb5767ad4cab66c1.tar.bz2
volse-hubzilla-6c709551ce49feaa93b68253cb5767ad4cab66c1.zip
do not always zid share links. add missing <
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index b33766757..cd1a84d00 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -329,7 +329,7 @@ function bb_ShareAttributes($match) {
$headline = '<div class="shared_container"> <div class="shared_header">';
if ($avatar != "")
- $headline .= '<a href="' . zid($profile) . '" ><img src="' . $avatar . '" alt="' . $author . '" height="32" width="32" /></a>';
+ $headline .= '<a href="' . ((is_matrix_url($profile)) ? zid($profile) : $profile) . '" ><img src="' . $avatar . '" alt="' . $author . '" height="32" width="32" /></a>';
if(strpos($link,'/cards/'))
$type = t('card');
@@ -341,8 +341,8 @@ function bb_ShareAttributes($match) {
// Bob Smith wrote the following post 2 hours ago
$fmt = sprintf( t('%1$s wrote the following %2$s %3$s'),
- '<a href="' . zid($profile) . '" >' . $author . '</a>',
- '<a href="' . zid($link) . '" >' . $type . '</a>',
+ '<a href="' . ((is_matrix_url($profile)) ? zid($profile) : $profile) . '" >' . $author . '</a>',
+ '<a href="' . ((is_matrix_url($link)) ? zid($link) : $link) . '" >' . $type . '</a>',
$reldate
);
@@ -393,7 +393,7 @@ function bb_ShareAttributesSimple($match) {
if ($matches[1] != "")
$profile = $matches[1];
- $text = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . ' <a href="' . $profile . '">' . $author . '</a>: div class="reshared-content">' . $match[2] . '</div>';
+ $text = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . ' <a href="' . $profile . '">' . $author . '</a>: <div class="reshared-content">' . $match[2] . '</div>';
return($text);
}