We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 604b029 commit 0d5b45cCopy full SHA for 0d5b45c
libraries/nestjs-libraries/src/short-linking/short.link.service.ts
@@ -6,6 +6,7 @@ import { ShortIo } from './providers/short.io';
6
import { Kutt } from './providers/kutt';
7
import { LinkDrip } from './providers/linkdrip';
8
import { uniq } from 'lodash';
9
+import striptags from 'striptags';
10
11
const getProvider = (): ShortLinking => {
12
if (process.env.DUB_TOKEN) {
@@ -139,7 +140,7 @@ export class ShortLinkService {
139
140
)}/[^\\s]*`,
141
'g'
142
);
- const urls = mergeMessages.match(regex);
143
+ const urls = striptags(mergeMessages).match(regex);
144
if (!urls) {
145
// No URLs found, return the original text
146
return [];
0 commit comments