]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/hyperlink.cpp
Set missing Language: headers in PO files.
[wxWidgets.git] / src / msw / hyperlink.cpp
index de729770fd53bf3853bae9b10fc64fa8b1b4b317..f39d94ae17f092ae121b70fbc660b22fba07b153 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     Hyperlink control
 // Author:      Rickard Westerlund
 // Created:     2010-08-03
-// RCS-ID:      $Id$
 // Copyright:   (c) 2010 wxWidgets team
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -25,7 +24,6 @@
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
-    #include "wx/stattext.h"
     #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/msw/private.h"
     #include "wx/msw/missing.h"
@@ -63,8 +61,11 @@ namespace
 
     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));
     }
 }