void FormatHtml(CString &str)
{
CString tmp(str);
int index = -1;
int i=0;
while (index < str.GetLength())
{
index ++;
index = str.Find(">", index);
if (index == -1)
break;
if (str.GetAt(index + 1) == '<')
continue;
tmp.Insert(index+1 + i*2, "/r/n");
i++;
}
str = tmp;
index = -1;
i=0;
while (index < str.GetLength())
{
index ++;
index = str.Find("<", index);
if (index == -1)
break;
tmp.Insert(index + i*2, "/r/n");
i++;
}
str = tmp;
}
{
CString tmp(str);
int index = -1;
int i=0;
while (index < str.GetLength())
{
index ++;
index = str.Find(">", index);
if (index == -1)
break;
if (str.GetAt(index + 1) == '<')
continue;
tmp.Insert(index+1 + i*2, "/r/n");
i++;
}
str = tmp;
index = -1;
i=0;
while (index < str.GetLength())
{
index ++;
index = str.Find("<", index);
if (index == -1)
break;
tmp.Insert(index + i*2, "/r/n");
i++;
}
str = tmp;
}