mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
fix illegal characters bug when reading Settings.txt with LF line endings
--HG-- branch : 1.x extra : transplant_source : %EE%25%C4%22%FBL%D9%8E%8A%E8%C7%25%A8x%27A%B7%D4%06%D2
This commit is contained in:
@@ -54,8 +54,11 @@ namespace Orchard.Environment.Configuration {
|
||||
if (String.IsNullOrEmpty(text))
|
||||
return shellSettings;
|
||||
|
||||
var settings = text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var setting in settings) {
|
||||
var settings = new StringReader(text);
|
||||
string setting;
|
||||
while ((setting = settings.ReadLine()) != null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(setting)) continue; ;
|
||||
var separatorIndex = setting.IndexOf(Separator);
|
||||
if (separatorIndex == -1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user