Better UTF-8 handling (for Jan)
This commit is contained in:
parent
0069eae331
commit
652559800e
2 changed files with 8 additions and 10 deletions
|
@ -1,7 +1,6 @@
|
|||
Yellow 0.4.13
|
||||
Yellow 0.4.14
|
||||
=============
|
||||
[](https://gitter.im/markseu/yellowcms)
|
||||
[](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).
|
||||
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.
|
|
@ -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);
|
||||
?>
|
||||
?>
|
Loading…
Add table
Reference in a new issue