omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
11.42k stars 594 forks source link

Bug when editing tag description, breaking when inserting description with double quote #4123

Open noghartt opened 1 week ago

noghartt commented 1 week ago

image

When I insert a new tag description containing a double quote, the server return a 400 with a GraphQL error, like the print above. See the mutation:

    mutation {
      updateLabel(
        input: {
          color: "#7BE4FF"
          name: "til"
          description: ""today i learned" articles"
          labelId: "<label id>"
        }
      ) {
        ... on UpdateLabelSuccess {
          label {
            id
            name
            color
            description
            createdAt
          }
        }
        ... on UpdateLabelError {
          errorCodes
        }
      }
    }
fbtot commented 4 days ago

The same problem occurs with label names as well. It only happens when editing existing labels, not when creating a new one.

As a temporary workaround, you can escape double quotes manually (\"today i learned\" articles).