modxorg/Docs

Issue on building-sites/elements/chunks

anton-zaharov opened this issue · 0 comments

Affected page(s)

The chunk is return empty string when has fragment "{return..." in it without space after "{"
For example, native chunk recaptchav2_invisible_html return empty string

<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=[[++cultureKey]]"></script>
<script>function recaptchaV2SubmitForm(response)**{return** new Promise(function(){document.getElementById('[[+form_id]]').submit();})}</script>
<button type="submit" class="g-recaptcha" name="login" data-sitekey="[[+site_key]]" data-callback="recaptchaV2SubmitForm">Login</button>

But after adding space before "return" work normal