]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix stupid misprints
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Jun 2021 15:47:49 +0000 (16:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Jun 2021 15:47:49 +0000 (16:47 +0100)
src/libserver/css/css.cxx
src/libserver/html/html.cxx

index 55d77824497101e6f3981cd75e2b574a2683e270..51f537b5a9c044aabc015089fbe0e9567473080e 100644 (file)
@@ -146,9 +146,6 @@ css_style_sheet::check_tag_block(const rspamd::html::html_tag *tag) ->
                                }
 
                                if (last == std::string_view::npos) {
-                                       if (start < strv.size()) {
-                                               ret.emplace_back(strv.substr(start));
-                                       }
                                        break;
                                }
 
@@ -164,7 +161,7 @@ css_style_sheet::check_tag_block(const rspamd::html::html_tag *tag) ->
                        auto found_class_sel = pimpl->class_selectors.find(
                                        css_selector{e, css_selector::selector_type::SELECTOR_CLASS});
 
-                       if (found_class_sel != pimpl->id_selectors.end()) {
+                       if (found_class_sel != pimpl->class_selectors.end()) {
                                const auto &decl = *(found_class_sel->second);
                                auto *tmp = decl.compile_to_block(pool);
 
@@ -180,10 +177,10 @@ css_style_sheet::check_tag_block(const rspamd::html::html_tag *tag) ->
 
        /* Tags part */
        if (!pimpl->tags_selector.empty()) {
-               auto found_tag_sel = pimpl->class_selectors.find(
+               auto found_tag_sel = pimpl->tags_selector.find(
                                css_selector{static_cast<tag_id_t>(tag->id)});
 
-               if (found_tag_sel != pimpl->id_selectors.end()) {
+               if (found_tag_sel != pimpl->tags_selector.end()) {
                        const auto &decl = *(found_tag_sel->second);
                        auto *tmp = decl.compile_to_block(pool);
 
index b9c1a41cc3de3860a3301aefdef46a33ef7339d2..bb6d8b72529dd957c8c00e86b4f03cd34c377226 100644 (file)
@@ -1033,7 +1033,7 @@ html_process_block_tag(rspamd_mempool_t *pool, struct html_tag *tag,
        }
 
        if (maybe_bgcolor) {
-               tag->block->set_bgcolor(maybe_fgcolor->to_color().value());
+               tag->block->set_bgcolor(maybe_bgcolor->to_color().value());
        }
 }