-
Notifications
You must be signed in to change notification settings - Fork 328
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
External links with # gets broken. #133
Comments
… gets broken The bug replaces: ``` docker/for-linux#1015 (comment) ``` with: ``` https://htmlpreview.github.io/?https://github.com/ZimbiX/brendan-weibrecht-resume/blob/master/build/brendan-weibrecht-resume.html#issuecomment-841915668 ``` Issue: htmlpreview/htmlpreview.github.com#133
I ran into this bug as well, and it's pretty surprising and frustrating. When viewing my page:
where I had a link to this URL:
The bug replaces it with:
The problem code is here: htmlpreview.github.com/htmlpreview.js Lines 24 to 25 in 787b673
I don't really know what the usecase of this URL replacement is. The condition seems to assume the link is to an anchor within the current page; but in my case, it's on an external URL. I was going to attempt a fix myself, but without a test suite, I don't know what functionality I'd be breaking 😕 For now, I've had to work around the bug, using a URL shortener to preserve the anchor in the link: ZimbiX/brendan-weibrecht-resume@4616a44 |
@ZimbiX That line 25 is for cases when the anchor is targeting a section on the same page, i.e. |
@niutech Thanks for your response. I think I could have expessed myself clearer. I understood that links like I can't yet see a valid usecase for this particular replacement code; if there isn't one, we should probably remove it. |
Hi, I am trying to preview a link with # the link doesn't open and seems to be broken.
https://htmlpreview.github.io/?https://github.com/userID/blob/master/vignettes/Testing.html#
Attaching an image below for reference.
But, once I remove the "#" from the same link and try to access, the link opens.
The text was updated successfully, but these errors were encountered: