]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/applet/prepecho.cpp
corrected assert even better
[wxWidgets.git] / contrib / src / applet / prepecho.cpp
index 9fc3f9985b1b34710f6dbd0a047c13c9075a45d4..8181077116509652ad21c04ec51293622e10ec24 100644 (file)
 *
 ****************************************************************************/
 
-// For compilers that support precompilation
-#include "wx/wxprec.h"
-#include "wx/html/forcelnk.h"
-
 // Include private headers
 #include "wx/applet/prepecho.h"
 #include "wx/applet/echovar.h"
 
-/*---------------------------- Global variables ---------------------------*/
+// Force Link macro
+#include "wx/html/forcelnk.h"
 
+// wxWindows headers
+#include "wx/msgdlg.h"
 
 /*----------------------------- Implementation ----------------------------*/
 
@@ -68,7 +67,6 @@ wxString wxEchoPrep::Process(
        
        while ((i = (output.Lower()).Find(ft)) != -1) {
                // Loop until every #echo directive is found
-               
                int n, c, end;
         wxString cname, parms;
         wxString tag;
@@ -116,11 +114,13 @@ wxString wxEchoPrep::Process(
             // grab the value from the class, put it in tag since the data is no longer needed
             tag = wxEchoVariable::GetValue(cname, parms.c_str());
             }
-
+        // remove ampersands and <> chars
+        tag.Replace("&", "&amp;");
+        tag.Replace("<", "&lt;");
+        tag.Replace(">", "&gt;");
 
         output = (output.Mid(0,i) + tag + output.Mid(i));
                }
-       
     return output;
 }