Skip to content

Commit

Permalink
feat: fix text replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
nevo-david committed Dec 20, 2024
1 parent 1a2937b commit 657c814
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,15 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
const splitAll = text.split(pattern);
const splitTextReformat = splitAll.map((p) => {
return p
.replace(/</g, '\\<')
.replace(/>/g, '\\>')
.replace(/#/g, '\\#')
.replace(/~/g, '\\~')
.replace(/_/g, '\\_')
.replace(/\\/g, '\\\\')
.replace(/\|/g, '\\|')
.replace(/\[/g, '\\[')
.replace(/]/g, '\\]')
.replace(/\*/g, '\\*')
.replace(/\(/g, '\\(')
.replace(/\)/g, '\\)')
Expand Down

0 comments on commit 657c814

Please sign in to comment.