summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-07-17 19:42:58 +0000
committerRobert Pösel <robyer@seznam.cz>2016-07-17 19:42:58 +0000
commitd899bcc07bbdac8de88807a4d912f081e9cc7191 (patch)
tree32e40a7ee1b3a740171e003ce18b48c77fe0a2a7
parent144d4abae7e3bbdd5c7e6afb9098f84ab443f475 (diff)
std_string_utils: Remove useless edit_html method
It shouldn't have been here anyway as it was specific to Facebook. git-svn-id: http://svn.miranda-ng.org/main/trunk@17106 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--utils/std_string_utils.cpp90
-rw-r--r--utils/std_string_utils.h1
2 files changed, 0 insertions, 91 deletions
diff --git a/utils/std_string_utils.cpp b/utils/std_string_utils.cpp
index 137f1da52f..be23aaeeeb 100644
--- a/utils/std_string_utils.cpp
+++ b/utils/std_string_utils.cpp
@@ -222,96 +222,6 @@ std::string utils::text::html_entities_decode(std::string data)
return new_string;
}
-std::string utils::text::edit_html(std::string data)
-{
- std::string::size_type end = 0;
- std::string::size_type start = 0;
- std::string new_string;
-
- while (end != std::string::npos)
- {
- end = data.find("<span class=\\\"text_exposed_hide", start);
- if (end != std::string::npos)
- {
- new_string += data.substr(start, end - start);
- start = data.find("<\\/span", end);
- }
- else {
- new_string += data.substr(start, data.length() - start);
- }
- }
-
- start = end = 0;
- data = new_string;
- new_string.clear();
-
- while (end != std::string::npos)
- {
- end = data.find("<span class=\\\"uiTooltipText", start);
- if (end != std::string::npos)
- {
- new_string += data.substr(start, end - start);
- start = data.find("<\\/span", end);
- }
- else {
- new_string += data.substr(start, data.length() - start);
- }
- }
-
- // Remove "Translate" link
- start = end = 0;
- data = new_string;
- new_string.clear();
- while (end != std::string::npos)
- {
- end = data.find("role=\\\"button\\\">", start);
- if (end != std::string::npos)
- {
- new_string += data.substr(start, end - start);
- start = data.find("<\\/a", end);
- }
- else {
- new_string += data.substr(start, data.length() - start);
- }
- }
-
- // Append newline after attachement title
- start = new_string.find("class=\\\"uiAttachmentTitle", 0);
- if (start != std::string::npos)
- {
- data = new_string.substr(0, start);
- data = utils::text::trim(data);
-
- start = new_string.find(">", start);
- if (start != std::string::npos)
- new_string.insert(start + 1, "\n\n");
-
- start = new_string.find("<\\/div>", start);
- if (start != std::string::npos)
- new_string.insert(start, "\n");
- }
-
- // Append newline between attachement link and description
- start = new_string.find("uiAttachmentDesc", 0);
- if (start != std::string::npos)
- {
- start = new_string.find(">", start);
- if (start != std::string::npos)
- new_string.insert(start + 1, "\n");
-
- start = new_string.find("<\\/div>", start);
- if (start != std::string::npos)
- new_string.insert(start, "\n");
- }
-
- utils::text::replace_all(&new_string, "<br \\/>", "\n");
- utils::text::replace_all(&new_string, "\n\n\n", "\n\n");
- //utils::text::replace_all(&new_string, "\\t", "");
- //utils::text::replace_all(&new_string, "\\n", "");
- return new_string;
-}
-
-
std::string utils::text::remove_html(const std::string &data)
{
std::string new_string;
diff --git a/utils/std_string_utils.h b/utils/std_string_utils.h
index 4aec3cb574..af03718385 100644
--- a/utils/std_string_utils.h
+++ b/utils/std_string_utils.h
@@ -66,7 +66,6 @@ namespace utils
void treplace_all(std::tstring* data, const std::tstring &from, const std::tstring &to);
unsigned int count_all(std::string* data, const std::string &term);
std::string html_entities_decode(std::string data);
- std::string edit_html(std::string data);
std::string remove_html(const std::string &data);
std::string slashu_to_utf8(const std::string &data);
std::string trim(const std::string &data, bool rtrim = false);