Ruby-bbcode-to-markdown removes https

Hello.

Using https://github.com/nlalonde/ruby-bbcode-to-md like

"[youtube]https://www.youtube.com/watch?v=COvnHv42T-A[/youtube]".bbcode_to_md

it returns

"http://www.youtube.com/watch?v=COvnHv42T-A"

stripping away the https.

Ryan

1 Like

Hmm yeah that looks like a bug we should fix. Does it affect Discourse too, presumably yes?

1 Like

Yes, because Importing from phpBB3 recommends using it.

1 Like

I think you are mistaken. That Howto doesn’t recommend using bbcode_to_md.
Well, it doesn’t discourage its usage either, but at least it’s off by default. :wink:

And does it affect Discourse itself? No, only the import scripts that are using that gem.

1 Like

Sorry, you’re right. I was taking the suggestion of installing the gem as a dependency too far.

I made a PR to @neil 's repo to fix this by making it always be https. https://github.com/nlalonde/ruby-bbcode-to-md/pull/2

5 Likes

Thanks @ryantm! I merged the changes. Also thanks for improving the tests.

3 Likes