casher icon indicating copy to clipboard operation
casher copied to clipboard

Replace any possible escape sequences in external text inserted into …

Open native-api opened this issue 6 years ago • 2 comments

…messages

(This is a PR against another PR, https://github.com/travis-ci/casher/pull/49)

native-api avatar Aug 01 '19 04:08 native-api

I'm sorry, but I don't understand the rationale for this. We control what arguments are sent to these functions, and we should be reasonably certain that the strings don't need escaping.

BanzaiMan avatar Aug 01 '19 18:08 BanzaiMan

Some of the insertions contain user data for which we cannot be certain that it doesn't have backslashes. For strings you control, you can be certain, but if you don't escape them, you'll have to make judgements calls on what does and doesn't need escaping. A completely unnecessary maintenance burden and a stealthy source of bugs if this changes in the future.

native-api avatar Aug 02 '19 02:08 native-api