Substitutions : Implemented InfoDialog

This commit is contained in:
YuSanka 2021-06-28 17:20:04 +02:00 committed by Vojtech Bubnik
parent 731ac9287e
commit 1e60acde12
10 changed files with 214 additions and 35 deletions

View file

@ -888,7 +888,7 @@ unsigned get_current_pid()
#endif
}
std::string xml_escape(std::string text)
std::string xml_escape(std::string text, bool is_marked/* = false*/)
{
std::string::size_type pos = 0;
for (;;)
@ -903,8 +903,8 @@ std::string xml_escape(std::string text)
case '\"': replacement = """; break;
case '\'': replacement = "'"; break;
case '&': replacement = "&"; break;
case '<': replacement = "&lt;"; break;
case '>': replacement = "&gt;"; break;
case '<': replacement = is_marked ? "<" :"&lt;"; break;
case '>': replacement = is_marked ? ">" :"&gt;"; break;
default: break;
}