Skip to content

Commit

Permalink
escape message text
Browse files Browse the repository at this point in the history
  • Loading branch information
M4ss1ck committed Feb 12, 2025
1 parent fe430df commit c57d632
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/middleware/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { prisma } from "../db/prisma.js"
import { logger } from "../logger/index.js"
import type { Anime } from "@prisma/client"

import { padTo2Digits } from "../utils/index.js"
import { padTo2Digits, escape } from "../utils/index.js"

const commands = new Composer()

Expand Down Expand Up @@ -78,7 +78,7 @@ commands.command(['myanime', 'myanimes'], async (ctx) => {

const keyboard = Markup.inlineKeyboard(buttons)

return ctx.replyWithHTML(text, keyboard).catch(logger.error)
return ctx.replyWithHTML(escape(text), keyboard).catch(logger.error)
}
else {
return ctx.replyWithHTML('<i>No anime found on DB</i>\n\nAdd some!')
Expand Down Expand Up @@ -117,7 +117,7 @@ commands.command(['onair', 'airing', 't'], async (ctx) => {

const keyboard = Markup.inlineKeyboard(buttons)

return ctx.replyWithHTML(text, keyboard).catch(logger.error)
return ctx.replyWithHTML(escape(text), keyboard).catch(logger.error)
}
else {
return ctx.replyWithHTML('<i>No anime marked as "On Air" found on DB</i>\n\nAdd some!')
Expand Down

0 comments on commit c57d632

Please sign in to comment.