Bugfix: API: No extra encoding for the status text - makes it more compatible to statusnet
Bugfix: BBCode: Fixed charset problems.
This commit is contained in:
parent
e9d7f85297
commit
db2f0f7919
2 changed files with 6 additions and 2 deletions
|
@ -490,7 +490,8 @@
|
||||||
$_REQUEST['type'] = 'wall';
|
$_REQUEST['type'] = 'wall';
|
||||||
$_REQUEST['profile_uid'] = local_user();
|
$_REQUEST['profile_uid'] = local_user();
|
||||||
$_REQUEST['api_source'] = true;
|
$_REQUEST['api_source'] = true;
|
||||||
$txt = urldecode(requestdata('status'));
|
$txt = requestdata('status');
|
||||||
|
//$txt = urldecode(requestdata('status'));
|
||||||
|
|
||||||
require_once('library/HTMLPurifier.auto.php');
|
require_once('library/HTMLPurifier.auto.php');
|
||||||
require_once('include/html2bbcode.php');
|
require_once('include/html2bbcode.php');
|
||||||
|
@ -554,7 +555,8 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$_REQUEST['body'] = urldecode(requestdata('status'));
|
$_REQUEST['body'] = requestdata('status');
|
||||||
|
//$_REQUEST['body'] = urldecode(requestdata('status'));
|
||||||
|
|
||||||
$parent = requestdata('in_reply_to_status_id');
|
$parent = requestdata('in_reply_to_status_id');
|
||||||
if(ctype_digit($parent))
|
if(ctype_digit($parent))
|
||||||
|
|
|
@ -353,6 +353,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||||
$Text = str_replace(array("<html><body>", "</body></html>", $doctype), array("", "", ""), $Text);
|
$Text = str_replace(array("<html><body>", "</body></html>", $doctype), array("", "", ""), $Text);
|
||||||
|
|
||||||
$Text = str_replace('<br></li>','</li>', $Text);
|
$Text = str_replace('<br></li>','</li>', $Text);
|
||||||
|
|
||||||
|
$Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
|
||||||
}
|
}
|
||||||
|
|
||||||
call_hooks('bbcode',$Text);
|
call_hooks('bbcode',$Text);
|
||||||
|
|
Loading…
Reference in a new issue