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

[Bug]: IV URL in comment section redirect to wrong page #3669

Closed
6 tasks done
efb4f5ff-1298-471a-8973-3d47447115dc opened this issue Jun 15, 2023 · 4 comments · Fixed by #3711
Closed
6 tasks done

Comments

@efb4f5ff-1298-471a-8973-3d47447115dc

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have encountered this bug in the official downloads of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • This issue contains only one bug.

Describe the bug

  1. Go to https://youtu.be/4OjoZZVyHgc
  2. Load comments
  3. See url in pinned comments cut off and if u click on it redirects u to the wrong page.

It is also cut off on the IV side but they do redirect to the correct page.

With Invidious API
Capture1

Compared to our Local API
Capture

Expected Behavior

Redirect the user to the correct page if they click on the url.

Issue Labels

inconsistent behavior, text/string issue, usability issue

FreeTube Version

5295934

Operating System Version

Win10 22H2

Installation Method

.exe

Primary API used

Invidious API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

No response

Nightly Build

@lamemakes
Copy link
Contributor

@efb4f5ff-1298-471a-8973-3d47447115dc I can snag this one - looks like the issue is with the autolinker putting the links in the wrong order.

What's the purpose of the autolinker here? Would we be better off writing our own link parser?

@ChunkyProgrammer
Copy link
Member

@efb4f5ff-1298-471a-8973-3d47447115dc I can snag this one - looks like the issue is with the autolinker putting the links in the wrong order.

What's the purpose of the autolinker here? Would we be better off writing our own link parser?

I think the issue has more to do with our html stripping logic. We basically remove the a tags and keep the text. (

return value.replaceAll(/(<(?!br|\/?[bis]|img>)([^>]+)>)/gi, '')
)

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member Author

@lamemakes sorry for the late responses. I hope that the explanation above helps u out. I'll assign u to this issue!

@lamemakes
Copy link
Contributor

@efb4f5ff-1298-471a-8973-3d47447115dc I can snag this one - looks like the issue is with the autolinker putting the links in the wrong order.
What's the purpose of the autolinker here? Would we be better off writing our own link parser?

I think the issue has more to do with our html stripping logic. We basically remove the a tags and keep the text. (

return value.replaceAll(/(<(?!br|\/?[bis]|img>)([^>]+)>)/gi, '')

)

Great catch! You were dead on, made my life easy! Cheers!

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.

3 participants