return str;
} // eo html_entities(std::string)
+// convert HTML entities to something that can be viewed on a basic text console (restricted to ASCII-7)
+string html_entities_to_console(std::string str)
+{
+ // Normal chars
+ replace_all (str, "&", "&");
+ replace_all (str, "<", "<");
+ replace_all (str, ">", ">");
+ replace_all (str, """, "\"");
+ replace_all (str, "'", "'");
+ replace_all (str, "/", "/");
+
+ // Umlauts
+ replace_all (str, "ä", "ae");
+ replace_all (str, "ö", "oe");
+ replace_all (str, "ü", "ue");
+ replace_all (str, "Ä", "Ae");
+ replace_all (str, "Ö", "Oe");
+ replace_all (str, "Ü", "Ue");
+
+ // Misc
+ replace_all (str, "ß", "ss");
+
+ return str;
+}
bool replace_all(string &base, const char *ist, const char *soll)
{