Edgewall Software
Modify

Opened 14 years ago

Last modified 9 years ago

#9689 new defect

Links on SVG images do not work

Reported by: anonymous Owned by:
Priority: lowest Milestone: next-major-releases
Component: rendering Version: 0.12-stable
Severity: normal Keywords: SVG external Links embed
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have a SVG graphic with external links. I can open this graphic in my web browser and get redirected to the external links (by clicking on the image). After attaching this image to a wiki post (in trac), this is no longer possible. I attached the SVG I tried to upload in a wiki.

Attachments (1)

iteraplanLandscapeDiagram.svg (6.3 KB ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (13)

by anonymous, 14 years ago

comment:1 by anonymous, 14 years ago

Keywords: SVG external Links added
Milestone: 0.12.2

Clicking on "Employee" or "Current Account" in the image would normally redirect to an external web site.

Thank you in advance

comment:2 by Stefan, 14 years ago

Milestone: 0.12.2
Version: 0.12-stable

took the liberty to set the correct version (assuming the creater of the ticket actually meant to specify the version he is/was using) and remove the target milestone

in reply to:  2 ; comment:3 by Stefan, 14 years ago

Replying to Stefan:

took the liberty to set the correct version (assuming the creater of the ticket actually meant to specify the version he is/was using) and remove the target milestone

hm… the ticket still shows up in the roadmap overview, even though I set the milestone to "". Did I do something wrong? http://trac.edgewall.org/query?group=status&milestone=0.12.2

in reply to:  3 comment:4 by Stefan, 14 years ago

Replying to Stefan:

Replying to Stefan:

took the liberty to set the correct version (assuming the creater of the ticket actually meant to specify the version he is/was using) and remove the target milestone

hm… the ticket still shows up in the roadmap overview, even though I set the milestone to "". Did I do something wrong? http://trac.edgewall.org/query?group=status&milestone=0.12.2

nevermind… was too quick with the reply —- everything seems correct :)

comment:5 by anonymous, 14 years ago

Thanks ;) I wasn't sure about the Milestone. But what is the solution to the problem?

comment:6 by Christian Boos, 14 years ago

Component: generalrendering
Keywords: embed added
Milestone: next-major-0.1X
Priority: normallowest

Indeed, the Image macro allows you to see SVG images, in browsers that support SVG content in <img> tags. However, it seems that they don't activate the links in this case (read for example this instructive discussion in the case of Firefox. Chrome, Safari and IE9 in my testing also don't activate the embedded links. Opera proposes you to download the file…

So to achieve what you want, you must embed the SVG using another tag, like the <embed> tag, which is what the TH:TracImageSvgMacro does.

We might add a proper Embed macro one day, keeping the ticket on the radar.

comment:7 by Christian Boos, 14 years ago

#9689 was closed as duplicate of this one.

in reply to:  6 comment:8 by Thijs Triemstra <lists@…>, 14 years ago

Cc: lists@… added

Replying to cboos:

Chrome, Safari and IE9 in my testing also don't activate the embedded links. Opera proposes you to download the file…

fwiw, when I open the .svg directly in Safari 4.1.2 on osx 10.4.11 it responds normally to the links and opens them.

comment:9 by Thijs Triemstra, 13 years ago

Cc: Thijs Triemstra added; lists@… removed

in reply to:  6 comment:10 by anonymous, 12 years ago

Replying to cboos:

So to achieve what you want, you must embed the SVG using another tag, like the <embed> tag, which is what the TH:TracImageSvgMacro does.

Just installed it (trac 1.0) and it doesn't work. It seems again there's no way to have SVGs with links, so please reopen this ticket.

Additionally, there doesn't seem to be any way to do image maps at all, neither this way, nor with raster image maps, as I couldn't get the usemap attribute of the Image macro to work either.

comment:11 by ted, 9 years ago

We should be able to use embedded svg if the page is served as HTML5. Ticket #5139 should be reopened, and we should serve with the HTML5 header, and allow the inline SVG to pass through. It is no longer a fringe thing to expect HTML5 embedded SVG or even MATHML, but you need to serve it with the proper doctype at least for the browser to try to render as such.

comment:12 by Ryan J Ollos, 9 years ago

PatchWelcome, though it may be nontrivial since Genshi doesn't support all of HTML5 and we still use doctype XHTML_STRICT: tags/trac-1.1.6/trac/web/chrome.py@:592#L591.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.