Browse Source

Fix escaping

mscherer 6 years ago
parent
commit
9f8d1a5db0
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/View/Helper/FormatHelper.php

+ 6 - 2
src/View/Helper/FormatHelper.php

@@ -365,7 +365,8 @@ class FormatHelper extends Helper {
 		}
 
 		$defaults = [
-			'class' => 'icon icon-' . $type . ' ' . $iconClass
+			'class' => 'icon icon-' . $type . ' ' . $iconClass,
+			'escape' => true,
 		];
 		$options += $defaults;
 
@@ -380,8 +381,11 @@ class FormatHelper extends Helper {
 			'data-placement' => 'bottom',
 			'data-toggle' => 'tooltip'
 		];
+		$formatOptions = $attributes + [
+			'escape' => $options['escape'],
+		];
 
-		$options['attributes'] = $this->template->formatAttributes($attributes);
+		$options['attributes'] = $this->template->formatAttributes($formatOptions);
 		return $this->template->format('icon', $options);
 	}