- m_Word.Replace(" ", " ", TRUE);
- m_Word.Replace(""", "\"", TRUE);
- m_Word.Replace("<", "<", TRUE);
- m_Word.Replace(">", ">", TRUE);
- m_Word.Replace("&", "&", TRUE);
+
+ if (m_Word.Find(wxT('&')) != -1)
+ {
+ static wxChar* substitutions[][3] =
+ {
+ { wxT(" "), wxT("  "), wxT(" ") },
+ { wxT("©"), wxT("© "), wxT("(c)") },
+ { wxT("""), wxT("" "), wxT("\"") },
+ { wxT("<"), wxT("< "), wxT("<") },
+ { wxT(">"), wxT("> "), wxT(">") },
+ { wxT("&"), wxT("& "), wxT("&") /*this one should be last one*/ },
+ { NULL, NULL, NULL }
+ };
+
+ for (int i = 0; substitutions[i][0] != NULL; i++)
+ {
+ m_Word.Replace(substitutions[i][0], substitutions[i][2], TRUE);
+ m_Word.Replace(substitutions[i][1], substitutions[i][2], TRUE);
+ }
+ }
+