From 3b1dca042158d0939ca995acc10162fdf227962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 28 Mar 2000 21:20:36 +0000 Subject: [PATCH] fixed bug in handling tags that use CR or LF as properties deliminer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmltag.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index 454ccafcaf..50ebc52dfd 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -128,7 +128,9 @@ wxHtmlTag::wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCac if (source[i] == '/') {m_Ending = TRUE; i++;} else m_Ending = FALSE; - while ((i < end_pos) && ((c = source[i++]) != ' ') && (c != '>')) { + while ((i < end_pos) && + ((c = source[i++]) != ' ' && c != '\r' && c != '\n' && + c != '>')) { if ((c >= 'a') && (c <= 'z')) c -= ('a' - 'A'); m_Name += c; } @@ -136,6 +138,7 @@ wxHtmlTag::wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCac if (source[i-1] != '>') while ((i < end_pos) && ((c = source[i++]) != '>')) { if ((c >= 'a') && (c <= 'z')) c -= ('a' - 'A'); + if (c == '\r' || c == '\n') c = ' '; // make future parsing a bit simpler m_Params += c; if (c == '"') { while ((i < end_pos) && ((c = source[i++]) != '"')) m_Params += c;