kbytesys/django-recaptcha2

white space error

Closed this issue · 1 comments

If I set type="audio" in the widget, then I get data-type="audio " in the resultant HTML which does not work due to the extra space.

Looking at recaptcha_automatic.html I see the space before the quotes, think it needs to go after the quotes.

I suspect this isn't going to be required for my project however I thought I should let you know anyway.

diff --git a/snowpenguin/django/recaptcha2/templates/snowpenguin/recaptcha/recaptcha_automatic.html b/snowpenguin/django/recaptcha2/templates/snowpenguin/recaptcha/recaptcha_automatic.html
index 0973024..a873026 100644
--- a/snowpenguin/django/recaptcha2/templates/snowpenguin/recaptcha/recaptcha_automatic.html
+++ b/snowpenguin/django/recaptcha2/templates/snowpenguin/recaptcha/recaptcha_automatic.html
@@ -1 +1 @@
-<div class="g-recaptcha" id="{{ container_id }}" data-sitekey="{{ public_key }}" {% if theme %}data-theme="{{ theme }} "{% endif %}{% if type %}data-type="{{ type }} "{% endif %}{% if size %}data-size="{{ size }} "{% endif %}{% if tabindex %}data-tabindex="{{ tabindex }} "{% endif %}{% if callback %}data-callback="{{ callback }} "{% endif %}{% if expired_callback %}data-expired-callback="{{ expired_callback }}"{% endif %}></div>
\ No newline at end of file
+<div class="g-recaptcha" id="{{ container_id }}" data-sitekey="{{ public_key }}" {% if theme %}data-theme="{{ theme }}" {% endif %}{% if type %}data-type="{{ type }}" {% endif %}{% if size %}data-size="{{ size }}" {% endif %}{% if tabindex %}data-tabindex="{{ tabindex }}" {% endif %}{% if callback %}data-callback="{{ callback }}" {% endif %}{% if expired_callback %}data-expired-callback="{{ expired_callback }}"{% endif %}></div>

Fixed thanks!