Commit 437c6a4b7e

Rocknest <35231115+Rocknest@users.noreply.github.com>
2020-01-07 21:26:21
Make markdown parser more safe (#4105)
Fixes #3722
1 parent 3607d9e
Changed files (1)
lib
std
special
docs
lib/std/special/docs/main.js
@@ -1432,7 +1432,7 @@
                     line.type = "ul";
                     line.text = line.text.substr(1);
                 }
-                else if (line.text.match(/\d+\./)) {
+                else if (line.text.match(/^\d+\..*$/)) { // if line starts with {number}{dot}
                     const match = line.text.match(/(\d+)\./);
                     line.type = "ul";
                     line.text = line.text.substr(match[0].length);