Skip to content

Links incorrectly receive markup #574

Closed

Description

@bennycode

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.

Activity

  1. 1j01 commented on May 30, 2015

    @1j01

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

  2. joshbruce commented on Dec 25, 2017

    @joshbruce
    Member

    remove reference

  3. Feder1co5oave commented on Jan 3, 2018

    @Feder1co5oave
    Contributor

    @1j01 is right, this is by design

  4. joshbruce commented on Jan 5, 2018

    @joshbruce
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions