Browse Source

Replace CR and CRLF endings with unix (LF) style endings in xml document as required by the W3 xml specification

tags/2021-05-28
hogliux 9 years ago
parent
commit
cc6f0a1de6
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      modules/juce_core/xml/juce_XmlDocument.cpp

+ 10
- 3
modules/juce_core/xml/juce_XmlDocument.cpp View File

@@ -617,9 +617,17 @@ void XmlDocument::readChildElements (XmlElement& parent)
}
else
{
for (;;)
for (;; ++input)
{
const juce_wchar nextChar = *input;
juce_wchar nextChar = *input;
if (nextChar == '\r')
{
nextChar = '\n';
if (input[1] == '\n')
continue;
}
if (nextChar == '<' || nextChar == '&')
break;
@@ -633,7 +641,6 @@ void XmlDocument::readChildElements (XmlElement& parent)
textElementContent.appendUTF8Char (nextChar);
contentShouldBeUsed = contentShouldBeUsed || ! CharacterFunctions::isWhitespace (nextChar);
++input;
}
}
}


Loading…
Cancel
Save