summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-08-20 23:45:38 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-08-20 23:45:38 +0200
commit732b82c04dc80c2426913fa6f703dfe90ec15346 (patch)
tree9fcc03b2f7bfb1dec7655c28393ebc2cd0a84d22
parentff87bef0300c5bf7488ca6f9a1303a340cfece49 (diff)
Allow summary tag
-rw-r--r--src/Utils.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index c68dc83b..bae1d8a5 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -421,15 +421,16 @@ QString
utils::escapeBlacklistedHtml(const QString &rawStr)
{
static const std::set<QByteArray> allowedTags = {
- "font", "/font", "del", "/del", "h1", "/h1", "h2", "/h2",
- "h3", "/h3", "h4", "/h4", "h5", "/h5", "h6", "/h6",
- "blockquote", "/blockquote", "p", "/p", "a", "/a", "ul", "/ul",
- "ol", "/ol", "sup", "/sup", "sub", "/sub", "li", "/li",
- "b", "/b", "i", "/i", "u", "/u", "strong", "/strong",
- "em", "/em", "strike", "/strike", "code", "/code", "hr", "/hr",
- "br", "br/", "div", "/div", "table", "/table", "thead", "/thead",
- "tbody", "/tbody", "tr", "/tr", "th", "/th", "td", "/td",
- "caption", "/caption", "pre", "/pre", "span", "/span", "img", "/img"};
+ "font", "/font", "del", "/del", "h1", "/h1", "h2", "/h2",
+ "h3", "/h3", "h4", "/h4", "h5", "/h5", "h6", "/h6",
+ "blockquote", "/blockquote", "p", "/p", "a", "/a", "ul", "/ul",
+ "ol", "/ol", "sup", "/sup", "sub", "/sub", "li", "/li",
+ "b", "/b", "i", "/i", "u", "/u", "strong", "/strong",
+ "em", "/em", "strike", "/strike", "code", "/code", "hr", "/hr",
+ "br", "br/", "div", "/div", "table", "/table", "thead", "/thead",
+ "tbody", "/tbody", "tr", "/tr", "th", "/th", "td", "/td",
+ "caption", "/caption", "pre", "/pre", "span", "/span", "img", "/img",
+ "details", "/details", "summary", "/summary"};
constexpr static const std::array tagNameEnds = {' ', '>'};
constexpr static const std::array attrNameEnds = {' ', '>', '=', '\t', '\r', '\n', '/', '\f'};
constexpr static const std::array spaceChars = {' ', '\t', '\r', '\n', '\f'};