🎨 Disabled auto-linking of domain names in markdown (#9084)

closes https://github.com/TryGhost/Ghost/issues/8987

- set `linkify-it` `fuzzyLink` option to false so that it only auto-links URLs starting with `http(s)://` or other valid schemes
This commit is contained in:
Kevin Ansfield 2017-10-03 11:14:53 +01:00 committed by Katharina Irrgang
parent b7e82f3b00
commit b82932b492

View File

@ -1,4 +1,4 @@
var MarkdownIt = require('markdown-it'),
var MarkdownIt = require('markdown-it'),
converter = new MarkdownIt({
html: true,
breaks: true,
@ -44,6 +44,11 @@ var MarkdownIt = require('markdown-it'),
// jscs:enable
});
// configure linkify-it
converter.linkify.set({
fuzzyLink: false
});
module.exports = {
render: function (markdown) {
return converter.render(markdown);