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

epub - Spurious link after images #567

Closed
typhoon71 opened this issue Jul 8, 2016 · 8 comments
Closed

epub - Spurious link after images #567

typhoon71 opened this issue Jul 8, 2016 · 8 comments
Labels

Comments

@typhoon71
Copy link

When using sumatrapdf to read an epub there's a link after every image.
Happens to both the images at the start and those in the middle of chapters.
Doesn't happen in calibre (my "reference" epub reader, too bad it's heavy).

I noticed it when opening epubs made with webtoepub (chrome/firefox addon that creates epubs), here's the link to the issue: dteviot/WebToEpub#22 (comment).
You should find some relevant info on how an epub reader should behave in this circustance.

@AsukaLangleyfag
Copy link

AsukaLangleyfag commented Jul 8, 2016

(here was some shit)
I also vote for this feature.

@typhoon71
Copy link
Author

Ehm, dirty hack @ "plugin\js\Util.js"... but where is that?

@AsukaLangleyfag
Copy link

In the source code of WebToEpub. Or \js\Util.js of the actual plugin.

@typhoon71
Copy link
Author

I suppose an hack like this it won't work on signed plugin... which soon will be the norn, read enforced.

@belldandu
Copy link

belldandu commented Jul 12, 2016

@AsukaLangleyfag

Did you read dteviot/WebToEpub#22 (comment)

I'm going to assume however that said readers are attempting to parse random url's as <a> tags from what you are saying (which is NOT standard behavior and is a bug in these readers if they are).

The contents of the desc tag are also not supposed to be shown to the user via the reader unless the image has not been rendered. See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc

When the current SVG document fragment is rendered as SVG on visual media, desc elements are not rendered as part of the graphics.

This means that if an image exists within the svg and has been loaded then the desc tag is not rendered.

So i do recommend reporting these as bugs to the epub readers developers. Because we do not create svg elements unless there is an image.

People wanted image links to the source somewhere in the source so i placed them in a valid desc tag within an svg that already has an image tag.

Removing the code for that is not a "dirty hack" its just completely wrong. Now mind you we do plan to make the links optional in the future but by default on.

@kjk @zeniko I would appreciate if this issue did get attention as this reader is not following the xhtml spec for svg desc tags.

@belldandu
Copy link

Feature for disabling desc tag in svg element added. Issue has been closed on our end and labeled as "bug in reader" due to sumatrapdfs inability to meet the spec.

Said issue will not be reopened and i hope that someone gets around to fixing said bug because if it hadn't been for the fact that the users on bakabt asked about an option to disable the links i would have just slapped "bug in reader" and "wontfix" on the issue and left it there.

@GitHubRulesOK
Copy link
Collaborator

@typhoon71 @belldandu
Epub handling is currently under review
Please supply a sample or two where WebToEpub.epub files are not handled well

@GitHubRulesOK
Copy link
Collaborator

closing as epub/svg engines have changed and samples are not available to show any continuing behaviour issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants