diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-04-04 22:37:45 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-04-05 06:07:14 +0000 |
commit | 156f778593ca9c57845076a88c6b544a63e12e7a (patch) | |
tree | 8fcb066ba966dc8993128218541e1f031215d67d /vcl/source/window/brdwin.cxx | |
parent | fbc04c97231d629c1b5e9e57203dbe8d8eb06714 (diff) |
tdf#106955: Detect XML by MediaType
According to Extensible Markup Language (XML) 1.0 (see
https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd),
all parts of XML prolog (including XML declaration) are optional,
so XML stream without <?xml ... ?> is well-formed (though not
valid).
XMLFilterDetect uses only XML declaration to detect if the file is
to be processed further. However, this creates problems with said
documents.
This commit checks if the document has MediaType set to one of
known XML media types, in case when the check for XML declaration
failed.
Change-Id: I31627c0e3a39bee241f609650280ebac3f1cede8
Reviewed-on: https://gerrit.libreoffice.org/36101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/window/brdwin.cxx')
0 files changed, 0 insertions, 0 deletions