diff --git a/.drone.yml b/.drone.yml
index d5529b0..506fe55 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -26,7 +26,7 @@ steps:
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential cmake g++-10 clang pkg-config
- - apt-get install -qq catch libcgicc-dev nlohmann-json3-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev
+ - apt-get install -qq catch libcgicc-dev nlohmann-json3-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev libpugixml-dev
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
@@ -62,7 +62,7 @@ steps:
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential cmake clang pkg-config
- - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev
+ - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev libpugixml-dev
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
@@ -92,7 +92,7 @@ steps:
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential cmake clang pkg-config
- - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-gnutls-dev libicu-dev libfmt-dev
+ - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-gnutls-dev libicu-dev libfmt-dev libpugixml-dev
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0940ac3..1f92fae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ pkg_check_modules(libgit2 REQUIRED IMPORTED_TARGET libgit2)
find_package(CURL 7.56 REQUIRED)
find_package(ICU REQUIRED COMPONENTS uc)
find_package(fmt 4 REQUIRED CONFIG)
+find_package(pugixml REQUIRED CONFIG)
add_subdirectory(src)
add_subdirectory(src/generators)
diff --git a/CREDITS b/CREDITS
index 804c9a4..72275ec 100644
--- a/CREDITS
+++ b/CREDITS
@@ -44,3 +44,8 @@ FediBlock-backend makes direct use of the following libraries and programs:
From: Victor Zverovich, Jonathan Müller and community
https://fmt.dev/
License: MIT
+
+ pugixml
+ From: Arseny KapoulkineVictor and community
+ https://pugixml.org/
+ License: MIT
diff --git a/README.adoc b/README.adoc
index 7650f1f..2c920e8 100644
--- a/README.adoc
+++ b/README.adoc
@@ -18,6 +18,7 @@
:uri-libcurl: https://curl.haxx.se/libcurl/
:uri-icu: http://site.icu-project.org/
:uri-fmt: https://github.com/fmtlib/fmt
+:uri-pugixml: https://pugixml.org/
*{project}* turns form data into JSON and opens a pull request on
link:https://schlomp.space/FediBlock/data[FediBlock/data]. Also included are
@@ -115,6 +116,7 @@ The RSS generator expects the blocklist to be in
* link:{uri-libcurl}[libcurl] (at least: 7.56)
* link:{uri-icu}[ICU] (tested: 67.1 / 60.2)
* link:{uri-fmt}[fmt] (tested: 7.0 / 4.0)
+* link:{uri-pugixml}[pugixml] (tested: 1.10 / 1.8)
* Optional
** Tests: link:{uri-catch}[Catch] (tested: 2.5 / 1.10)
** DEB package: link:{uri-dpkg}[dpkg] (tested: 1.19)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7fec9f5..7753476 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,7 +20,8 @@ target_link_libraries(fediblock
std::filesystem
PkgConfig::libgit2
ICU::uc
- fmt::fmt)
+ fmt::fmt
+ pugixml)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
target_link_libraries(fediblock PUBLIC ${CURL_LIBRARIES})
diff --git a/src/generators/rss.cpp b/src/generators/rss.cpp
index 14d2576..75df842 100644
--- a/src/generators/rss.cpp
+++ b/src/generators/rss.cpp
@@ -21,6 +21,7 @@
#include "time.hpp"
#include {:s} Tags: ",
- cgi::text2html(entry.description))};
+ string tmp_item_description{format(" {:s} Tags: ",
+ cgi::text2html(entry.description))};
for (const auto &tag : entry.tags)
{
if (tag != *entry.tags.begin())
{
- item_description += ", ";
+ tmp_item_description += ", ";
}
- item_description += tag;
+ tmp_item_description += tag;
}
- item_description += "";
+ tmp_item_description += "