From 72480355d4b06159aee54b363e2758a6478c71e4 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 28 Oct 2014 14:33:51 -0400 Subject: [PATCH] Restored needed functionality stomped by merge commit - See 85d24c9faf4ecce58c3ef21483ac1a17e528749f. --- themes/bootstrap3/js/common.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 56273cf3d41..c21b5ec45b2 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -1,4 +1,4 @@ -/*global ajaxLoadTab, checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, vufindString */ +/*global ajaxLoadTab, btoa, checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, unescape, vufindString */ /* --- GLOBAL FUNCTIONS --- */ function htmlEncode(value){ @@ -203,8 +203,9 @@ function ajaxLogin(form) { // get the user entered password var password = form.password.value; - // encrypt the password with the salt - password = rc4Encrypt(salt, password); + // base-64 encode the password (to allow support for Unicode) + // and then encrypt the password with the salt + password = rc4Encrypt(salt, btoa(unescape(encodeURIComponent(password)))); // hex encode the encrypted password password = hexEncode(password); @@ -301,7 +302,7 @@ $(document).ready(function() { q:query, method:'getACSuggestions', searcher:searcher['searcher'], - type:$('#searchForm_type').val(), + type:$('#searchForm_type').val() }, dataType:'json', success: function(json) { @@ -315,7 +316,7 @@ $(document).ready(function() { cb([]); } } - }) + }); } } ); -- GitLab