Bug #359852 --> during composition, local file image urls aren't loaded in the compose window. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2006-11-09 22:48:42 +00:00
Родитель b145e9b6f6
Коммит c0330c37ac
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -286,13 +286,15 @@ nsMsgContentPolicy::ShouldLoad(PRUint32 aContentType,
return NS_OK; return NS_OK;
} }
// never load unexposed protocols except for http and https. // never load unexposed protocols except for http, https and file.
// Protocols like ftp, gopher are always blocked. // Protocols like ftp, gopher are always blocked.
PRBool isHttp; PRBool isHttp;
PRBool isHttps; PRBool isHttps;
PRBool isFile;
rv = aContentLocation->SchemeIs("http", &isHttp); rv = aContentLocation->SchemeIs("http", &isHttp);
rv |= aContentLocation->SchemeIs("https", &isHttps); rv |= aContentLocation->SchemeIs("https", &isHttps);
if (NS_FAILED(rv) || (!isHttp && !isHttps)) rv |= aContentLocation->SchemeIs("file", &isFile);
if (NS_FAILED(rv) || (!isHttp && !isHttps && !isFile))
return NS_OK; return NS_OK;
// If we are allowing all remote content... // If we are allowing all remote content...