diff options
Diffstat (limited to 'utils/std_string_utils.cpp')
-rw-r--r-- | utils/std_string_utils.cpp | 90 |
1 files changed, 0 insertions, 90 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;
|