diff --git a/lms/static/js/staff_debug_actions.js b/lms/static/js/staff_debug_actions.js index 0935031ad8cd..49d993fc8684 100644 --- a/lms/static/js/staff_debug_actions.js +++ b/lms/static/js/staff_debug_actions.js @@ -9,6 +9,10 @@ var StaffDebug = (function() { return string.replace(/[.*+?^:${}()|[\]\\]/g, '\\$&'); }; + var sanitizeScore = function(string){ + return string.replace(/[^0-9.]/g, ''); + }; + var getUser = function(locationName) { var sanitizedLocationName = sanitizeString(locationName); var uname = $('#sd_fu_' + sanitizedLocationName).val(); @@ -24,6 +28,7 @@ var StaffDebug = (function() { if (score === '') { score = $('#sd_fs_' + sanitizedLocationName).attr('placeholder'); } + score = sanitizeScore(score) return score; }; diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html index 849032b15b98..e46033fc578d 100644 --- a/lms/templates/staff_problem_info.html +++ b/lms/templates/staff_problem_info.html @@ -72,7 +72,7 @@

${_('Actions')}

% if can_override_problem_score:
- +
% endif