aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/html/html_tests.cxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-14 17:33:48 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-14 17:34:04 +0100
commit8d6010f86f77c07645319ddca16bd3000f0dcca6 (patch)
tree7cdf7c782a975cb654469b75cb91463715c26b3c /src/libserver/html/html_tests.cxx
parent4278c58ed2a4c5b779d809a27491125a8d80cc6e (diff)
downloadrspamd-8d6010f86f77c07645319ddca16bd3000f0dcca6.tar.gz
rspamd-8d6010f86f77c07645319ddca16bd3000f0dcca6.zip
[Minor] Html: Fix one more corner case
Diffstat (limited to 'src/libserver/html/html_tests.cxx')
-rw-r--r--src/libserver/html/html_tests.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libserver/html/html_tests.cxx b/src/libserver/html/html_tests.cxx
index 4e87d7e2d..73f2ad81b 100644
--- a/src/libserver/html/html_tests.cxx
+++ b/src/libserver/html/html_tests.cxx
@@ -223,6 +223,8 @@ TEST_CASE("html urls extraction")
{
using namespace std::string_literals;
const std::vector<std::tuple<std::string, std::vector<std::string>, std::optional<std::string>>> cases{
+ {"<style></style><a href=\"https://www.example.com\">yolo</a>",
+ {"https://www.example.com"}, "yolo"},
{"<a href=\"https://example.com\">test</a>", {"https://example.com"}, "test"},
{"<a <poo href=\"http://example.com\">hello</a>", {"http://example.com"}, "hello"},
{"<html>\n"
@@ -230,7 +232,7 @@ TEST_CASE("html urls extraction")
"<body>\n"
"<a href=\"https://www.example.com\">hello</a>\n"
"</body>\n"
- "</html>", {"https://www.example.com"}, "hello"}
+ "</html>", {"https://www.example.com"}, "hello"},
};
rspamd_url_init(NULL);