Skip to content

Commit

Permalink
update(fix): security issues (#25 & #26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rooyca committed Jun 16, 2024
1 parent 50e0c29 commit 64d587d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/mdparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

export class MarkdownParser {
parse(text) {
// Remove all <script> tags
text = text.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');

// Headers
text = text.replace(/^(#{1,6})\s*(.*)$/gm, (match, p1, p2) => `<h${p1.length}>${p2}</h${p1.length}>`);

Expand Down

0 comments on commit 64d587d

Please sign in to comment.