diff --git a/cck/cckwiz/iniFiles/Info.ini b/cck/cckwiz/iniFiles/Info.ini index 69e7c84ba89b..ef958411d148 100644 --- a/cck/cckwiz/iniFiles/Info.ini +++ b/cck/cckwiz/iniFiles/Info.ini @@ -27,7 +27,7 @@ Help=Online;%Root%CCKHelp\info.html [Navigation Controls] -onNext=VerifySet(%OrganizationName%,User Agent String is required to proceed with custom build creation,User Agent String should not contain spaces); +onNext=VerifySet(%OrganizationName%,User Agent String is required to proceed with custom build creation,User Agent String should not contain spaces);IsNonAscii(%OrganizationName%,User Agent String should contain only ascii characters) Help=InfoHelp.ini diff --git a/cck/driver/interpret.cpp b/cck/driver/interpret.cpp index 7e051def9325..b8d4c627b79a 100644 --- a/cck/driver/interpret.cpp +++ b/cck/driver/interpret.cpp @@ -886,6 +886,32 @@ BOOL CInterpret::interpret(CString cmds, WIDGET *curWidget) } } + else if (strcmp(pcmd, "IsNonAscii") == 0) + { + // check if user agent string contains non-ascii characters + char *message = strchr(parms, ','); + if (message) + { + *message = '\0'; + message++; + } + else + AfxMessageBox("A message belongs here", MB_OK); + + CString value = replaceVars(parms, NULL); + char *userAgent = (char *)(LPCTSTR)value; + while (*userAgent != '\0') + { + if ((__isascii(*userAgent)) == 0) + { + CWnd myWnd; + myWnd.MessageBox(message, "Error", MB_OK|MB_SYSTEMMODAL); + return FALSE; + } + else + userAgent++; + } + } else if (strcmp(pcmd, "ValidateRemoteAdmin") == 0) { // if checkbox is set, then there must be a URL.