oops, fixed fatal bug in new HTML parsing code (I wonder why it didn't crash when...
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 2 Jul 2001 13:01:30 +0000 (13:01 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 2 Jul 2001 13:01:30 +0000 (13:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlpars.cpp
src/html/htmltag.cpp

index dc572b0a89830970ce9627ab41e792074eea4d5b..1b9c06726d608765b2c68e8766aa07188cb01e59 100644 (file)
@@ -110,7 +110,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
 
         else if (c == '<')  
            {
-            wxHtmlTag tag(m_Source, i, end_pos, m_Cache);
+            wxHtmlTag tag(m_Source, i, end_pos, m_Cache, m_entitiesParser);
 
             if (templen) 
                {
index 8801b152279de43a970bb59962f44314e813fe1c..52e0c1b8f8c7f692d912ba7439189390c2bf0869 100644 (file)
@@ -206,7 +206,10 @@ wxHtmlTag::wxHtmlTag(const wxString& source, int pos, int end_pos,
                 else if (state == ST_VALUE && quote == 0)
                 {
                     m_ParamNames.Add(pname);
-                    m_ParamValues.Add(entParser->Parse(pvalue));
+                    if (entParser)
+                        m_ParamValues.Add(entParser->Parse(pvalue));
+                    else
+                        m_ParamValues.Add(pvalue);
                 }
                 break;
             }
@@ -259,7 +262,10 @@ wxHtmlTag::wxHtmlTag(const wxString& source, int pos, int end_pos,
                             //     but wxHTML code relies on this... :(
                             pvalue.MakeUpper();
                         }
-                        m_ParamValues.Add(entParser->Parse(pvalue));
+                        if (entParser)
+                            m_ParamValues.Add(entParser->Parse(pvalue));
+                        else
+                            m_ParamValues.Add(pvalue);
                         state = ST_BEFORE_NAME;
                     }
                     else