parent
0e24f0433c
commit
820d1b8e17
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project(gitea2rss
|
project(gitea2rss
|
||||||
VERSION 0.4.3
|
VERSION 0.4.4
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ this in it:
|
||||||
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}"/>
|
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}"/>
|
||||||
<link rel="alternate" type="application/rss+xml"
|
<link rel="alternate" type="application/rss+xml"
|
||||||
title="Tags of {{.Repository.Name}}"
|
title="Tags of {{.Repository.Name}}"
|
||||||
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}&type=tags"/>
|
href="https://rss.example.com/?repo={{.Repository.Owner.Name}}/{{.Repository.Name}}&type=tags"/>
|
||||||
{{end}}
|
{{end}}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <regex>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include "version.hpp"
|
#include "version.hpp"
|
||||||
#include "gitea2rss.hpp"
|
#include "gitea2rss.hpp"
|
||||||
|
@ -58,6 +59,7 @@ void write_preamble(const string &url, const string &type)
|
||||||
selfurl = "http://";
|
selfurl = "http://";
|
||||||
}
|
}
|
||||||
selfurl += string(server_name) + request_uri;
|
selfurl += string(server_name) + request_uri;
|
||||||
|
selfurl = std::regex_replace(selfurl, std::regex("&"), "&");
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"
|
cout << "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user