Commit 63dae32c authored by Alex Danilo's avatar Alex Danilo Committed by Commit Bot

FilesApp: Correct MIME types for openxmlformats

Commit https://codereview.chromium.org/1158923004 updated
incorrect escapes in some RegExp constructors, but some
of the escapes were superfluous. When checking the formats
it became obvious that the original MIME types used were
incorrect for the family of openxmlformats documents.
This change corrects the MIME types and removes the
unneeded escapes.

BUG=chromium:675506
TEST=Ran all the FilesApp tests
Signed-off-by: default avatarAlex Danilo <adanilo@chromium.org>
Change-Id: Ic79e4655ebb61ea2e7c8fbb83509f899d7d1cb60
Reviewed-on: https://chromium-review.googlesource.com/c/1297775Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602525}
parent 34341b59
......@@ -372,8 +372,9 @@ FileType.types = [
subtype: 'Word',
pattern: /\.(doc|docx)$/i,
mimePattern: new RegExp(
'/application\\/(msword|vnd\\.openxmlformats\\-' +
'officedocument\\./wordprocessingml\\.document)/i')
'application/(msword|vnd\\.' +
'openxmlformats-officedocument\\.wordprocessingml\\.document)',
'i')
},
{
type: 'document',
......@@ -382,8 +383,9 @@ FileType.types = [
subtype: 'PPT',
pattern: /\.(ppt|pptx)$/i,
mimePattern: new RegExp(
'/application\\/(vnd\\.ms-powerpoint|\\.' +
'openxmlformats\\-/officedocument\\.wordprocessingml\\.presentation)/i')
'application/vnd\\.(ms-powerpoint|' +
'openxmlformats-officedocument\\.presentationml\\.presentation)',
'i')
},
{
type: 'document',
......@@ -392,8 +394,9 @@ FileType.types = [
subtype: 'Excel',
pattern: /\.(xls|xlsx)$/i,
mimePattern: new RegExp(
'/application\\/(vnd\\.ms-excel|\\.' +
'openxmlformats\\-/officedocument\\.wordprocessingml\\.sheet)/i')
'application/vnd\\.(ms-excel|' +
'openxmlformats-officedocument\\.spreadsheetml\\.sheet)',
'i')
}
];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment