Support BOM at the beginning of content, fixes #372
Dieser Commit ist enthalten in:
Ursprung
68a91159e6
Commit
77d7989f3b
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: Hallo Welt
|
title: Hallo Welt
|
||||||
date: 12th December 1984
|
date: 12th December 1984
|
||||||
---
|
---
|
||||||
|
@ -103,7 +103,12 @@ class Content extends Entry
|
|||||||
|
|
||||||
$frontMatter = new FrontMatter();
|
$frontMatter = new FrontMatter();
|
||||||
|
|
||||||
$document = $frontMatter->parse($this->getContent());
|
$content = $this->getContent();
|
||||||
|
if (substr($content, 0, 3) == "\xef\xbb\xbf") {
|
||||||
|
$content = substr($content, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
$document = $frontMatter->parse($content);
|
||||||
|
|
||||||
$this->attributes = array_replace_recursive($this->attributes, $document->getData());
|
$this->attributes = array_replace_recursive($this->attributes, $document->getData());
|
||||||
$this->setContent($document->getContent());
|
$this->setContent($document->getContent());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren