Closed alexey-malov closed 5 years ago
std::string HtmlDecode(const std::string str)
for (HtmlEntityCode item : HTML_ENTITIES_CODES)
{
if (code == item.second)
{
return item.first;
}
}
const string code = GetEntityCode(ch);
if (!code.empty())
{
processedString.append(code);
}
else
{
processedString += ch;
}
[x] Программа неверно будет работать, если встретит между & и ; что-то, не являющееся сущностью.
[x] Добавить тесты на обработку этой ситуации
[x] Добавить & и ; к сущностям в функции кодирования, тогда не надо будет на лету заниматься склейкой строк