Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add handling to escape quotation marks also.

Ivan Vasilovd32f97d1eb2b
diff --git a/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx b/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
index c76c158ee8c..0324cb9480c 100644
--- a/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
+++ b/studio/components/interfaces/SQLEditor/UtilityPanel/ResultsDropdown.tsx
@@ -31,7 +31,8 @@ const ResultsDropdown = ({ id }: ResultsDropdownProps) => {
return map(row, (v, k) => {
if (isString(v)) {
// replace all newlines with the character \n
- return v.replaceAll(/\n/g, '\\n')
+ // escape all quotation marks
+ return v.replaceAll(/\n/g, '\\n').replaceAll(/"/g, '""')
}
return v
})