Svg linear gradient disappears if url contains the hash character (#)

RESOLVED DUPLICATE of bug 345544

Status

()

RESOLVED DUPLICATE of bug 345544
11 years ago
11 years ago

People

(Reporter: yoah, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

If an svg contains a gradient, referenced as fill="url(#label)", and the document url contains the hash key (#), then the gradient disappears.

Reproducible: Always

Steps to Reproduce:
1. Save the file included in the "Additional Info" as name.xml, and open with the browser. You should see a box with a gradient from red to blue.
2. Add the hash (#) character at the end of the url and hit enter. Then click refresh.
3. The gradient disappears and the box is now empty
Actual Results:  
The gradient disappears

Expected Results:  
The gradient should remain

Here is the file. Save it as name.xml.

<?xml version="1.0" encoding="utf-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body marginwidth="0" marginheight="0">

<svg fill="none" height="200" width="600" xmlns="http://www.w3.org/2000/svg">
<g>

<defs>

<linearGradient id="LG1" y1="50" x1="100" y2="150" x2="400" gradientUnits="userSpaceOnUse">
<stop stop-color="red"  offset="0%" />
<stop stop-color="blue" offset="100%" />
</linearGradient>

</defs>

<rect fill="url(#LG1)" stroke-width="1" stroke="black" height="100" width="300" y="50" x="100"></rect>

</g>
</svg>

</body>
</html>
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 345544
You need to log in before you can comment on or make changes to this bug.