Relative links use "\" in win32 platform

Bug #168484 reported by Bug Importer
20
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Unassigned

Bug Description

When using Inkscape in win32 platform, relative links use the native "\"
for the xlink path. For instance:
<image
y="0"
x="0"
id="image7945"
height="401"
width="600"
sodipodi:absref="..\Images\test.png"
xlink:href="..\Images\test.png" />

However this is not a valid URI (it might be a valid URI but not referring
to the file test.png in the folder Image).

This "wrong" path is however supported by many browser (ASV, opera) but not
by all (firefox).

slash "/" should be used instead.

Revision history for this message
nightrow (jb-benoit) wrote :

Can someone take a look at the SVG specification and tell us what NEED to be implemented ?

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
hash (hash-g) wrote :

I think it is a Windows bug, not Inkscape bug.

Revision history for this message
prkos (prkos) wrote :

Yes URI scheme uses forward slash "/", Inkscape should use "/" then.

Leave proprietary stuff (ie. non standard) to SVG renderer to handle and translate to OS specific.

Revision history for this message
haddock (kaeptn-haddock) wrote :

imho this bug is of high importance. If someone works with inkscape in windows and then passes on the file to an artist using e.g. ubuntu, the ubuntu user will have to replace all backward slashes with forward slashes in all the linked image-urls before he may actually view the work. It's painful.

Revision history for this message
theAdib (theadib) wrote :
Changed in inkscape:
importance: Low → High
Revision history for this message
theAdib (theadib) wrote :

I made a committ 21290 in order to create uri names instead of local file names. It misses proper testing ...
I would like to extend this so that Inkscape "repairs" svg while loading.
How can I create relative path?

Adib.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

> It misses proper testing ...

Please, tell me specifically what needs to be tested.

Revision history for this message
Alvin Penner (apenner) wrote :

running Windows XP, I believe this is fixed. Attached is a typical reference obtained from importing an image.

- thanks, theAdib

    <image
       y="440.93362"
       x="141.28572"
       id="image22"
       height="240"
       width="266"
       xlink:href="file:///C:/WINDOWS/Temp/spiro_smooth.PNG" />

Marking as Fix Released. If you feel this has not been fully resolved, please feel free to re-open the report.

Changed in inkscape:
status: Confirmed → Fix Released
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

Is it possible that this fix brought back bug #170225? Now everything is linked absolutelly, and relative links have to be created manually.

Revision history for this message
theAdib (theadib) wrote :

probably yes:
the used glib functions g_filename_to_uri g_filename_from_uri use absolute file names

http://library.gnome.org/devel/glib/stable/glib-Character-Set-Conversion.html

Where it should be fairly easy to write the needed function for unixes it will be tricky for win32. Thought the g_lib function is handy :-(
Adib.
---

su_v (suv-lp)
tags: added: bitmap link
Revision history for this message
jazzynico (jazzynico) wrote :

It seems that the latests versions of the W3C recommendations now accept IRIs. But since Inkscape (and Firefox on GNU/Linux) doesn't support backslashes, I guess we're stuck with that patch (and the related bug #170225 regression).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.