mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:35:12 +00:00
fix profile change activity where the change is a solitary url - and includes a stray right quote
This commit is contained in:
parent
7a8363c328
commit
2e72b136c5
2 changed files with 3 additions and 1 deletions
|
@ -45,6 +45,8 @@ function profile_activity($changed, $value) {
|
|||
$prof = '[url=' . z_root() . '/profile/' . $self['channel_address'] . ']' . t('public profile') . '[/url]';
|
||||
|
||||
if($t == 1 && strlen($value)) {
|
||||
// if it's a url, the HTML quotes will mess it up, so link it and don't try and zidify it because we don't know what it points to.
|
||||
$value = linkify($value);
|
||||
$message = sprintf( t('%1$s changed %2$s to “%3$s”'), $A, $changes, $value);
|
||||
$message .= "\n\n" . sprintf( t('Visit %1$s\'s %2$s'), $A, $prof);
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]';
|
||||
|
||||
if (strpos($Text,'http') !== false) {
|
||||
$Text = preg_replace("/([^\"\]\='".'"'."]|^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
|
||||
$Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
|
||||
}
|
||||
if (strpos($Text,'[/share]') !== false) {
|
||||
$Text = preg_replace_callback("/\[share(.*?)\](.*?)\[\/share\]/ism","bb_ShareAttributes",$Text);
|
||||
|
|
Loading…
Reference in a new issue