mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	Form & save into DB
This commit is contained in:
		| @@ -31,13 +31,13 @@ final class ChillMarkdownRenderExtension extends AbstractExtension | ||||
|      * @var Parsedown | ||||
|      */ | ||||
|     protected $parsedown; | ||||
|      | ||||
|  | ||||
|     public function __construct() | ||||
|     { | ||||
|         $this->parsedown = new Parsedown(); | ||||
|         $this->parsedown->setSafeMode(true); | ||||
|     } | ||||
|      | ||||
|  | ||||
|     public function getFilters(): array | ||||
|     { | ||||
|         return [ | ||||
| @@ -46,9 +46,9 @@ final class ChillMarkdownRenderExtension extends AbstractExtension | ||||
|             ]) | ||||
|         ]; | ||||
|     } | ||||
|      | ||||
|     public function renderMarkdownToHtml(string $var): string | ||||
|  | ||||
|     public function renderMarkdownToHtml(?string $var): string | ||||
|     { | ||||
|         return $this->parsedown->parse($var); | ||||
|         return $this->parsedown->parse((string) $var); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user