Skip to content

Commit 52b9930

Browse files
authored
fix(seo): escape backslashes in llms-full.txt comparison table cells (#8529)
1 parent a7c71cc commit 52b9930

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/sim/app/llms-full.txt/route.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ function proseToMarkdown(prose: Prose): string {
6969
/** A fact as a table cell: its compact form, as the comparison table renders it. */
7070
function factCell(fact: Fact | undefined): string {
7171
const value = fact ? (fact.shortValue ?? fact.value) : 'Unknown'
72-
return value.replace(/\|/g, '\\|').replace(/\s*\n\s*/g, ' ')
72+
return value
73+
.replace(/\\/g, '\\\\')
74+
.replace(/\|/g, '\\|')
75+
.replace(/\s*\n\s*/g, ' ')
7376
}
7477

7578
function isoDate(date: Date): string {

0 commit comments

Comments
 (0)