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

#convert_to_text misses closing a tag when no href is present but other attributes are #404

Open
ryanscottaudio opened this issue May 11, 2021 · 3 comments

Comments

@ryanscottaudio
Copy link
Contributor

ryanscottaudio commented May 11, 2021

The string "<a attr=\"attr\">foo</a><a href=\"test.com\">bar</a>", when run through convert_to_text, returns bar ( test.com ) (omitting the foo part entirely). I think this is because the regexes for a tags in #convert_to_text are missing everything between <a and the href in the SECOND a tag.

For comparison, "<a>foo</a><a href=\"test.com\">bar</a>" (removing attr=\"attr\") returns foobar ( test.com ). The regex skips the first a tag entirely.

@grosser
Copy link
Contributor

grosser commented May 11, 2021

sounds about right, pr welcome ... most likely just missing a ? somewhere in the regex 😞

@ryanscottaudio
Copy link
Contributor Author

@grosser i have a fix but i don't have access rights, do i have to push to a fork or something?

@grosser
Copy link
Contributor

grosser commented May 12, 2021 via email

This was referenced May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants