From d899bcc07bbdac8de88807a4d912f081e9cc7191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 17 Jul 2016 19:42:58 +0000 Subject: 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 --- utils/std_string_utils.cpp | 90 ---------------------------------------------- 1 file changed, 90 deletions(-) (limited to 'utils/std_string_utils.cpp') 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("", 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, "
", "\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; -- cgit v1.2.3