WebUtilsGetSafeMimeTypeValue Method |
Returns a sanitized Media Type string that is ready to be used as a Response.ContentType
value. This is to avoid XSS attacks with user-provided Media Type strings.
Namespace: PDTec.IceNet.Web.UtilsAssembly: PDTec.IceNet.Web (in PDTec.IceNet.Web.dll) Version: 6.0.0.0 (6.0.6225.27214)
Syntaxpublic static string GetSafeMimeTypeValue(
string mimeType
)
Parameters
- mimeType
- Type: SystemString
The Media Type input.
Return Value
Type:
StringThe sanitized Media Type string. Defaults to
application/octet-stream if illegal characters were detected in
mimeType.
See Also