From d9d0451313e429f22655a42ccf5d943330610002 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 4 May 2020 18:07:39 +1200 Subject: [PATCH] codesite2git: README.md: fix special characters --- codesite2git | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codesite2git b/codesite2git index 7e99a72..3976579 100755 --- a/codesite2git +++ b/codesite2git @@ -25,6 +25,9 @@ class CProjectGitExporter extends CProject { // Prepare to start modifying the generated README.md file $this->longdesc = preg_replace('~\\[url=([^\\]]+?)\\](.+?)\\[/url\\]~m', '[\\2](\\1)', $this->longdesc); + $this->longdesc = str_replace("\xEF\xBB\xBF", "", $this->longdesc); // Remove interior UTF-8 BOM markers + $this->longdesc = str_replace("\r", "", $this->longdesc); // dos2unix + $lines = explode("\n", $this->longdesc); $lines = array_merge(["# ".$this->projname, ""], $lines);