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 #28

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 fix

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.

FraGoTe commented 4 years ago

I totally agree this solves the problem.

geerteltink commented 4 years ago

Fixes #29

michalbundyra commented 4 years ago

@kokspflanze thanks, merged in 45ae47402c92d676aae58727e1d3aee728640c10. Versions 1.3.1 and 2.0.1 released with the hotfix.