concord-consortium / shutterbug

A rack utility using phantomjs that will create and save images (pngs) for a part of your web page's current dom. These images become available as public '.png' resources in the rack application. Currently shutterbug supports HTML, SVG and Canvas elements.
Other
27 stars 3 forks source link

Added server side fixup of single quoted client metadata attributes [#98586586] #19

Closed dougmartin closed 9 years ago

dougmartin commented 9 years ago

@scytacki @knowuh - this works locally on my phantom test environment using the current html being sent to the server.

scytacki commented 9 years ago

@dougmartin can you add a before and after string as a comment to this code. Something like: "This string was breaking phantom: [], the code here changes it to this string [] which works in phantom"

A test that verifies the code does the right conversion would be even better, but only if it is easy to add.

dougmartin commented 9 years ago

I changed the numeric regex placeholders to variable names and added tests which also serve as example transformations. The tests do not run by default.

scytacki commented 9 years ago

Thank you, it is more clear now. @knowuh what do you think?

knowuh commented 9 years ago

Yup, looks better. Thanks.