The characters I have come across that will break an image in a HTML page if used in the image’s filename are:
& / \ *
Are there any other filename characters that would cause an image to not display?
The reason I’m asking is I need to store an image of some text and need to replace invalid characters in the filename.
This mechanism is in place, just trying to find a quick list of characters to save the tes开发者_C百科ter some time.
First off, this is little to do with HTML and a lot to do with the OS your sever is running on.
It looks like Windows here, so the characters for that are
\ / : * ? < > |
The &
however, is likely a property of HTML. You can probably still use them in your files, but for the HTML, put &
instead of &
. If you don't want to do this, you can always disallow &
s in the files as well.
精彩评论