allow (our own) ajax urls to pass through bbcode intact.
This commit is contained in:
parent
c782272927
commit
4634049549
@ -162,7 +162,7 @@ function bb_parse_app($match) {
|
||||
function bb_parse_element($match) {
|
||||
$j = json_decode(base64url_decode($match[1]),true);
|
||||
if($j) {
|
||||
$o = EOL . '<a href="' . z_root() . '" foo="baz" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . t('Install design element: ') . $j['pagetitle'] . '</a>' . EOL;
|
||||
$o = EOL . '<a href="#" onclick="importElement(\'' . $match[1] . '\'); return false;" >' . t('Install design element: ') . $j['pagetitle'] . '</a>' . EOL;
|
||||
}
|
||||
return $o;
|
||||
}
|
||||
@ -823,7 +823,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||
// fix any escaped ampersands that may have been converted into links
|
||||
$Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
|
||||
|
||||
$Text = preg_replace("/\<(.*?)(src|href)=\"[^hfm](.*?)\>/ism",'<$1$2="">',$Text);
|
||||
$Text = preg_replace("/\<(.*?)(src|href)=\"[^hfm#](.*?)\>/ism",'<$1$2="">',$Text);
|
||||
|
||||
call_hooks('bbcode',$Text);
|
||||
|
||||
|
@ -2072,6 +2072,7 @@ function item_store($arr,$allow_exec = false) {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
// is the new message multi-level threaded?
|
||||
// even though we don't support it now, preserve the info
|
||||
// and re-attach to the conversation parent.
|
||||
|
@ -1472,11 +1472,12 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false) {
|
||||
$arr['uid'] = $channel['channel_id'];
|
||||
update_imported_item($sender,$arr,$channel['channel_id']);
|
||||
$result[] = array($d['hash'],'updated',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>',$arr['mid']);
|
||||
$item_id = $r[0]['id'];
|
||||
}
|
||||
else {
|
||||
$result[] = array($d['hash'],'update ignored',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>',$arr['mid']);
|
||||
continue;
|
||||
}
|
||||
$item_id = $r[0]['id'];
|
||||
}
|
||||
else {
|
||||
$arr['aid'] = $channel['channel_account_id'];
|
||||
|
@ -896,12 +896,14 @@ function updateConvItems(mode,data) {
|
||||
function importElement(elem) {
|
||||
$.post(
|
||||
"impel",
|
||||
{ "element" : elem }
|
||||
{ "element" : elem },
|
||||
function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,10);
|
||||
}
|
||||
);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,10);
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function preview_post() {
|
||||
|
Reference in New Issue
Block a user