surrealdb / surrealdb.deno

A Deno engine for the SurrealDB JavaScript SDK
https://surrealdb.com
Apache License 2.0
12 stars 4 forks source link

fix: sanitize rpc query #2

Closed dector closed 2 years ago

dector commented 2 years ago

Replacing \n with spaces for query() method.

(I'm not sure that it's not a workaround-ish however.)

Closes #1

korkje commented 2 years ago

This would break queries with e.g. conditions that data should contain newlines, no? 🤔 Not the most common use case to be sure, but a perfectly valid one. A fix like this one should probably make sure to only remove newlines outside of conditions and the like.

dector commented 2 years ago

@korkje I think you are right. Closing