Skip to content

Commit b985223

Browse files
committed
feat: convert lt and gt to \> and \< in markdown
1 parent f0f8373 commit b985223

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libraries/helpers/src/utils/strip.html.validation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export const stripHtmlValidation = (
139139
plain = false,
140140
convertMentionFunction?: (idOrHandle: string, name: string) => string
141141
): string => {
142-
143142
if (plain) {
144143
return val;
145144
}
@@ -169,6 +168,8 @@ export const stripHtmlValidation = (
169168
})
170169
.replace(/&amp;/gi, '&')
171170
.replace(/&nbsp;/gi, ' ')
171+
.replace(/&gt;/gi, '>')
172+
.replace(/&lt;/gi, '<')
172173
.replace(/<h2>([.\s\S]*?)<\/h2>/g, (match, p1) => {
173174
return `<h2>## ${p1}</h2>\n`;
174175
})
@@ -209,7 +210,7 @@ export const stripHtmlValidation = (
209210
.replace(/<p[^>]*>/gi, '\n')
210211
.replace(/<\/p>/gi, '')
211212
.replace(/&gt;/gi, '>')
212-
.replace(/&lt;/gi, '<')
213+
.replace(/&lt;/gi, '<');
213214

214215
if (none) {
215216
return striptags(html);

libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ export class InstagramProvider
618618
).json();
619619

620620
arr.push({
621-
id: firstPost.id,
621+
id: post.id,
622622
postId: commentId,
623623
releaseURL: linkGlobal,
624624
status: 'success',

0 commit comments

Comments
 (0)