소스 검색

feat: template decodeHtmlEntities filter

igb 4 달 전
부모
커밋
0901807d7d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      app/Services/LiquidFilters/Filters.php

+ 4 - 0
app/Services/LiquidFilters/Filters.php

@@ -54,4 +54,8 @@ class Filters
         return '<img src="' . htmlspecialchars($imageUrl, ENT_QUOTES) . '" alt="' . htmlspecialchars($alt, ENT_QUOTES) . '"' . $attrString . '>';
     }
 
+    public static function decodeHtmlEntities($input) {
+        return html_entity_decode($input, ENT_QUOTES, 'UTF-8');
+    }
+
 }