Closed Bug 160221 Opened 23 years ago Closed 23 years ago

data: URLs in HREF not working

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: benc, Unassigned)

References

()

Details

Short description: While writing a data: URL smoketest, I found that I could take the "larry" image from the RFC and get it to work in an html file, and via URL bar, but not via an HREF. Basically, I cleaned it up in notepad, so it had no whitespace, and pasted it into whatever I was using. data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH hhx4dbgYKAAA7 My guess is that it might be an escaping issue, but more educated people have other ideas. Since my experience w/ data: URLs is about 20 minutes old, I'm open to anyone else's ideas.
Hmm, works when I saved the link in bugzilla. possible composer bug then...
ok, I investigated a bit: The URL in this bug's URL field still contains a space (near the end) (where bugzilla wrapped comment 0). If inserted into a Composer link, it escapes the space to %20. (this is not a bug) Now, base64 URLs are not escaped by the Mozilla code (this may be a bug, not sure). This means that NSPR's Base64 decoder might fail because of the %20. Which causes the load to fail. Which explains why clicking the link does nothing. If I take out the space and create the link in composer, it works fine.
base64 urls shouldn't contain spaces, though.
(seeing this on linux too) so bbaetz... should we unescape the query string, or is this bug INVALID?
OS: MacOS X → All
Hardware: Macintosh → All
I went home and tried it in composer, and it worked fine. I must have made some strange typo when I was at work (even though I tried it a couple different times before going onto IRC...) Until I come up w/ better steps (or explain what happened before)... INVALID
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Now that I understand things better, I see what you mean. if I said "base64", and put a UTF-8 escaped space, well, I probably deserve that. Can someone VERIFY this bug? TIA.
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.