]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix no tags case
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 23 Jul 2021 09:47:37 +0000 (10:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 23 Jul 2021 09:47:37 +0000 (10:47 +0100)
src/libserver/html/html.cxx

index 6cf3b959d3d263bec60bda32c57c4df470e2abda..0cf9505319c4aaf78702863c82c8046838b154d7 100644 (file)
@@ -1918,10 +1918,7 @@ html_process_input(rspamd_mempool_t *pool,
                break;
        }
 
-       if (!hc->all_tags.empty()) {
-               std::sort(hc->all_tags.begin(), hc->all_tags.end(), [](const auto &pt1, const auto &pt2) -> auto {
-                       return pt1->tag_start < pt2->tag_start;
-               });
+       if (!hc->all_tags.empty() && hc->root_tag) {
                html_append_tag_content(pool, start, end - start, hc, hc->root_tag,
                                exceptions, url_set);
        }