This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12050 - <img src="#my file"... doesnt display image
Summary: <img src="#my file"... doesnt display image
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-12 22:02 UTC by Megaten
Modified: 2011-08-04 05:13 UTC (History)
8 users (show)

See Also:


Attachments

Description Megaten 2011-02-12 22:02:21 UTC
If you use a correct filename with an # or an | charactere the command 

<IMG src="#myfilename"....  or

<IMG src="|ourfile"...      

 doesn't display any image.
Comment 1 Paul Cotton 2011-02-13 01:43:48 UTC
Changing the Component to "HTML5 spec" and setting Assignee to Ian Hickson.
Comment 2 Julian Reschke 2011-02-13 10:35:21 UTC
(In reply to comment #0)
> If you use a correct filename with an # or an | charactere the command 
> 
> <IMG src="#myfilename"....  or
> 
> <IMG src="|ourfile"...      
> 
>  doesn't display any image.

The parameter is a URI reference, not a filename. The "#" would need to be escaped.
Comment 3 Megaten 2011-02-13 21:40:04 UTC
Sorry | character is an invalide character for filename but the case is stil there with an  # anywhere inside the filename.
Comment 4 Megaten 2011-02-13 21:51:24 UTC
No more succes with an escape character
Comment 5 Aryeh Gregor 2011-02-14 00:37:05 UTC
You need to URL-escape them, specifically replacing "#" with "%23".  This doesn't have anything to do with the HTML spec, though.

("|" is a valid filename in Unix, by the way, including Linux and OS X.)
Comment 6 Megaten 2011-02-14 08:51:21 UTC
You are right. My misunderstanding is comming from the htmlenties that doesn't manage the # in standard.
So I close the item


<?php
$fn = "Config/img/@#T%23_Sur la route.jpg" ;
$fh = htmlentities($fn);
echo $fh."***".$fh."<br />";

echo "<img src=\"".$fh."\" />" ;
?>
Comment 7 Michael[tm] Smith 2011-08-04 05:13:06 UTC
mass-move component to LC1