MediaDescriptor is too strict when parsing ExtensionString

Found in

EPiServer.CMS.Core 7.5.394.2

Fixed in

EPiServer.CMS.Core 9.3.0


Oct 01, 2015


Oct 29, 2015


CMS Core


Closed, Fixed and tested


MediaDescriptor don't work if there is a space after the comma, e.g .png image (extension is ignored if there is a space after comma).

Steps to Reproduce

  1. Add a space in ExtensionString:

    [MediaDescriptor(ExtensionString = "jpg, png")]

  2. Now upload a .png image.
  3. Try to preview the image by double clicking in edit view.
  4. The file will open but no preview for image.
  5. Now remove the space in 1st step. remove browser cache to be sure and upload another .png.
  6. Now you can preview the image.

Expected: The image is preview able even if there is space in mediadescriptor after coma.
Actual: Image cannot be viewed.