refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 371 forks source link

Add link with mailto:and https: #180

Closed dornstein closed 8 years ago

dornstein commented 9 years ago

Is there a reason the add link button is coded to only support http? You can't put in mailto: or https: links. This seems like a problem (and it for my users).

Seems like one line of (problematic) code:

       if (link !== null && link !== '' && link !== 'http://' && link.substr(0,4) === 'http') {

Am I missing something? Can this get improved?

microcipcip commented 9 years ago

I agree, it should also allow realtive links.

toopay commented 9 years ago

@dornstein PR? :)

dornstein commented 9 years ago

Yeah, fair enough. For the moment I just had to pull out the third and fourth clauses in the check above, but I'll try to get you a PR...