paypal / react-engine

a composite render engine for universal (isomorphic) express apps to render both plain react views and react-router views
Apache License 2.0
1.45k stars 130 forks source link

Data script tag insertion doesn't use regex #187

Open jjacobskind opened 7 years ago

jjacobskind commented 7 years ago

I was getting an invalid checksum error when rendering a page that contained a series of dollar signs ($$$). Since dollar signs are a special character in regex, every two dollar signs were being combined into a single escaped dollar sign (ex: $$$ -> $$).

samsel commented 7 years ago

@jjacobskind what are your thoughts on adding some more tests around this?

jjacobskind commented 7 years ago

You mean just testing that special regex characters no longer cause an error? I can do that.

samsel commented 7 years ago

yes please