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.Utils
Assembly:
PDTec.IceNet.Web (in PDTec.IceNet.Web.dll) Version: 7.0.0.0 (7.0.6906.26599)
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