tags:

views:

44

answers:

1

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 tester some time.

+2  A: 

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 &amp; instead of &. If you don't want to do this, you can always disallow &s in the files as well.

MiffTheFox
Dan Harris
@Dan - What programming language are you using server-side? PHP? C#? ColdFusion?
MiffTheFox