Skip to content

Commit 0d5b45c

Browse files
committed
fix: statistics
1 parent 604b029 commit 0d5b45c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/nestjs-libraries/src/short-linking/short.link.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ShortIo } from './providers/short.io';
66
import { Kutt } from './providers/kutt';
77
import { LinkDrip } from './providers/linkdrip';
88
import { uniq } from 'lodash';
9+
import striptags from 'striptags';
910

1011
const getProvider = (): ShortLinking => {
1112
if (process.env.DUB_TOKEN) {
@@ -139,7 +140,7 @@ export class ShortLinkService {
139140
)}/[^\\s]*`,
140141
'g'
141142
);
142-
const urls = mergeMessages.match(regex);
143+
const urls = striptags(mergeMessages).match(regex);
143144
if (!urls) {
144145
// No URLs found, return the original text
145146
return [];

0 commit comments

Comments
 (0)