1
0
Fork 0

Merge pull request #6184 from MrPetovan/task/normalize-bbcode-hashtags

Normalize BBCode hashtags links
This commit is contained in:
Michael Vogel 2018-11-24 13:14:50 +01:00 committed by GitHub
commit 42a3610a79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 35 deletions

View file

@ -613,7 +613,7 @@ function photos_post(App $a)
}
$profile = str_replace(',', '%2c', $profile);
$str_tags .= '@[url='.$profile.']'.$newname.'[/url]';
$str_tags .= '@[url=' . $profile . ']' . $newname . '[/url]';
}
} elseif (strpos($tag, '#') === 0) {
$tagname = substr($tag, 1);

View file

@ -93,7 +93,7 @@ function tagger_content(App $a) {
</target>
EOT;
$tagid = System::baseUrl() . '/search?tag=' . $term;
$tagid = System::baseUrl() . '/search?tag=' . $xterm;
$objtype = ACTIVITY_OBJ_TAGTERM;
$obj = <<< EOT
@ -113,7 +113,7 @@ EOT;
return;
}
$termlink = html_entity_decode('&#x2317;') . '[url=' . System::baseUrl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
$termlink = html_entity_decode('&#x2317;') . '[url=' . System::baseUrl() . '/search?tag=' . $term . ']'. $term . '[/url]';
$arr = [];
@ -170,7 +170,7 @@ EOT;
$term_objtype,
TERM_HASHTAG,
DBA::escape($term),
DBA::escape(System::baseUrl() . '/search?tag=' . $term),
'',
intval($owner_uid)
);
}
@ -192,7 +192,7 @@ EOT;
$term_objtype,
TERM_HASHTAG,
DBA::escape($term),
DBA::escape(System::baseUrl() . '/search?tag=' . $term),
'',
intval($owner_uid)
);
}