question

Martin L avatar image
Martin L asked

What tool do people use to string-escape javascript for cloudscript upload

I'm looking to fill out my continuous integration process by automatically uploading a new cloudscript rather than manually pushing it. The cloudscript file needs to be string escaped. Just wondering if anyone had pointers on a good offline tool to do this?

Thanks.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joshua Strunk avatar image
Joshua Strunk answered

Most of the time when you get strings from a file or text buffer in any programming language / framework it is escaped. This guideline only effects you if you are adding code or generating code in which case the normal formatting rules apply.

Want a new line "/n", want a quotation mark "/"" etc...

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Another option would be to use the GitHub integration, and have your automation use that upload, if that makes things simpler.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.