Skip to main content

Markdown via API - Airtable inserting backslashes between ~~ and [[

  • July 27, 2023
  • 1 reply
  • 14 views

Forum|alt.badge.img+2

I am updating the "File" field of a record.  The cell is a long text field with rich formatting enabled.

When I PATCH with this body:

{ "fields": { "File": "~~[2022-23 letterhead doc34.docx](https://contoso.sharepoint.com/sites/ServicePlans/Shared Documents/General/Worksheets/2022-23 letterhead doc34.docx?d=w16af26ee9f084a6ba700aaa4bb4467a4)~~" } }

Airtable returns the below:

"fields": { "File": "~~\\[2022-23 letterhead doc34.docx]\\(https://contoso.sharepoint.com/sites/ServicePlans/Shared Documents/General/Worksheets/2022-23 letterhead doc34.docx?d=w16af26ee9f084a6ba700aaa4bb4467a4)~~\n", ... }

Notice the \\ before the opening bracket of the hyperlink markdown.  This breaks the markdown and results in a visually unappealing field:

 

 

 

Expected behavior is a strikethrough hyperlink like so:

Link

 

Any help is much appreciated!

1 reply

Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • July 28, 2023

It's worth mentioning this only happens on a PATCH request.  If I am POSTing a brand new record, this works: "~~[Click here](https://togohere)~~" and it is appropriately linked and strikethrough'd.