laminas / laminas-developer-tools

Module for developer and debug tools for use with laminas-mvc applications.
BSD 3-Clause "New" or "Revised" License
23 stars 13 forks source link

escape of \\ in toolbar content, which create a JS Exception #27

Closed kokspflanze closed 4 years ago

kokspflanze commented 4 years ago
Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

With the last migration to symfony/var-dumper we get now following error

Uncaught SyntaxError: Invalid regular expression: /([.*+?^${}()|\[\]\/\])/g, idRx = /\bsf-dump-\d+-ref[012]\w+\b/: Range out of order in character class

Because the Escaper change /([.*+?^${}()|\[\]\/\\])/g to /([.*+?^${}()|\[\]\/\])/g

So the Escaper create a invalid regex, with this fix, the escaper handle it correctly.