diff --git a/modules/juce_core/xml/juce_XmlDocument.cpp b/modules/juce_core/xml/juce_XmlDocument.cpp index c0f016e3bb..bf56f4f637 100644 --- a/modules/juce_core/xml/juce_XmlDocument.cpp +++ b/modules/juce_core/xml/juce_XmlDocument.cpp @@ -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; } } }