Fixed Minified js files are broken

TnT

Active member
Affected version
2.1.0 Release Candidate 1
This line:
PHP:
$result = preg_replace('/^[a-f0-9]+/', '', $result);
in file src/XF/Service/AddOn/JsMinifier.php breaks js files beginning with "a-f0-9"

Reproducer: Minify a file with following content:
JavaScript:
console.log("test");
the output will be:
JavaScript:
onsole.log("test");
which is broken js

I think he has the same problem: https://xenforo.com/community/threa...empty-result-provided-by-the-compiler.146870/
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.0 RC2).

Change log:
Remove unnecessary code sanitization in JsMinifier.php.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 

Similar threads

Back
Top Bottom