Mark articles that begin with <details> as HTML (#1294)

This Brazilian news website called Tecnoblog [1] will often begin their
articles with the <details> tag, providing a short summary for them.

[1] https://tecnoblog.net/
This commit is contained in:
Guilherme Silva 2024-02-07 02:36:19 -03:00 committed by GitHub
parent c152df7584
commit 4cd363e445
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,7 @@ bool TextFactory::couldBeHtml(const QString& string) {
const QString sstring = string.simplified();
return sstring.startsWith(QL1S("<!")) || sstring.startsWith(QL1S("<html")) || sstring.startsWith(QL1S("<figure")) ||
sstring.startsWith(QL1S("<article")) || Qt::mightBeRichText(sstring);
sstring.startsWith(QL1S("<article")) || sstring.startsWith(QL1S("<details")) || Qt::mightBeRichText(sstring);
}
QDateTime TextFactory::parseDateTime(const QString& date_time) {