Discourse.Dialect.on('parseNode', function (event) { var node = event.node, path = event.path; if (node[0] === 'a') { // It's invalid HTML to nest a link within another so strip it out. for (var i=0; i