Skip to content

Commit

Permalink
Escape single quote when commenting on enum type (supabase#18289)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshenlim authored Oct 18, 2023
1 parent 6d192a1 commit dc9f296
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const CreateEnumeratedTypeSidePanel = ({
projectRef: project.ref,
connectionString: project.connectionString,
name: data.name,
description: data.description,
description: data.description?.replaceAll("'", "''"),
values: data.values.filter((x) => x.value.length > 0).map((x) => x.value),
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const EditEnumeratedTypeSidePanel = ({
isNew: x.isNew,
})),
...(data.description !== selectedEnumeratedType.comment
? { description: data.description }
? { description: data.description?.replaceAll("'", "''") }
: {}),
}

Expand Down

0 comments on commit dc9f296

Please sign in to comment.