///////////////////////////////////////////////////////////////////////////////// //profanity check routines ///////////////////////////////////////////////////////////////////////////////// window.excludedWordList = "U0hJVCxTSElUVElORyxCSVRDSCxCSVRDSEVTLEZVQ0ssRlVDS0VSLEZVQ0tTLEZVQ0tFUlMsRlVDS0lORyxDVU5ULENVTlRTLENPQ0tTVUNLRVIsQ09DS1NVQ0tFUlMsTU9USEVSRlVDS0VSLE1PVEhFUkZVQ0tFUlMsTU9USEVSRlVDS0lORyxOSUdHRVIsTklHR0VSUw=="; function findFirstExcludedWord(content) { var rtn = ''; if (content.trim() != '') { var excludedWordsBase64 = window.excludedWordList; var excludedWords = decode64(excludedWordsBase64); var excludedWordsArray = excludedWords.split(','); var contentArray = content.toUpperCase().split(' '); //search for individual words $.each(contentArray, function (index, item) { var itemFoundIndex = $.inArray(item, excludedWordsArray); if (itemFoundIndex >= 0) { rtn = excludedWordsArray[itemFoundIndex]; } }); var doubleWords1 = []; var doubleWords2 = []; if (rtn == '' && contentArray.length > 1) { //create double word lists from content provided for (x = 0; x < contentArray.length; ) { doubleWords1.push(contentArray[x] + ' ' + contentArray[x + 1]); if (x + 2 < contentArray.length) doubleWords2.push(contentArray[x + 1] + ' ' + contentArray[x + 2]); x = x + 2; } //search for double words $.each(doubleWords1, function (index, item) { var itemFoundIndex = $.inArray(item, excludedWordsArray); if (itemFoundIndex >= 0) { rtn = excludedWordsArray[itemFoundIndex]; } }) if (rtn == '') { $.each(doubleWords2, function (index, item) { var itemFoundIndex = $.inArray(item, excludedWordsArray); if (itemFoundIndex >= 0) { rtn = excludedWordsArray[itemFoundIndex]; } }) } } } return rtn; } function decode64(input) { var b64array = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "="; var output = ""; var hex = ""; var chr1, chr2, chr3 = ""; var enc1, enc2, enc3, enc4 = ""; var i = 0; var base64test = /[^A-Za-z0-9\+\/\=]/g; if (base64test.exec(input)) { return ''; } input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); do { enc1 = b64array.indexOf(input.charAt(i++)); enc2 = b64array.indexOf(input.charAt(i++)); enc3 = b64array.indexOf(input.charAt(i++)); enc4 = b64array.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } chr1 = chr2 = chr3 = ""; enc1 = enc2 = enc3 = enc4 = ""; } while (i < input.length); return unescape(output); }