Commit 1d2ae9b1 authored by vagelis-prokopiou's avatar vagelis-prokopiou Committed by Lachlan Ennis

Issue #2833733 by Vagelis: "Javascript" should be "JavaScript"

parent e11efbea
......@@ -41,7 +41,7 @@ function _captcha_available_challenge_types($add_special_options = TRUE) {
function captcha_admin_settings() {
module_load_include('inc', 'captcha');
// Use javascript for some added usability on admin form.
// Use JavaScript for some added usability on admin form.
drupal_add_js(drupal_get_path('module', 'captcha') . '/captcha.js');
// Configuration of which forms to protect, with what challenge.
......
......@@ -4,7 +4,7 @@
attach: function (context) {
// Turn off autocompletion for the CAPTCHA response field.
// We do it here with Javascript (instead of directly in the markup)
// We do it here with JavaScript (instead of directly in the markup)
// because this autocomplete attribute is not standard and
// it would break (X)HTML compliance.
$("#edit-captcha-response").attr("autocomplete", "off");
......
......@@ -181,7 +181,7 @@ function captcha_element_process($element, &$form_state, $complete_form) {
module_load_include('inc', 'captcha');
// Add Javascript for general CAPTCHA functionality.
// Add JavaScript for general CAPTCHA functionality.
drupal_add_js(drupal_get_path('module', 'captcha') . '/captcha.js');
// Prevent caching of the page with CAPTCHA elements.
......
......@@ -606,16 +606,16 @@ class CaptchaAdminTestCase extends CaptchaBaseWebTestCase {
// Set CAPTCHA on user register form.
captcha_set_form_id_setting('user_register', 'captcha/Math');
// Put Javascript snippet in CAPTCHA description.
// Put JavaScript snippet in CAPTCHA description.
$this->drupalLogin($this->admin_user);
$xss = '<script type="text/javascript">alert("xss")</script>';
$edit = array('captcha_description' => $xss);
$this->drupalPost(self::CAPTCHA_ADMIN_PATH, $edit, 'Save configuration');
// Visit user register form and check if Javascript snippet is there.
// Visit user register form and check if JavaScript snippet is there.
$this->drupalLogout();
$this->drupalGet('user/register');
$this->assertNoRaw($xss, 'Javascript should not be allowed in CAPTCHA description.', 'CAPTCHA');
$this->assertNoRaw($xss, 'JavaScript should not be allowed in CAPTCHA description.', 'CAPTCHA');
}
......
......@@ -14,7 +14,7 @@ function image_captcha_settings_form() {
// Add CSS for theming of admin form.
$form['#attached']['css'] = array(drupal_get_path('module', 'image_captcha') . '/image_captcha.css');
// Use javascript for some added usability on admin form.
// Use JavaScript for some added usability on admin form.
$form['#attached']['js'] = array(drupal_get_path('module', 'image_captcha') . '/image_captcha.js');
// First some error checking.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment