]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/hyperlink.cpp
Remove some out of date comments.
[wxWidgets.git] / src / msw / hyperlink.cpp
index ff2e8e9ccc7b1bea97943c9db1ed1408cf80a715..cb8951c93646fe3466aedb4125503d9798115cb5 100644 (file)
@@ -24,7 +24,7 @@
 #include "wx/hyperlink.h"
 
 #ifndef WX_PRECOMP
 #include "wx/hyperlink.h"
 
 #ifndef WX_PRECOMP
-    #include "wx/stattext.h"
+    #include "wx/app.h"
     #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/msw/private.h"
     #include "wx/msw/missing.h"
     #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/msw/private.h"
     #include "wx/msw/missing.h"
@@ -62,8 +62,11 @@ namespace
 
     wxString GetLabelForSysLink(const wxString& text, const wxString& url)
     {
 
     wxString GetLabelForSysLink(const wxString& text, const wxString& url)
     {
-        return wxString("<A HREF=\"") + wxStaticText::RemoveMarkup(url) + "\">"
-            + wxStaticText::RemoveMarkup(text) + "</A>";
+        // Any "&"s in the text should appear on the screen and not be (mis)
+        // interpreted as mnemonics.
+        return wxString::Format("<A HREF=\"%s\">%s</A>",
+                                url,
+                                wxControl::EscapeMnemonics(text));
     }
 }
 
     }
 }