Comment 11 for bug 702423

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote : Re: Scour corrupts deja-dup.svg

<path inkscape:r_cy="true" inkscape:r_cx="true" style="opacity: 1; fill:
 url(&quot;#linearGradient2513&quot;) rgb(0, 0, 0); rest irrelevant" d="omitted for brevity"/>

findReferencedElements has this in its code, at line 451, which depends on the "referencing properties" being XML attributes:

    # now get all style properties and the fill, stroke, filter attributes
    styles = node.getAttribute('style').split(';')
    for attr in referencingProps:
        styles.append(':'.join([attr, node.getAttribute(attr)]))

meaning that a value of "" overwrites the value for the 'fill' property coming from style="". A fix would be to add a check for getAttribute(attr) != ''.

I'm tired and need to sleep, but had to debug this. If I have time tomorrow I can also try to fix it, first seeing if the fix is needed in any more locations.