Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download backup code doesn't generate working download link in french #460

Closed
sarcand opened this issue Sep 20, 2022 · 0 comments · Fixed by #494
Closed

Download backup code doesn't generate working download link in french #460

sarcand opened this issue Sep 20, 2022 · 0 comments · Fixed by #494
Assignees
Milestone

Comments

@sarcand
Copy link

sarcand commented Sep 20, 2022

Because the french traduction contains a single quote, encodeURI didn't encode single quote. The trick is to do the replacement of ' with %27, after the encoding.

I had to hack the code as following. I don't know if you have a better solution:

$text = encodeURI( txt_data );
$text = $text.replace( /'/g, '%27');
$( '#two-factor-backup-codes-download-link' ).attr( 'href', $text);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants