mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Cleanup prohibited words filter code and test data
This commit is contained in:
parent
dcec778e02
commit
e9de961a23
@ -186,9 +186,9 @@ Module.register("newsfeed", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.config.prohibitedWords.length > 0) {
|
if (this.config.prohibitedWords.length > 0) {
|
||||||
newsItems = newsItems.filter(function (value) {
|
newsItems = newsItems.filter(function (item) {
|
||||||
for (let word of this.config.prohibitedWords) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?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:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
@ -6,7 +7,6 @@
|
|||||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
||||||
>
|
>
|
||||||
|
|
||||||
<channel>
|
<channel>
|
||||||
<title>Rodrigo Ramírez Norambuena</title>
|
<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"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user