Skip to content

Overriding link renderer skips all the security work made by the default renderer #80

@nadouani

Description

@nadouani

Hello,

The following example (from repo's Readme) overrides the link renderer that is making a lot of escaping and sanitization work to avoid XSS issues.

app.config(['markedProvider', function (markedProvider) {
  markedProvider.setRenderer({
    link: function(href, title, text) {
      return "<a href='" + href + "'" + (title ? " title='" + title + "'" : '') + " target='_blank'>" + text + "</a>";
    }
  });
}]);

I don't find a way to customize the renderer by invoking the original link renderer of marked library.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions