jarrett / rbbcode

Converts BBCode to HTML. Gracefully handles invalid input. Built on Treetop.
41 stars 9 forks source link

Problem with [url] #18

Closed tomaszchabinka closed 4 years ago

tomaszchabinka commented 11 years ago

Hi, I notice problem with [url] mark. I'm using gem 'rails', '3.2.14' and gem 'rbbcode', '~> 1.0.3'.

When I have some @group.description with [url] mark (like [url="http://facebook.com/projekt.polska.wroclaw"]Koło Wrocław na Facebooku[/url]) I get from RbbCode.new.convert(@group.description) <p>* <a href="">Koło Wrocław na Facebooku</a></p>

jarrett commented 11 years ago

Thanks for the bug report! I've added support for this style of URL tag and tests to verify it. The new version is 1.0.4. Please let me know if this didn't solve your problem.

tomaszchabinka commented 11 years ago

It works corretly now. Thanks for fast response. I suggest you [url="facebook.com/"] or [url="www.facebook.com/"] should works correctly in next versions too. (Now it create link to {serveraddress}/facebook.com or {serveraddress}/www.facebook.com respectively, only version with http:// works correctly) but in my opinion this is not critical problem

jarrett commented 11 years ago

Could you elaborate on what you mean? I.e. can you give:

  1. Source BBCode
  2. What the resulting HTML should be, in your opinon
tomaszchabinka commented 11 years ago

1.) [url="facebook.com/projekt.polska.wroclaw"]Koło Wrocław na Facebooku[/url] -> Koło Wrocław na Facebooku 2.) [url="www.facebook.com/projekt.polska.wroclaw"]Koło Wrocław na Facebooku[/url] -> Koło Wrocław na Facebooku 3.) [url="http://www.facebook.com/projekt.polska.wroclaw"]Koło Wrocław na Facebooku[/url] -> Koło Wrocław na Facebooku

In this moment only 3. exaple (with http) works

jarrett commented 4 years ago

I don't recall why I reopened this issue. It was probably in error. I'm closing it for now.