Skip to content

[VET-6222] Investigate and fix issue with special characters in questions#318

Merged
anneeb merged 1 commit intomasterfrom
VET-6222-investigate-and-fix-issue-with-special-characters-in-questions
Nov 19, 2025
Merged

[VET-6222] Investigate and fix issue with special characters in questions#318
anneeb merged 1 commit intomasterfrom
VET-6222-investigate-and-fix-issue-with-special-characters-in-questions

Conversation

@SpiralP
Copy link
Copy Markdown
Member

@SpiralP SpiralP commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

@jakehamilton jakehamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix :)

Comment thread lib/catalog.js

const testConnection = (conn, connectionOptions) => {
const headers = conn.headers();
headers.set('Content-Type', 'text/turtle');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this change back to text/turtle when we eventually revert or is this call supposed to be json always?

Copy link
Copy Markdown
Member Author

@SpiralP SpiralP Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yea, fixed a bug here

below there is a:

// connectionOptions is a JSON object made up of properties of metadata provider parameters and their values in Turtle syntax
body: JSON.stringify(connectionOptions),

and it's used like this in another app:

  testConnection: createStardogAsyncThunk<{
    connectionOptions: Record<string, string>;
  }>('providers/testConnection', ({ connection, connectionOptions }) =>
    stardogCatalog.testConnection(connection, connectionOptions)
  ),

so it seems to be a json object of Record<string, string> (i think turtle was a mistake)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i should also mention i did test this, and both application/json and text/turtle give the same result with the same input

reading stardog code, it seems to do JSON.parse(...).getAsJsonObject() first as well

@SpiralP SpiralP assigned anneeb and unassigned jakehamilton and anneeb Nov 17, 2025
@SpiralP SpiralP assigned SpiralP and anneeb and unassigned anneeb and SpiralP Nov 18, 2025
@anneeb anneeb merged commit 9ce384b into master Nov 19, 2025
2 checks passed
@anneeb anneeb deleted the VET-6222-investigate-and-fix-issue-with-special-characters-in-questions branch November 19, 2025 14:28
@anneeb anneeb added this to the 9.1.0 milestone Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants