Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links incorrectly receive markup #574

Closed
bennycode opened this issue Apr 9, 2015 · 4 comments
Closed

Links incorrectly receive markup #574

bennycode opened this issue Apr 9, 2015 · 4 comments

Comments

@bennycode
Copy link

I have seen that "marked" parses Markdown within links. This should not happen.

Here is my example:

var link = 'https://www.nike.com/events-registration/event?id=6245&languageLocale=de_de&cp=EUNS_KW_DE_&s_kwcid=AL!2799!3!46005237943!b!!g!!womens%20running';

var options =  {
  renderer: new marked.Renderer(),
  gfm: false,
  tables: false,
  breaks: false,
  pedantic: false,
  sanitize: true,
  smartLists: false,
  smartypants: false
};

var output = marked(link, options);

The output is:

<p>https://www.nike.com/events-registration/event?id=6245&amp;languageLocale=de<em>de&amp;cp=EUNS_KW_DE</em>&amp;s_kwcid=AL!2799!3!46005237943!b!!g!!womens%20running</p>

As you can see, the languageLocale=de_de&cp has been turned into languageLocale=de<em>de&amp;cp, so de_de became de<em>de, which is wrong.

@1j01
Copy link

1j01 commented May 30, 2015

You could surround the link with < angle brackets > or enable gfm for linkifying bare URLs.

@joshbruce
Copy link
Member

joshbruce commented Dec 25, 2017

remove reference

@Feder1co5oave
Copy link
Contributor

@1j01 is right, this is by design

@joshbruce
Copy link
Member

Removing from 984 as this is by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants