We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47215f4 commit 0668820Copy full SHA for 0668820
1 file changed
src/utils.ts
@@ -237,9 +237,8 @@ export function convertToTelegramButtons(buttons?: Button[] | null): InlineKeybo
237
/**
238
* Clean text by removing all NULL (\u0000) characters
239
* @param {string | undefined | null} text - The text to clean
240
- * @returns {string} The cleaned text
241
- */
242
export function cleanText(text: string | undefined | null): string {
243
if (!text) return '';
244
- return text.replace(/\u0000/g, '');
+ // Avoid control char in regex literal; lint-friendly
+ return text.split('\u0000').join('');
245
}
0 commit comments