sparkle-project / Sparkle

A software update framework for macOS
https://sparkle-project.org
Other
7.46k stars 1.05k forks source link

Hyperlinks in Release Notes Do Not Work When "target='_blank'" Attribute Exists #430

Closed bdkjones closed 1 year ago

bdkjones commented 10 years ago

I use the <sparkle:releaseNotesLink> tag in my appcast to load a static HTML page that displays release notes for each update. Frequently, those release notes contain hyperlinks that take the user to a page (like this issue tracker) where a more in-depth discussion appears. Unfortunately, there is a problem with Sparkle:

Current/Bad Behavior:

Hyperlinks do not work when clicked on from within the Sparkle update window.

Expected/Desired Behavior

When clicked, hyperlinks from the release notes should open in the user's default web browser in a new tab.

kainjow commented 9 years ago

See if this can be reproduced with more details, and using the latest version. I see code in Sparkle to handle this, but it will ignore the URL click if the page hasn't fully loaded, so maybe there's an issue with your page not fully loading. Does it function in Safari and appear to fully load?

zorgiepoo commented 9 years ago

I have had no problems on my end for this.

bdkjones commented 7 years ago

This continues to be an issue with the latest version of Sparkle.

@zorgiepoo Can you post the exact HTML that you're loading in your release notes? Do your links have the target='_blank' attribute?

bdkjones commented 7 years ago

@kainjow The release notes page functions perfectly in every browser and loads fully. It's also fully loaded in the Sparkle update window (as far as I can tell; it's visually all there and complete). The page includes no scripts or stylesheets or other assets; it's 100% self-contained.

bdkjones commented 7 years ago

Did some more testing. If the hyperlink has a target='_blank' attribute, it will fail to open from the Sparkle release notes window.

This is a bit of an issue because I use the same release notes HTML page on my app's official website, where I DO want the links to open in a new tab. Sparkle should ignore the target attribute and simply always open the link in the default browser.

zorgiepoo commented 1 year ago

I think this works with the WebKit2 implementation Sparkle adopted since 1.25. Not sure why the WebKit1 implementation doesn't pick up such URLs with this attribute, but it's a legacy / fall back implementation.