summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-08-07 02:02:07 +0000
committerRobert Pösel <robyer@seznam.cz>2014-08-07 02:02:07 +0000
commitbfa54f92fa14defbb276e57ad7508bd68318f592 (patch)
treedc5e8e490475c3a6974d9ecccfd564f91a93f86f /protocols/FacebookRM/src/communication.cpp
parent523df843b25d660da107d6e954fa2127bf02e082 (diff)
Facebook: Fix sending "&#123456" in message
- Remove "special_expressions_decode" from various wrong places (hopefully it won't cause any new problems) - Rename it to "html_entities_decode" git-svn-id: http://svn.miranda-ng.org/main/trunk@10104 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r--protocols/FacebookRM/src/communication.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index 6064378b10..7145355a7e 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -135,7 +135,7 @@ http::response facebook_client::flap(RequestType request_type, std::string* requ
if (pos != std::string::npos) {
pos += 20;
error = resp.data.substr(pos, resp.data.find("\"", pos) - pos);
- error = utils::text::trim(utils::text::special_expressions_decode(utils::text::slashu_to_utf8(error)));
+ error = utils::text::trim(utils::text::html_entities_decode(utils::text::slashu_to_utf8(error)));
error = ptrA( mir_utf8decodeA(error.c_str()));
}
@@ -144,7 +144,7 @@ http::response facebook_client::flap(RequestType request_type, std::string* requ
if (pos != std::string::npos) {
pos += 16;
title = resp.data.substr(pos, resp.data.find("\"", pos) - pos);
- title = utils::text::trim(utils::text::special_expressions_decode(utils::text::slashu_to_utf8(title)));
+ title = utils::text::trim(utils::text::html_entities_decode(utils::text::slashu_to_utf8(title)));
title = ptrA( mir_utf8decodeA(title.c_str()));
}
@@ -723,7 +723,7 @@ void facebook_client::clear_chatrooms()
void loginError(FacebookProto *proto, std::string error_str) {
error_str = utils::text::trim(
- utils::text::special_expressions_decode(
+ utils::text::html_entities_decode(
utils::text::remove_html(
utils::text::edit_html(error_str))));
@@ -1294,7 +1294,7 @@ bool facebook_client::post_status(status_data *status)
data += "&__user=" + (status->isPage && !status->user_id.empty() ? status->user_id : this->self_.user_id);
data += "&loaded_components[0]=maininput&loaded_components[1]=backdateicon&loaded_components[2]=withtaggericon&loaded_components[3]=cameraicon&loaded_components[4]=placetaggericon&loaded_components[5]=mainprivacywidget&loaded_components[6]=withtaggericon&loaded_components[7]=backdateicon&loaded_components[8]=placetaggericon&loaded_components[9]=cameraicon&loaded_components[10]=mainprivacywidget&loaded_components[11]=maininput&loaded_components[12]=explicitplaceinput&loaded_components[13]=hiddenplaceinput&loaded_components[14]=placenameinput&loaded_components[15]=hiddensessionid&loaded_components[16]=withtagger&loaded_components[17]=backdatepicker&loaded_components[18]=placetagger&loaded_components[19]=citysharericon";
http::response resp = flap(REQUEST_LINK_SCRAPER, &data, &status->url);
- resp.data = utils::text::special_expressions_decode(utils::text::slashu_to_utf8(resp.data));
+ resp.data = utils::text::slashu_to_utf8(resp.data);
data = "&xhpc_context=profile&xhpc_ismeta=1&xhpc_timeline=1&xhpc_composerid=u_jsonp_2_0&is_explicit_place=&composertags_place=&composer_session_id=&composertags_city=&disable_location_sharing=false&composer_predicted_city=&nctr[_mod]=pagelet_composer&__a=1&__dyn=&__req=1f&ttstamp=0";
std::string form = utils::text::source_get_value(&resp.data, 2, "<form", "</form>");