Commit a5e98ec3 authored by vagelis-prokopiou's avatar vagelis-prokopiou Committed by elachlan

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

parent 0ef17ff3
......@@ -47,7 +47,7 @@ class Captcha extends FormElement {
// Add captcha.inc file.
module_load_include('inc', 'captcha');
// Add Javascript for general CAPTCHA functionality.
// Add JavaScript for general CAPTCHA functionality.
$element['#attached']['library'][] = 'captcha/base';
if ($form_state->getTriggeringElement() && !empty($form_state->getTriggeringElement()['#limit_validation_errors'])) {
......
......@@ -218,13 +218,13 @@ 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->adminUser);
$xss = '<script type="text/javascript">alert("xss")</script>';
$edit = ['description' => $xss];
$this->drupalPostForm(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');
......
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