Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

angular-sanitize.js remove internal links #3748

Closed
@janbaer

Description

@janbaer

I've written an wiki application that is showing the converted markdown as html in a div element that is using the ng-bind-html directive.

I have in my html some internal links in this format

<a href='/page1.md'>Page1</a>

My html will be processed by the angular-sanitize.js. And here is my problem, the final html doesn't contains my link. I see only the text Page1.

I've looked into the code of the angular-sanitize.js file and I've found the regex that is responsible to detect any links:

URI_REGEXP = /^((ftp|https?):\/\/|mailto:|tel:|#)/i,

After I've changed the regex to this, the link wasn't removed.

URI_REGEXP = /^((ftp|https?):\/\/|mailto:|tel:|#|\/)/i,

Could you fix this please in the original version of the angular-sanitize.js? Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions