We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When converting markdown with urls containing underscores they need to be escaped, unless using autolinking in which case they must not be escaped:
irb(main):001:0> Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: false).render("http://google.com/foo\\_bar\\_baz") => "<p>http://google.com/foo_bar_baz</p>\n" irb(main):002:0> Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true).render("http://google.com/foo\\_bar\\_baz") => "<p><a href=\"http://google.com/foo%5C_bar%5C_baz\">http://google.com/foo\\_bar\\_baz</a></p>\n"
If one avoids escaping underscores in URL's it works with autolinking, but not without:
irb(main):003:0> Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: false).render("http://google.com/foo_bar_baz") => "<p>http://google.com/foo<em>bar</em>baz</p>\n" irb(main):004:0> Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true).render("http://google.com/foo_bar_baz") => "<p><a href=\"http://google.com/foo_bar_baz\">http://google.com/foo_bar_baz</a></p>\n"
I believe the right solution is to escape underscores in URL's and change the autolinking to work with this.
The text was updated successfully, but these errors were encountered:
This is possibly related to #402
Sorry, something went wrong.
No branches or pull requests
When converting markdown with urls containing underscores they need to be escaped, unless using autolinking in which case they must not be escaped:
If one avoids escaping underscores in URL's it works with autolinking, but not without:
I believe the right solution is to escape underscores in URL's and change the autolinking to work with this.
The text was updated successfully, but these errors were encountered: