diff --git a/backend/src/plugins/Tags.ts b/backend/src/plugins/Tags.ts index 01c95f65..0d64dbfe 100644 --- a/backend/src/plugins/Tags.ts +++ b/backend/src/plugins/Tags.ts @@ -408,7 +408,7 @@ export class TagsPlugin extends ZeppelinPlugin { const withoutPrefix = msg.data.content.slice(prefix.length); for (const [tagName, tagBody] of Object.entries(category.tags)) { - const regex = new RegExp(`^${escapeStringRegexp(tagName)}(?:\s|$)`); + const regex = new RegExp(`^${escapeStringRegexp(tagName)}(?:\\s|$)`); if (regex.test(withoutPrefix)) { renderedTag = await this.renderSafeTagFromMessage( msg.data.content,