Placeholder text on Dropin form appears encoded incorrectly
See original GitHub issueGeneral information
- SDK/Library version: 1.4.0
- Environment: Sandbox
- Browser and OS Tested across all standard up to date browsers in Windows 7 and Ubuntu 14.04
Issue description
Greetings,
I am in the process of migrating from hosted fields to Dropin V3. The only issue I cannot seem to get resolved is the placeholder text appears to have an encoding issue.
Note the placeholder below. It is a similar case on the CVV field.
<input type="tel" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" class="number" data-braintree-name="number" name="credit-card-number" id="credit-card-number" maxlength="22" placeholder="•••• •••• •••• ••••" aria-invalid="true">
Please let me know if I can provide any other app specific details that might be helpful. Coffeescript:
braintree.dropin.create {
authorization: gon.client_token
container: '#dropin-container'
locale: 'en_US'
}, (createErr, instance) ->
form.addEventListener 'submit', (event) ->
event.preventDefault()
instance.requestPaymentMethod (err, payload) ->
if err
console.log 'Error', err
return
# Add the nonce to the form and submit
document.querySelector('#nonce').value = payload.nonce
form.submit()
return
return
return
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Placeholder text set by javascript not decoding HTML ...
In Javascript, special characters are encoded with \uXXXX (Like \u00C9 ) ... the button to change the placeholder text of the text field....
Read more >Encoding problem with placeholders in CMS 12
In the Placeholder field we write "Platshållartext" but when the field in rendered the placeholder text is "Platshållartext".
Read more >Custom card integration - Adyen Docs
For web: Build your own UI for the card payment form, and then use our Custom Card Web Component to collect, validate, and...
Read more >The Anatomy of Accessible Forms - Deque Systems
A Placeholder Is Not a Replacement for Visible Labels. In recent years, placeholders are being used to provide visible labels for the form ......
Read more >Premiere pro export glitch
264 in the video format and select a particular quality, it will directly be ... this problem, I switched from Hardware Encoding to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same problem when I manually copied the dropin.min.js file and pasted it locally. Calling straight from the cdn or downloading it and saving has fixed the issue originally described for me.
<script src="https://js.braintreegateway.com/web/dropin/1.11.0/js/dropin.min.js"></script>
Going to close this, because I think the problem seems to be from the source computer copying the encoding incorrectly. When used from the CDN with the correct character set encoding, it should not display incorrectly.