From 76834329c0979881a0df500acf4c7956fb57bc79 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 3 May 2015 09:53:38 +0000 Subject: Jabber: Changed Links menu in groupchats to support https links git-svn-id: http://svn.miranda-ng.org/main/trunk@13392 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_chat.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index e8ab75ca54..c1c2151267 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -535,16 +535,19 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) TCHAR *ptszStatusMsg = item->getTemp()->m_tszStatusMessage; if (ptszStatusMsg && *ptszStatusMsg) { TCHAR *bufPtr = url_buf; - for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http://")); p && *p; p = _tcsstr(p+1, _T("http://"))) { - mir_tstrncpy(bufPtr, p, SIZEOF(url_buf) - (bufPtr - url_buf)); - gc_item *pItem = sttFindGcMenuItem(gcmi, idx); - pItem->pszDesc = bufPtr; - pItem->uType = MENU_POPUPITEM; - for (; *bufPtr && !_istspace(*bufPtr); ++bufPtr) ; - *bufPtr++ = 0; + for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http")); p && *p; p = _tcsstr(p+1, _T("http"))) { + if (!_tcsncmp(p,_T("http://"),7) || !_tcsncmp(p,_T("https://"),8)) + { + mir_tstrncpy(bufPtr, p, SIZEOF(url_buf) - (bufPtr - url_buf)); + gc_item *pItem = sttFindGcMenuItem(gcmi, idx); + pItem->pszDesc = bufPtr; + pItem->uType = MENU_POPUPITEM; + for (; *bufPtr && !_istspace(*bufPtr); ++bufPtr) ; + *bufPtr++ = 0; - if (++idx > IDM_LINK9) - break; + if (++idx > IDM_LINK9) + break; + } } } for (; idx <= IDM_LINK9; ++idx) -- cgit v1.2.3