1

We use redcloth to parse text given by users in our application. However, there was a bug in the parser as shown below

>> RedCloth.new('http://www.example.com/?_test_param_=test', [:no_span_caps]).to_html
=> <p>http://www.example.com/?<em>test_param</em>=test</p>"

And the question is how do i make RedCloth parse the url so that the result would be <p>http://www.example.com/?_test_param_=test</p> (no em tags) since it is part of the url?

jvnill
  • 29,479
  • 4
  • 83
  • 86
  • After trying with `==` and a few other ways, I have to say Textile is hard to work with. Not sure if this is Textile's fault or RedCloth implementation's fault. I guess if in doubt, fire a issue~ – lulalala Aug 06 '14 at 08:47
  • @xlembouras updated the question to make it **clear** what i'm asking. – jvnill Aug 06 '14 at 09:50
  • @lulalala thanks. I'll do that. – jvnill Aug 06 '14 at 09:51
  • looks like there's already a ticket for this http://jgarber.lighthouseapp.com/projects/13054/tickets/239-problem-when-using-an-underscore-to-emphasize-and-linking-an-url-with-an-underscore – jvnill Aug 06 '14 at 09:54
  • Though that issue is not moved to the new github repo. He might have forgotten about it already. – lulalala Aug 06 '14 at 10:14
  • hmm the issues is disabled in the github repo so i think he really uses lighthouse to keep track of these issues – jvnill Aug 06 '14 at 10:27

0 Answers0