浏览代码

Fix escaping

mscherer 6 年之前
父节点
当前提交
9f8d1a5db0
共有 1 个文件被更改,包括 6 次插入2 次删除
  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);
 	}