Skip to content

Commit

Permalink
Better input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 23, 2019
1 parent 504f819 commit e3f7a85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/appier_extras/parts/recaptcha/part.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def _build_script(self, action):
recaptcha_key = appier.conf("RECAPTCHA_KEY", None)
appier.verify(recaptcha_key, message = "No reCAPTCHA site key provided")
return "<script type=\"application/javascript\" src=\"https://www.google.com/recaptcha/api.js?render=%s\"></script>" % recaptcha_key +\
"<script type=\"application/javascript\">window.genRecaptcha = function() { document.getElementById(\"recaptcha-token\") && grecaptcha.ready(function() {" +\
"grecaptcha.execute(\"%s\", {action: \"%s\"}).then(function(token) {" % (recaptcha_key, action) +\
"<script type=\"application/javascript\">window.genRecaptcha = function() { grecaptcha.ready(function() {" +\
"document.getElementById(\"recaptcha-token\") && grecaptcha.execute(\"%s\", {action: \"%s\"}).then(function(token) {" % (recaptcha_key, action) +\
"document.getElementById(\"recaptcha-token\").value = token;" +\
"});" +\
"});" +\
Expand Down

0 comments on commit e3f7a85

Please sign in to comment.