aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-07 16:32:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-07 16:32:56 +0100
commit149ae7ca1c7c7b59f649804d3a1245d0a96edf18 (patch)
tree9652147326e10578e1017b91c112508f928f86b9
parentc0e15f80395c488709b9e1bac6bec664791a5448 (diff)
downloadrspamd-149ae7ca1c7c7b59f649804d3a1245d0a96edf18.tar.gz
rspamd-149ae7ca1c7c7b59f649804d3a1245d0a96edf18.zip
[Minor] Css: Fix numbers starting from '+'
-rw-r--r--src/libserver/css/css_parser.cxx1
-rw-r--r--src/libserver/css/css_tokeniser.cxx2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libserver/css/css_parser.cxx b/src/libserver/css/css_parser.cxx
index d7b1c8ca8..2af484043 100644
--- a/src/libserver/css/css_parser.cxx
+++ b/src/libserver/css/css_parser.cxx
@@ -835,6 +835,7 @@ TEST_SUITE("css parser") {
"p { color: rgba(100%, 50%, 0%, 0.1) } /* very transparent solid orange */",
".chat-icon[_ng-cnj-c0]::before{content:url(group-2.63e87cd21fbf8c966dd.svg);width:60px;height:60px;display:block}",
"tt{color:#1e3482}",
+ "tt{unicode-range: u+0049-u+004a,u+0020;}",
};
rspamd_mempool_t *pool = rspamd_mempool_new(rspamd_mempool_suggest_size(),
diff --git a/src/libserver/css/css_tokeniser.cxx b/src/libserver/css/css_tokeniser.cxx
index d6ddc2a5f..8d08eb7a2 100644
--- a/src/libserver/css/css_tokeniser.cxx
+++ b/src/libserver/css/css_tokeniser.cxx
@@ -307,7 +307,7 @@ auto css_tokeniser::consume_number() -> struct css_parser_token
auto i = offset;
auto seen_dot = false, seen_exp = false;
- if (input[i] == '-') {
+ if (input[i] == '-' || input[i] == '+') {
i ++;
}
if (input[i] == '.' && i < input.size()) {