Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions SRC/Aura_OS/System/Parser/NanoXMLParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@ protected static bool IsSpace(char c)

protected static void SkipSpaces(string str, ref int i)
{
while (i < str.Length)
{
if (!IsSpace(str[i]))
for(; i < str.Length; i++)
{
if(!IsSpace(str[i]) && str.Length < i + 4 && str.Substring(i, i + 4).Equals("<!--"))
{
if (str[i] == '<' && i + 4 < str.Length && str[i + 1] == '!' && str[i + 2] == '-' && str[i + 3] == '-')
{
i += 4; // skip <!--
i += 4; // skip <!--

while (i + 2 < str.Length && !(str[i] == '-' && str[i + 1] == '-'))
i++;
while (i + 2 < str.Length && str.Substring(i, i + 2).Equals("--"))
i++;

i += 2; // skip --
}
else
break;
i += 2; // skip --
}

i++;
else
break;
}
}

Expand Down