mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 652559800e40244d40fbe34a3ef4974516b399aa
parent 0069eae3317c64cdf0156b0478717c331843daff
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 16 Dec 2014 11:45:47 +0100

Better UTF-8 handling (for Jan)

Diffstat:
MREADME.md | 10++++------
Msystem/core/core.php | 11++++++-----
2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md @@ -1,7 +1,6 @@ -Yellow 0.4.13 +Yellow 0.4.14 ============= [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/markseu/yellowcms) -[![Status](https://travis-ci.org/markseu/yellowcms.svg)](https://travis-ci.org/markseu/yellowcms) Yellow is for people who make websites. [Visit website](http://datenstrom.se/yellow). @@ -26,6 +25,5 @@ You can [report issues](https://github.com/markseu/yellowcms/issues) on Github a License ------- -* Yellow by Mark Seuffert and David Fehrmann is licensed under [GPLv2](http://opensource.org/licenses/GPL-2.0). -* Yellow extensions are licensed under [GPLv2](http://opensource.org/licenses/GPL-2.0) unless stated otherwise. -* [PHP Markdown Extra](https://github.com/michelf/php-markdown) by Michel Fortin is licensed under [BSD license](http://opensource.org/licenses/BSD-3-Clause). -\ No newline at end of file +Yellow by Mark Seuffert and David Fehrmann is licensed under [GPLv2](http://opensource.org/licenses/GPL-2.0). +Yellow extensions are licensed under [GPLv2](http://opensource.org/licenses/GPL-2.0) unless stated otherwise. +\ No newline at end of file diff --git a/system/core/core.php b/system/core/core.php @@ -5,7 +5,7 @@ // Yellow main class class Yellow { - const Version = "0.4.13"; + const Version = "0.4.14"; var $page; //current page var $pages; //pages from file system var $config; //configuration @@ -417,7 +417,7 @@ class YellowPage $this->yellow->config->get("language"))); $this->set("parser", $this->yellow->config->get("parser")); - if(preg_match("/^(\-\-\-[\r\n]+)(.+?)([\r\n]+\-\-\-[\r\n]+)/s", $this->rawData, $parsed)) + if(preg_match("/^(\xEF\xBB\xBF)?\-\-\-[\r\n]+(.+?)[\r\n]+\-\-\-[\r\n]+/s", $this->rawData, $parsed)) { $this->metaDataOffsetBytes = strlenb($parsed[0]); foreach(preg_split("/[\r\n]+/", $parsed[2]) as $line) @@ -425,9 +425,9 @@ class YellowPage preg_match("/^\s*(.*?)\s*:\s*(.*?)\s*$/", $line, $matches); if(!empty($matches[1]) && !strempty($matches[2])) $this->set(lcfirst($matches[1]), $matches[2]); } - } else if(preg_match("/^([^\r\n]+)([\r\n]+=+[\r\n]+)/", $this->rawData, $parsed)) { + } else if(preg_match("/^(\xEF\xBB\xBF)?([^\r\n]+)[\r\n]+=+[\r\n]+/", $this->rawData, $parsed)) { $this->metaDataOffsetBytes = strlenb($parsed[0]); - $this->set("title", $parsed[1]); + $this->set("title", $parsed[2]); } $shortHeader = $this->location == $this->yellow->pages->getHomeLocation($this->location); @@ -2317,4 +2317,4 @@ date_default_timezone_set(@date_default_timezone_get()); // Error reporting for PHP error_reporting(E_ALL ^ E_NOTICE); -?> +?> +\ No newline at end of file