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

_normalizeText removendo @ em chaves do tipo email #4

Closed
thalesog opened this issue Mar 31, 2021 · 2 comments
Closed

_normalizeText removendo @ em chaves do tipo email #4

thalesog opened this issue Mar 31, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@thalesog
Copy link
Contributor

Olá pessoal!
Notei que ao criar qrcodes estáticos, a função _normalizeText está removendo o @ do email, fazendo com que o resultado seja um BRCode/QRCode inválido.

Pelo que analisei, apenas adicionando o @ no seguinte código:
Linha 82 -- lib/pix.ts

return str['normalize']("NFD").replace(/[^A-Z0-9$@%*+-\./:]/gi, ' ')

o problema é solucionado.
@hiagodotme pode nos auxiliar nisso?

@hiagodotme
Copy link
Owner

Olá @thalesog tudo bem? Eu não testei chaves com e-mail, faz sentido o que você falou. O manual para gerar o BRCode, no item 2.1. Definições Comuns informava os tipos de caracteres aceitos, e nele não continha o @, mas faz sentido ele estar nessa lista.

@thalesog se você preferir pode fazer um PR que eu mesclo a master, pode modificar a versão no package.json para 1.1.3 que eu já publico uma versão no NPM.

@hiagodotme hiagodotme added the bug Something isn't working label Mar 31, 2021
@hiagodotme
Copy link
Owner

Correção feita no PR #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants