diff --git a/package.json b/package.json index 7fd66ad2acada..adc34d19005be 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "less-loader": "4.0.5", "lodash": "3.10.1", "lru-cache": "4.1.1", - "markdown-it": "8.3.2", + "markdown-it": "^8.4.1", "minimatch": "2.0.10", "mkdirp": "0.5.1", "moment": "^2.20.1", diff --git a/src/ui/public/markdown/markdown.test.js b/src/ui/public/markdown/markdown.test.js index 2c87dac53f446..fd1d1301d28fe 100644 --- a/src/ui/public/markdown/markdown.test.js +++ b/src/ui/public/markdown/markdown.test.js @@ -17,6 +17,15 @@ test('should never render html tags', () => { expect(component).toMatchSnapshot(); // eslint-disable-line }); +test('should render links with parentheses correctly', () => { + const component = shallow( + + ); + expect(component.render().find('a').prop('href')).toBe('https://example.com/foo/bar?group=(()filters:!t)'); +}); + describe('props', () => { const markdown = 'I am *some* [content](https://en.wikipedia.org/wiki/Content) with `markdown`'; diff --git a/yarn.lock b/yarn.lock index bda6ab1b108b9..429b827b02d04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8367,15 +8367,15 @@ markdown-escapes@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.1.tgz#1994df2d3af4811de59a6714934c2b2292734518" -markdown-it@8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.3.2.tgz#df4b86530d17c3bc9beec3b68d770b92ea17ae96" +markdown-it@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.1.tgz#206fe59b0e4e1b78a7c73250af9b34a4ad0aaf44" dependencies: argparse "^1.0.7" entities "~1.1.1" linkify-it "^2.0.0" mdurl "^1.0.1" - uc.micro "^1.0.3" + uc.micro "^1.0.5" marked-text-renderer@0.1.0: version "0.1.0" @@ -12622,7 +12622,7 @@ ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" -uc.micro@^1.0.1, uc.micro@^1.0.3: +uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376"