Support multiple usage of RSS merge tags, closes #329

This commit is contained in:
witzig 2017-09-29 12:22:37 +02:00
parent 46acece89c
commit 615ed5a693

View file

@ -135,7 +135,7 @@ function checkEntries(parent, entries, callback) {
if (/\[RSS_ENTRY[\w]*\]/i.test(html)) {
html = html.replace(/\[RSS_ENTRY\]/, entry.content); //for backward compatibility
Object.keys(entry).forEach(key => {
html = html.replace('[RSS_ENTRY_' + key.toUpperCase() + ']', entry[key]);
html = html.replace(new RegExp('\\[RSS_ENTRY_' + key.toUpperCase() + '\\]', 'g'), entry[key]);
});
} else {
html = entry.content + html;