Bug 142191 - SVG export excludes graphic items with hyperlink using javascript
Summary: SVG export excludes graphic items with hyperlink using javascript
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.0.5.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2021-05-10 10:16 UTC by Ned
Modified: 2022-04-26 14:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example file (118.13 KB, application/octet-stream)
2021-05-31 12:33 UTC, Ned
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ned 2021-05-10 10:16:22 UTC
using LibO with Fedora 33, I'm having trouble with hyperlinks and SVG export.

As soon as I add an hyperlink starting with "javascript:void(0);" to a graphic item (bitmap, shape, inserted svg, ...) this item is excluded from SVG export.

I expected that it would be inserted in a <a id="whatever" xlink:href="javascript:void(0);"> markup surrounding the <g> that describes the graphic item.

Steps to reproduce : insert 2 bitmaps/graphic items in a new document, insert a classical hyperlink to one of the bitmaps (eg : "https://bugs.documentfoundation.org"), insert a javascript call hyperlink to the other (eg : "javascript:void(0);"), export to SVG format : the resulting SVG file doesn't contain the 2nd item.

My final goal is to promote using LibO-Draw to create SVG files presented/animated with Sozi and sounded with sonozise (see Sozi github discussions) to professionnal trainers that are not necesseraly very skilled with IT. The javascript links are there as very simple way to call a JS functions that play sounds during Sozi presentation.
Comment 1 Ned 2021-05-31 12:33:54 UTC
Created attachment 172495 [details]
example file

example file containing 2 images (SVG import) 
- an owl
- a tux

tux has a hyperlink ("javascript:void(0);")

When exporting to SVG and viewing with Firefox 88.0.1, tu x doesn't appear
Comment 2 Ned 2021-05-31 12:38:20 UTC
To make my self clearer : I attached an example .odg file containing 2 images (SVG import) : an owl and a tux.
I selected tux, added an hyperlink to it ("javascript:void(0);") and then exported the file to svg format.
When I use Firefox 88.0.1 to display the resulting SVG, Tux doesn't appear.
When I use Inkscape 1.0.2 to display the resulting SVG, Tux doesn't appear.

HTH
Comment 3 Buovjaga 2022-04-26 11:57:10 UTC
Reproduced with document

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 67d8c245daf7c6ee33e908255f2bbd0ea8d08206
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 37613bffe4621c444e5a34678bafb2c3a875263d
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 26 April 2022