diff options
Diffstat (limited to 'src/PrisbeamSearch.ts')
-rwxr-xr-x | src/PrisbeamSearch.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/PrisbeamSearch.ts b/src/PrisbeamSearch.ts index daffde4..5e352d8 100755 --- a/src/PrisbeamSearch.ts +++ b/src/PrisbeamSearch.ts @@ -27,7 +27,10 @@ export class PrisbeamSearch { <hr> <details> <summary>Show technical information</summary> - <pre style='margin-bottom: 0;'>Query: ${query.substring(0, 1024)}${sql ? `\n\nSQL: ${sql.substring(0, 1024)}` : ""}\n\nError dump:\n${e.stack}</pre> + <pre style='margin-bottom: 0;'>Query: ${query.substring(0, 1024)}${sql ? `\n\nSQL: ${sql.substring(0, 1024)}` : ""}\n\nError dump:\n${e.stack + .replaceAll("&", "&") + .replaceAll(">", ">") + .replaceAll("<", "<")}</pre> </details> `; } @@ -85,7 +88,10 @@ export class PrisbeamSearch { } if (e.name === "SearchError" || e.stack.startsWith("SearchError: ")) { - return e.message; + return e.message + .replaceAll("&", "&") + .replaceAll(">", ">") + .replaceAll("<", "<"); } return "An error has occurred while processing your search query"; |