resourceloader: Strip leading BOM when concatenating files
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Wed, 11 May 2016 11:53:59 +0000 (13:53 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 31 May 2016 18:47:19 +0000 (19:47 +0100)
commit844199e67ca48a4de5253419fe06cedbdea71a34
tree2f358be72278acd29c63bd28e546b6fd12b8ae5d
parent2b61c4181d677c1da091744774a97a1ad7ccccf7
resourceloader: Strip leading BOM when concatenating files

We read files and concatenate their contents. Files may start with a BOM character.
BOM characters are only allowed at the beginning of a file, not half way.
Stripping it should be safe, since we already assume that everything is UTF-8.

Change-Id: I14ad698a684e78976e873e9ae2c367475550a063
includes/resourceloader/ResourceLoaderFileModule.php
tests/phpunit/data/css/bom.css [new file with mode: 0644]
tests/phpunit/includes/resourceloader/ResourceLoaderFileModuleTest.php