feat: convert lt and gt to \> and \< in markdown
This commit is contained in:
parent
f0f8373621
commit
b98522373d
|
|
@ -139,7 +139,6 @@ export const stripHtmlValidation = (
|
|||
plain = false,
|
||||
convertMentionFunction?: (idOrHandle: string, name: string) => string
|
||||
): string => {
|
||||
|
||||
if (plain) {
|
||||
return val;
|
||||
}
|
||||
|
|
@ -169,6 +168,8 @@ export const stripHtmlValidation = (
|
|||
})
|
||||
.replace(/&/gi, '&')
|
||||
.replace(/ /gi, ' ')
|
||||
.replace(/>/gi, '>')
|
||||
.replace(/</gi, '<')
|
||||
.replace(/<h2>([.\s\S]*?)<\/h2>/g, (match, p1) => {
|
||||
return `<h2>## ${p1}</h2>\n`;
|
||||
})
|
||||
|
|
@ -209,7 +210,7 @@ export const stripHtmlValidation = (
|
|||
.replace(/<p[^>]*>/gi, '\n')
|
||||
.replace(/<\/p>/gi, '')
|
||||
.replace(/>/gi, '>')
|
||||
.replace(/</gi, '<')
|
||||
.replace(/</gi, '<');
|
||||
|
||||
if (none) {
|
||||
return striptags(html);
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ export class InstagramProvider
|
|||
).json();
|
||||
|
||||
arr.push({
|
||||
id: firstPost.id,
|
||||
id: post.id,
|
||||
postId: commentId,
|
||||
releaseURL: linkGlobal,
|
||||
status: 'success',
|
||||
|
|
|
|||
Loading…
Reference in New Issue