]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: API: No extra encoding for the status text - makes it more compatible to...
authorMichael Vogel <icarus@dabo.de>
Sun, 8 Jul 2012 16:27:11 +0000 (18:27 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 8 Jul 2012 16:27:11 +0000 (18:27 +0200)
Bugfix: BBCode: Fixed charset problems.

include/api.php
include/bbcode.php

index 629b5fcc2ad19cabd87f3a1ada420396996fb0cc..3858b9fe32b635de95e84120c53c4f5ba6e89410 100644 (file)
                 $_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');
 
                }
                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))
index 988e75d417be89fee029b8a071f4504e82f1dc6b..e212ec4aed0f1016282d43a0c4e702cca9f2f203 100644 (file)
@@ -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('<br></li>','</li>', $Text);
+
+               $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
        }
 
        call_hooks('bbcode',$Text);