Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 730702d

Browse files
authored
Merge pull request #249 from Sonny812/fix-html-validation
Fix html validation errors and warnings
2 parents 00eec1c + 1a7f71c commit 730702d

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/Resources/views/Form/ewz_recaptcha_widget.html.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<?php if ($attr['options']['size'] == 'invisible' && !isset($attr['options']['callback'])): ?>
44
<?php $attr['options']['callback'] = 'onReCaptchaSuccess' ?>
55

6-
<script type="text/javascript">
6+
<script>
77
var onReCaptchaSuccess = function() {
88
var errorDivs = document.getElementsByClassName('recaptcha-error');
99
if (errorDivs.length) {
@@ -28,7 +28,7 @@
2828
</script>
2929
<?php endif ?>
3030

31-
<script type="text/javascript" src="<?php echo $url_challenge ?>"
31+
<script src="<?php echo $url_challenge ?>"
3232
<?php if (isset($attr['options']['defer']) && $attr['options']['defer']): ?> defer<?php endif ?>
3333
<?php if (isset($attr['options']['async']) && $attr['options']['async']): ?> async<?php endif ?>
3434
></script>
@@ -43,8 +43,7 @@
4343
<div style="width: 302px; height: 352px; position: relative;">
4444
<div style="width: 302px; height: 352px; position: absolute;">
4545
<iframe src="https://<?php echo $ewz_recaptcha_apihost ?>/recaptcha/api/fallback?k=<?php echo $public_key ?>"
46-
frameborder="0" scrolling="no"
47-
style="width: 302px; height:352px; border-style: none;"
46+
style="width: 302px; height:352px; border-style: none; overflow: hidden;"
4847
>
4948
</iframe>
5049
</div>
@@ -61,7 +60,7 @@ class="g-recaptcha-response"
6160
<?php else: ?>
6261
<div id="ewz_recaptcha_div"></div>
6362

64-
<script type="text/javascript">
63+
<script>
6564
(function() {
6665
var script = document.createElement('script');
6766
script.type = 'text/javascript';

src/Resources/views/Form/ewz_recaptcha_widget.html.twig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% set options = attr.options|merge({'callback': 'onReCaptchaSuccess'}) %}
77
{% set attr = attr|merge({'options': options}) %}
88

9-
<script type="text/javascript">
9+
<script>
1010
var onReCaptchaSuccess = function() {
1111
var errorDivs = document.getElementsByClassName('recaptcha-error');
1212
if (errorDivs.length) {
@@ -31,7 +31,7 @@
3131
</script>
3232
{% endif %}
3333

34-
<script type="text/javascript" src="{{ form.vars.url_challenge }}"
34+
<script src="{{ form.vars.url_challenge }}"
3535
{%- if attr.options.defer is defined and attr.options.defer %} defer{% endif -%}
3636
{%- if attr.options.async is defined and attr.options.async %} async{% endif -%}
3737
></script>
@@ -47,8 +47,7 @@
4747
<div style="width: 302px; height: 352px; position: relative;">
4848
<div style="width: 302px; height: 352px; position: absolute;">
4949
<iframe src="https://{{ form.vars.ewz_recaptcha_apihost }}/recaptcha/api/fallback?k={{ form.vars.public_key }}"
50-
frameborder="0" scrolling="no"
51-
style="width: 302px; height:352px; border-style: none;"
50+
style="width: 302px; height:352px; border-style: none; overflow: hidden;"
5251
>
5352
</iframe>
5453
</div>
@@ -65,7 +64,7 @@
6564
{% else %}
6665
<div id="ewz_recaptcha_div"></div>
6766

68-
<script type="text/javascript">
67+
<script>
6968
(function() {
7069
var script = document.createElement('script');
7170
script.type = 'text/javascript';

0 commit comments

Comments
 (0)