Fixed regex in unescape_html().

This commit is contained in:
tastytea 2019-05-18 06:16:54 +02:00
parent a79d0157fc
commit 57bf54ed32
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ const string Mastodon::unescape_html(const string &html)
// Used to convert int to utf-8 char
std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> u8c;
// Matches numbered entities between 1 and 8 digits, decimal or hexadecimal
std::regex re_entity("&#(x)?(\\d{1,8});");
std::regex re_entity("&#(x)?([[:alnum:]]{1,8});");
std::smatch match;
while (std::regex_search(buffer, match, re_entity))