summaryrefslogtreecommitdiffstats
path: root/utility
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-07-25 00:43:00 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-07-25 00:43:00 +0200
commiteac8eca7a35fedb899312424d518f3b75269bad7 (patch)
tree9fe61dc6617cffde5f993d73b7ed8d15f6a67819 /utility
parentb655fc74e433df15f61a00963581f2775e9ddbc1 (diff)
clean up indention
Diffstat (limited to 'utility')
-rw-r--r--utility/feedfetcher.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php
index c3568ab63..217723d83 100644
--- a/utility/feedfetcher.php
+++ b/utility/feedfetcher.php
@@ -115,11 +115,12 @@ class FeedFetcher implements IFeedFetcher {
$item = new Item();
$item->setStatus(0);
$item->setUnread();
- $item->setUrl(html_entity_decode($simplePieItem->get_permalink(),
- ENT_COMPAT, 'UTF-8'));
+ $item->setUrl(
+ html_entity_decode($simplePieItem->get_permalink(), ENT_COMPAT, 'UTF-8')
+ );
+
// unescape content because angularjs helps against XSS
- // unescape again to clean up fucktard's RSS feeds who escape twice
- // (I'm looking at you slashdot)
+ // unescape again to clean up stuff that was escaped
$item->setTitle(
html_entity_decode(
html_entity_decode($simplePieItem->get_title(), ENT_COMPAT, 'UTF-8'),
@@ -128,9 +129,15 @@ class FeedFetcher implements IFeedFetcher {
$guid = $simplePieItem->get_id();
$item->setGuid($guid);
$item->setGuidHash(md5($guid));
- $item->setBody(str_replace('<a', '<a target="_blank"',
- // escape XSS
- $this->purifier->purify($simplePieItem->get_content())));
+
+ // links should always open in a new window
+ $item->setBody(
+ str_replace(
+ '<a', '<a target="_blank"', $this->purifier->purify(
+ $simplePieItem->get_content()
+ )
+ )
+ );
// pubdate is not required. if not given use the current date
$date = $simplePieItem->get_date('U');
>3. Fill in KAVENEGAR_API_KEY="" KAVENEGAR_SENDER="" 4. Add the recipient phone numbers to DEFAULT_RECIPIENT_KAVENEGAR="" Set them in `/etc/netdata/health_alarm_notify.conf` (to edit it on your system run `/etc/netdata/edit-config health_alarm_notify.conf`), like this: ``` ############################################################################### # Kavenegar (kavenegar.com) SMS options # multiple recipients can be given like this: # "09155555555 09177777777" # enable/disable sending kavenegar SMS SEND_KAVENEGAR="YES" # to get an access key, after selecting and purchasing your desired service # at http://kavenegar.com/pricing.html # login to your account, go to your dashboard and my account are # https://panel.kavenegar.com/Client/setting/account from API Key # copy your api key. You can generate new API Key too. # You can find and select kevenegar sender number from this place. # Without an API key, Netdata cannot send KAVENEGAR text messages. KAVENEGAR_API_KEY="" KAVENEGAR_SENDER="" DEFAULT_RECIPIENT_KAVENEGAR="" ``` [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fhealth%2Fnotifications%2Fkavenegar%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)