428 Commits

Author SHA1 Message Date
Federico Soave
187d46f294 email address domain must contain at least a dot and must not end with dash or underscore 2018-01-23 16:29:31 +01:00
Federico Soave
00f1f7a239 new gfm autolink rule: http/www URLs and email addresses 2018-01-23 16:29:31 +01:00
Federico Soave
a8f2d7ff6e new rule for autolinks, adjust html rules accordingly.
test 574 does not pass because of url encoding FIXME)
2018-01-22 19:03:15 +01:00
Cory Forsyth
6d974b1dbf Do not autolink a trailing "!" in a URL
* Expand gfm link tests to include all possible ending punctuation
2018-01-22 19:03:14 +01:00
Josh Bruce
024e378f43
Merge pull request #682 from Feder1co5oave/fix_typeerror
Throw error on non-string input
2018-01-20 17:16:11 -05:00
Josh Bruce
68aab24f7e
Merge pull request #1023 from Feder1co5oave/new_blockquote
[commonmark] Make blockquotes commonmark compliant
2018-01-20 17:14:44 -05:00
Josh Bruce
19f6afe4aa
Merge pull request #456 from Feder1co5oave/clean-segments
IDs of headings with inline tokens (link, em, bold...)
2018-01-20 16:09:27 -05:00
Josh Bruce
a98bad2430
Merge pull request #1013 from Feder1co5oave/fix-backticks2
fix backticks in inline code (replaces #503, fixes #312)
2018-01-20 15:46:19 -05:00
Josh Bruce
a78d51f775
Merge pull request #1014 from AndyLnd/master
chore: remove unused flags variable
2018-01-20 15:38:27 -05:00
Federico Soave
f45dc385d9 match setext headings just before paragraphs, then only paragraph continuations are matched inside blockquotes (see http://spec.commonmark.org/0.28/#example-197) 2018-01-19 03:58:30 +01:00
Federico Soave
1a71ae06bf new blockquote rule: match any paragraph-like content up to next line (laziness rule), or anything on the current line. Change paragraph rule accordingly, and make it non-greedy 2018-01-19 03:58:30 +01:00
Federico Soave
9400980e16 paragraph rule: link defs cannot interrupt a paragraph 2018-01-19 03:25:33 +01:00
Federico Soave
a5c4889cf0 link def labels cannot contain balanced brackets 2018-01-19 03:25:33 +01:00
Federico Soave
f2ebbd1601 first link definition takes precedence 2018-01-19 03:25:33 +01:00
Federico Soave
d7597f1732 allow link definitions in blockquotes too 2018-01-19 03:25:33 +01:00
Federico Soave
c3e005908e new rule for link definitions: allow for special chars in label and title, multiline 2018-01-19 03:25:33 +01:00
Federico Soave
38f1b01036 allow escaped or balanced square brackets in shortcut reflinks 2018-01-19 03:25:33 +01:00
AndyTheGiant
958777e9fe remove unused flags 2018-01-15 18:16:54 +01:00
Federico Soave
60738f8343 export TextRenderer for convenience 2018-01-15 03:25:26 +01:00
Federico Soave
31dffdeb23 pass only the textual part as the 'raw' argument for heading renderer 2018-01-15 03:25:18 +01:00
Federico Soave
de73c39038 strip unused argument (introduced in 2636f85) 2018-01-15 02:34:41 +01:00
Federico Soave
b2a07608e1 fix backticks in inline code (fixes #312) 2018-01-14 23:19:51 +01:00
Federico Soave
2c11624736 preserve trailing newlines in code fences 2018-01-12 18:02:49 +01:00
Josh Bruce
3175599eae
Merge pull request #612 from guotie/patch-1
Update marked.js
2018-01-09 22:44:29 -05:00
Костя Третяк
bff566720d
Revert 98ac7a4395 and a477d1d0e2 2018-01-08 19:50:03 +02:00
Josh Bruce
4a5cf949ec
Merge pull request #852 from jeremyblalock/master
Make erroneous / dangerous links display as text only

Slated for 0.3.10
2018-01-05 18:27:22 -05:00
Josh Bruce
99eee90c91
Merge pull request #991 from learykara/patch-3
Declare undeclared variables
2018-01-05 17:55:15 -05:00
Kara Leary
14fca790fc
add 'use strict' to top of function 2018-01-05 06:19:25 -10:00
Josh Bruce
398bb715c7
Merge pull request #993 from smhg/fix-ie8-regex
Support older regex engines
2018-01-04 22:33:28 -05:00
Josh Bruce
08d25126d9
Merge pull request #977 from KostyaTretyak/parser-fix
Parser fix
2018-01-04 22:02:23 -05:00
Federico Soave
1949dfdf21 handle escaped brackets in link description 2018-01-03 01:56:38 +01:00
Костя Третяк
13e97eb56b
Fix auto_links secure
Related to https://github.com/chjj/marked/pull/814
2018-01-02 19:05:01 +02:00
Federico Soave
1ec0bf387f print more descriptive error messages when source is undefined (as in #979) 2018-01-02 15:10:01 +01:00
smhg
d978de4f50 support older regex engines 2018-01-01 14:52:55 +01:00
Kara Leary
115b65e082
declare undeclared variables
fix for https://github.com/chjj/marked/issues/990
2017-12-27 12:11:37 -10:00
Josh Bruce
e10429e6b9
Merge pull request #629 from vincentwoo/patch-1
Fix small typo occur[r]ed
2017-12-25 17:08:42 -05:00
Tony Brix
cb72584c5d escape non-mangled xss
fixes #926
2017-12-22 23:13:53 -06:00
Tony Brix
6d1901ff71 sanatize uppercase hexidecimal
fixes #925
2017-12-22 22:59:23 -06:00
Tony Brix
858464b1a3 Merge branch 'pr/974' into pr/958 2017-12-22 10:46:48 -06:00
Костя Третяк
98ac7a4395
Fixed https://github.com/chjj/marked/issues/465 2017-12-18 23:42:06 +02:00
Josh Bruce
e5b2998326 Initial commit 2017-12-01 11:17:22 -05:00
Jeremy Blalock
f06d62d4d6 Makes link text show up even if link is dangerous 2017-02-08 11:00:20 -08:00
Matt Austin
cd2f6f5b70 added data: link fix to prevent xss 2017-01-19 15:03:37 -08:00
Matt Austin
fd0d1a2935 Merge pull request #592 from matt-/xss_html_entities
XSS with HTML entities
2016-07-29 12:07:57 -07:00
Rafał Pocztarski
31c77995d5 add optional semicolon in html entities regex
and make non-capturing group out of (\w+) that was not used in the function
(only the entire surrounding group is used as a whole)
The semicolon is outside of the capturing group so the input to the
function is the same as before.
See this comment:
https://github.com/chjj/marked/pull/592/files/2cff859#r70888592
2016-07-15 13:08:12 +02:00
Federico Soave
f9e817d9fb return null on non-string input 2015-11-15 19:46:57 +01:00
Christopher Jeffrey
18fb6a639a fix 2 failing tests. see #616. 2015-07-31 02:26:13 -07:00
Christopher Jeffrey (JJ)
91dcdcbbce Merge pull request #616 from papandreou/fix/emptyCodeBlocks
Fixed parsing of empty code blocks.
2015-07-30 18:08:07 -07:00
Andreas Lind
92acf2fc0c Re-fixed parsing of empty code blocks after the previous fix. 2015-07-30 01:32:34 +02:00
Andreas Lind
1d43cad577 code blocks: Don't ignore trailing newlines at the end.
Unfortunately, the problem this is fixing cannot easily be demonstrated
by a test, because the test suite removes all whitespace before comparing
the actual and expected renderings for some odd reason.
2015-07-30 00:09:49 +02:00