diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-03-14 18:53:13 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-03-14 18:53:13 +0000 |
commit | 1cfc5b89706e1975244cfe2362ad6c429a7daa9a (patch) | |
tree | 9228770e3c0b8c298818205f2312ca7c3af7416f /amiga/gui.c | |
parent | 7acc13d8630cd55f74b23e41c07bfdac109c4fbf (diff) | |
download | netsurf-1cfc5b89706e1975244cfe2362ad6c429a7daa9a.tar.gz netsurf-1cfc5b89706e1975244cfe2362ad6c429a7daa9a.tar.bz2 |
More rigourous MIME type checking for CSS allows us to remove the icons from included
CSS files.
svn path=/trunk/netsurf/; revision=12049
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 5f638ebba..d8599e6b7 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -452,14 +452,19 @@ char* gui_find_resource(const char *filename) if(ami_locate_resource(path, filename) == false) { - /* Try with RISC OS HTML filetype, might work */ - strcpy(filename2, filename); - strcat(filename2, ",faf"); - - if(ami_locate_resource(path, filename2) == false) + if((strncmp(filename + strlen(filename) - 4, ".htm", 4) == 0) || + (strncmp(filename + strlen(filename) - 5, ".html", 5) == 0)) { - return NULL; + /* Try with RISC OS HTML filetype, might work */ + strcpy(filename2, filename); + strcat(filename2, ",faf"); + + if(ami_locate_resource(path, filename2) == false) + { + return NULL; + } } + else return NULL; } return path_to_url(path); |