openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

<html:div>: Googles reCAPTCHA is not displayed

Open born2dev opened this issue 8 years ago • 2 comments

Dear UI5-Team, according to https://developers.google.com/recaptcha/docs/display -> Automatically render the reCAPTCHA widget

I try to setup a reCAPTCHA v2.

My XML-view definition is as follows:

<f:Form title="{i18n>ttl.loginDetails}" layout="ResponsiveGridLayout" itable="true" class="sapUiForceWidthAuto sapUiResponsiveMargin"> 
<f:formContainers> 
<f:FormContainer> 
  <f:formElements> 
   <f:FormElement>         
    <f:fields> 
     <html:div class="g-recaptcha" data-sitekey="<my key>"></html:div> 
    </f:fields> 
   </f:FormElement> 
  </f:formElements> 
</f:FormContainer> 
</f:formContainers> 
</f:Form> 

From the Elements page in Google Chromes debugger I can see that the div-Element is created. However the captcha is not displayed. I also tried with the control sap.ui.core.HTML. OpenUI5 version: 1.44.30 Any help is much appreciated.

born2dev avatar Jul 13 '18 11:07 born2dev

Hello @born2dev , There are restriction regarding using html in form control. You can check in the documentation. There is described: "Warning: Do not put any layout or other container controls into the FormElement."... Regarding sap.ui.core.HTML are you aware that there is security warnings of usage: "Security Hint: By default, the HTML content (property 'content') is not sanitized and therefore open to XSS attacks." Regards, Diana

Shtilianova avatar Jul 19 '18 08:07 Shtilianova

Since there is no response from the author for more than 4 weeks I'm closing the ticket.

Shtilianova avatar Sep 03 '18 10:09 Shtilianova