Skip to content

Commit

Permalink
Markup: Fixed ReDoS (#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
ready-research authored Sep 15, 2021
1 parent d216e60 commit 0ff371b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-markup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Prism.languages.markup = {
'comment': /<!--[\s\S]*?-->/,
'comment': /<!--(?:(?!<!--)[\s\S])*?-->/,
'prolog': /<\?[\s\S]+?\?>/,
'doctype': {
// https://www.w3.org/TR/xml/#NT-doctypedecl
Expand Down
2 changes: 1 addition & 1 deletion components/prism-markup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ if (typeof global !== 'undefined') {
********************************************** */

Prism.languages.markup = {
'comment': /<!--[\s\S]*?-->/,
'comment': /<!--(?:(?!<!--)[\s\S])*?-->/,
'prolog': /<\?[\s\S]+?\?>/,
'doctype': {
// https://www.w3.org/TR/xml/#NT-doctypedecl
Expand Down

0 comments on commit 0ff371b

Please sign in to comment.