Commit 2bac4c2b authored by Matija Obreza's avatar Matija Obreza

sitemap.xml: Ignore genera with whitespace

parent c15b4ddc
......@@ -190,7 +190,7 @@ public class SitemapXMLController {
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
sb.append("<urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");
taxonomyService.getAllGenera().stream().filter(g -> g.matches("^[a-zA-Z ]+$")).forEach(genus -> {
taxonomyService.getAllGenera().stream().filter(g -> g.matches("^[a-zA-Z]+$")).forEach(genus -> {
try {
writePage(response, sb, "/t/" + genus, Frequency.MONTHLY, 0.4);
sb.flush();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment