From db2f0f79190650e6c63e7c1ac10bf9f3304d2115 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 8 Jul 2012 18:27:11 +0200 Subject: [PATCH] Bugfix: API: No extra encoding for the status text - makes it more compatible to statusnet Bugfix: BBCode: Fixed charset problems. --- include/api.php | 6 ++++-- include/bbcode.php | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index 629b5fcc2a..3858b9fe32 100644 --- a/include/api.php +++ b/include/api.php @@ -490,7 +490,8 @@ $_REQUEST['type'] = 'wall'; $_REQUEST['profile_uid'] = local_user(); $_REQUEST['api_source'] = true; - $txt = urldecode(requestdata('status')); + $txt = requestdata('status'); + //$txt = urldecode(requestdata('status')); require_once('library/HTMLPurifier.auto.php'); require_once('include/html2bbcode.php'); @@ -554,7 +555,8 @@ } else - $_REQUEST['body'] = urldecode(requestdata('status')); + $_REQUEST['body'] = requestdata('status'); + //$_REQUEST['body'] = urldecode(requestdata('status')); $parent = requestdata('in_reply_to_status_id'); if(ctype_digit($parent)) diff --git a/include/bbcode.php b/include/bbcode.php index 988e75d417..e212ec4aed 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -353,6 +353,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = str_replace(array("", "", $doctype), array("", "", ""), $Text); $Text = str_replace('
','', $Text); + + $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES'); } call_hooks('bbcode',$Text); -- 2.39.5