]> git.saurik.com Git - wxWidgets.git/commitdiff
wxHTML now supports not only " "-like specials but "&nbsp " as well
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Nov 1999 22:39:51 +0000 (22:39 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 3 Nov 1999 22:39:51 +0000 (22:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlcell.cpp

index 04570b412727c2545b1f20b6d11ae633039b8d95..b9139ae9e820ca012a9c1fc414aa0017e1c8d4e1 100644 (file)
@@ -73,11 +73,19 @@ bool wxHtmlCell::AdjustPagebreak(int *pagebreak)
 wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
 {
     m_Word = word;
+
     m_Word.Replace(wxT("&nbsp;"), wxT(" "), TRUE);
     m_Word.Replace(wxT("&quot;"), wxT("\""), TRUE);
     m_Word.Replace(wxT("&lt;"), wxT("<"), TRUE);
     m_Word.Replace(wxT("&gt;"), wxT(">"), TRUE);
     m_Word.Replace(wxT("&amp;"), wxT("&"), TRUE);
+
+    m_Word.Replace(wxT("&nbsp "), wxT(" "), TRUE);
+    m_Word.Replace(wxT("&quot "), wxT("\""), TRUE);
+    m_Word.Replace(wxT("&lt "), wxT("<"), TRUE);
+    m_Word.Replace(wxT("&gt "), wxT(">"), TRUE);
+    m_Word.Replace(wxT("&amp "), wxT("&"), TRUE);
+
     dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
     SetCanLiveOnPagebreak(FALSE);
 }