From 57bf54ed3234bb9bb6d5732c67815d02e87947a8 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 18 May 2019 06:16:54 +0200 Subject: [PATCH] Fixed regex in unescape_html(). --- src/mastodon-cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mastodon-cpp.cpp b/src/mastodon-cpp.cpp index 0a76460..bf042a9 100644 --- a/src/mastodon-cpp.cpp +++ b/src/mastodon-cpp.cpp @@ -319,7 +319,7 @@ const string Mastodon::unescape_html(const string &html) // Used to convert int to utf-8 char std::wstring_convert, 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))