diff --git a/bridges/FeedReducerBridge.php b/bridges/FeedReducerBridge.php
index 1963b53b..613a5539 100644
--- a/bridges/FeedReducerBridge.php
+++ b/bridges/FeedReducerBridge.php
@@ -54,7 +54,7 @@ class FeedReducerBridge extends FeedExpander {
}
public function getName(){
- $trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage'));
+ $trimmedPercentage = preg_replace('/[^0-9]/', '', $this->getInput('percentage') ?? '');
return parent::getName() . ' [' . $trimmedPercentage . '%]';
}
}
diff --git a/lib/BridgeCard.php b/lib/BridgeCard.php
index e58cddb1..ebd958fb 100644
--- a/lib/BridgeCard.php
+++ b/lib/BridgeCard.php
@@ -88,7 +88,7 @@ This bridge is not fetching its content through a secure connection';
$form .= ''
. PHP_EOL;
@@ -102,10 +102,12 @@ This bridge is not fetching its content through a secure connection';
$form .= self::getCheckboxInput($inputEntry, $idArg, $id);
}
- if(isset($inputEntry['title']))
- $form .= 'i';
- else
+ if(isset($inputEntry['title'])) {
+ $title_filtered = filter_var($inputEntry['title'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);
+ $form .= 'i';
+ } else {
$form .= '';
+ }
}
$form .= '';
@@ -153,9 +155,9 @@ This bridge is not fetching its content through a secure connection';
. ' id="'
. $id
. '" type="text" value="'
- . filter_var($entry['defaultValue'], FILTER_SANITIZE_STRING)
+ . filter_var($entry['defaultValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
. '" placeholder="'
- . filter_var($entry['exampleValue'], FILTER_SANITIZE_STRING)
+ . filter_var($entry['exampleValue'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)
. '" name="'
. $name
. '" />'