summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhass2015-09-23 10:43:15 (GMT)
committerhass2015-09-23 10:43:15 (GMT)
commit87f5143226b3d8beb8a074a95502056ffa2b14a9 (patch)
tree71b233a05e60359b3f1f24feab71ca3d5ab52cc0
parent4fd0611ba333d3e5855bf5596b17f79937a6a6e8 (diff)
Issue #2565895 by hass: Add a new :placeholder for URLs that handles bad
protocols
-rw-r--r--recaptcha.module2
-rw-r--r--src/Form/ReCaptchaAdminSettingsForm.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/recaptcha.module b/recaptcha.module
index 1324898..c19e115 100644
--- a/recaptcha.module
+++ b/recaptcha.module
@@ -21,7 +21,7 @@ require_once dirname(__FILE__) . '/src/ReCaptcha/RequestMethod/Drupal8Post.php';
function recaptcha_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'recaptcha.admin_settings_form':
- return t('Google <a href="@url">reCAPTCHA</a> is a free service to protect your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.', array('@url' => 'https://www.google.com/recaptcha'));
+ return t('Google <a href=":url">reCAPTCHA</a> is a free service to protect your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.', array(':url' => 'https://www.google.com/recaptcha'));
break;
}
}
diff --git a/src/Form/ReCaptchaAdminSettingsForm.php b/src/Form/ReCaptchaAdminSettingsForm.php
index f30c6d6..f7def94 100644
--- a/src/Form/ReCaptchaAdminSettingsForm.php
+++ b/src/Form/ReCaptchaAdminSettingsForm.php
@@ -43,7 +43,7 @@ class ReCaptchaAdminSettingsForm extends ConfigFormBase {
$form['general']['recaptcha_site_key'] = [
'#default_value' => $config->get('site_key'),
- '#description' => t('The site key given to you when you <a href="@url">register for reCAPTCHA</a>.', ['@url' => 'http://www.google.com/recaptcha/admin']),
+ '#description' => t('The site key given to you when you <a href=":url">register for reCAPTCHA</a>.', [':url' => 'http://www.google.com/recaptcha/admin']),
'#maxlength' => 40,
'#required' => TRUE,
'#title' => t('Site key'),
@@ -52,7 +52,7 @@ class ReCaptchaAdminSettingsForm extends ConfigFormBase {
$form['general']['recaptcha_secret_key'] = [
'#default_value' => $config->get('secret_key'),
- '#description' => t('The secret key given to you when you <a href="@url">register for reCAPTCHA</a>.', ['@url' => 'http://www.google.com/recaptcha/admin']),
+ '#description' => t('The secret key given to you when you <a href=":url">register for reCAPTCHA</a>.', [':url' => 'http://www.google.com/recaptcha/admin']),
'#maxlength' => 40,
'#required' => TRUE,
'#title' => t('Secret key'),
@@ -97,7 +97,7 @@ class ReCaptchaAdminSettingsForm extends ConfigFormBase {
];
$form['widget']['recaptcha_tabindex'] = [
'#default_value' => $config->get('widget.tabindex'),
- '#description' => t('Set the <a href="@tabindex">tabindex</a> of the widget and challenge (Default = 0). If other elements in your page use tabindex, it should be set to make user navigation easier.', ['@tabindex' => Url::fromUri('http://www.w3.org/TR/html4/interact/forms.html', ['fragment' => 'adef-tabindex'])->toString()]),
+ '#description' => t('Set the <a href=":tabindex">tabindex</a> of the widget and challenge (Default = 0). If other elements in your page use tabindex, it should be set to make user navigation easier.', [':tabindex' => Url::fromUri('http://www.w3.org/TR/html4/interact/forms.html', ['fragment' => 'adef-tabindex'])->toString()]),
'#maxlength' => 4,
'#title' => t('Tabindex'),
'#type' => 'textfield',