Cleanup prohibited words filter code and test data

This commit is contained in:
rejas 2021-04-24 21:59:16 +02:00 committed by veeck
parent dcec778e02
commit e9de961a23
2 changed files with 212 additions and 212 deletions

View File

@ -186,9 +186,9 @@ Module.register("newsfeed", {
}
if (this.config.prohibitedWords.length > 0) {
newsItems = newsItems.filter(function (value) {
newsItems = newsItems.filter(function (item) {
for (let word of this.config.prohibitedWords) {
if (value["title"].toLowerCase().indexOf(word.toLowerCase()) > -1) {
if (item.title.toLowerCase().indexOf(word.toLowerCase()) > -1) {
return false;
}
}

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
<channel>
>
<channel>
<title>Rodrigo Ramírez Norambuena</title>
<atom:link href="https://rodrigoramirez.com/feed/" rel="self" type="application/rss+xml" />
<atom:link href="https://rodrigoramirez.com/feed/" rel="self" type="application/rss+xml"/>
<link>https://rodrigoramirez.com</link>
<description>Temas sobre Linux, VoIP, Open Source, tecnología y lo relacionado.</description>
<lastBuildDate>Fri, 21 Oct 2016 21:30:22 +0000</lastBuildDate>