fix wall photos
This commit is contained in:
parent
e346aa7560
commit
c5f0b85357
@ -167,6 +167,15 @@ function red_zrl_callback($matches) {
|
||||
}
|
||||
|
||||
|
||||
// If we've got a url or zrl tag with a naked url somewhere in the link text,
|
||||
// escape it with quotes unless the naked url is a linked photo.
|
||||
|
||||
function red_escape_zrl_callback($matches) {
|
||||
|
||||
if((strpos($matches[3],'zmg') !== false) || (strpos($matches[3],'img') !== false))
|
||||
return $matches[0];
|
||||
return '[' . $matches[1] . 'rl' . $matches[2] . ']' . $matches[3] . '"' . $matches[4] . '"' . $matches[5] . '[/' . $matches[6] . 'rl]';
|
||||
}
|
||||
|
||||
/**
|
||||
* @function post_activity_item($arr)
|
||||
|
@ -429,7 +429,7 @@ function item_post(&$a) {
|
||||
* otherwise http://elsewhere.com becomes #^[url=http://elsewhere.com]http://elsewhere.com[/url]
|
||||
*/
|
||||
|
||||
$body = preg_replace('/\[([uz])rl(.*?)\](.*?)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)(.*?)\[\/([uz])rl\]/ism','[$1rl$2]$3"$4"$5[/$6rl]',$body);
|
||||
$body = preg_replace_callback('/\[([uz])rl(.*?)\](.*?)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)(.*?)\[\/([uz])rl\]/ism','red_escape_zrl_callback',$body);
|
||||
|
||||
$body = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body);
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2014-02-08.582
|
||||
2014-02-09.583
|
||||
|
Reference in New Issue
Block a user