-
Notifications
You must be signed in to change notification settings - Fork 71
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
Wrong parsing result for TXT records containing semicolons #34
base: master
Are you sure you want to change the base?
Conversation
Add support for URI records
…red for parsing subdomains
…rious blockstack codebases
Adds support for multiple strings in TXT records
…the extended array error reported with EmberJS
Refactor library
Thank you so much for the PR and reminding me about the bug. I really appreciate. But the changes in this PR are too big for me to comprehend. I will try to fix the bug itself. Thank you! |
Hi and thanks for your quick reply. I just wanted to propose a simple modification, which changes the regular expression used in the function removeComments() Here is a link to the patch I used in my working copy: https://gist.github.com/sergiomonteleone/a3fc44c2c6f8ca6b54f057ac3b3fa72e Note: while this will prevent the parser from removing characters from the TXT records, it may fail to remove inline comments, as this regex will only select lines starting with semicolon. TLDR it may need more testing. |
Refactor/typescript
build: make esm version
docs: removing the unnecessary $ from terminal commands.
The function removeComments() in parseZoneFile.js will remove any string starting with semicolon (;). Unfortunately this causes issues with TXT records with semicolon characters in it, breaking parsing.
Replacing the regular expression in removeConnets() to something like this:
/^;.*/gm
solves the problem.