Thanks again for answering.
I admit that my pdf regex was a bit "open", but I have been very uncertain how "strict" one should be. I take it, though, that "strict" is better than "too open", so I changed my pdf regex to
^application\/pdf$
for the time being.
Running the Test file MIME type on the actual .xhtml file (created through export from LibreOffice) I got this:
Laravel File Validation
Passed
Mime Detector (primary)
text/html
PHP Fileinfo (fallback)
text/xml
Default file extension (if original is not whitelisted)
xml
This result was not was NOT as expected.
So, when I added the regex
^text\/html$
I could actually upload the file, however, the file extension was now suddenly changed from .xhtml to .xml in the uploaded file. Not really what I wanted, but I can live with that, though.
Realizing that the file MIME type is beyond the control of Flarum, I still wonder if there a way to avoid Flarum to alter the extension type in the file name for the uploaded file.
Or is this somehow not advisable?
Edited:
For a moment I believed that MIME file type issue lay in the file header managed by LibreOffice, but having inspected the file header, I really cannot see that this is the case.
To me the LibreOffice created file header appears very correct.
In fact, when I download the (now) .xml file (previously uploaded from .xhtml) and open it using a browser, the browser quite correctly interprets it as an xhtml file.
Therefore, to me, it now appears that Test file MIME type interprets the file MIME type of the file in question incorrectly. Could anyone else test this as well, please?