# Bbcode \<\> html?

**URL:** <https://www.ruby-forum.com/t/bbcode-html/86508>\
**Category:** Ruby\
**Created:** [February 22, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/bbcode-html/86508 "2007-02-22T20:54:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 22, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/bbcode-html/86508/1 "2007-02-22T20:54:41Z")

</div>

Is there a library out there already that will convert text marked up  
in “bbcode” into HTML?

For those not knowing what bbcode is, it’s the ML used by forum  
software such as phpbb to dumb down the interface.

For example, to link to a site you would write:  
[Click here!](http://somewhere.com)

But to force a link without renaming it you would write:  
[somewhere.com](https://somewhere.com)

I just don’t want to reinvent the wheel.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 22, 2007, 8:58pm UTC](https://www.ruby-forum.com/t/bbcode-html/86508/2 "2007-02-22T20:58:41Z")

</div>

Well, I don’t know of a library that does BBCode, but be sure to check  
out  
Textile: [Textile (markup language) - Wikipedia](http://en.wikipedia.org/wiki/Textile_(markup_language))

And Redcloth, the Ruby Textile interpreter:  
[http://whytheluckystiff.net/ruby/redcloth/](http://whytheluckystiff.net/ruby/redcloth/)

Cleaner, IMO, thank BBCode, because frankly, anything that keeps the  
ordinary user from typing out HTML is a good thing.

Jason

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 22, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/bbcode-html/86508/3 "2007-02-22T22:58:57Z")

</div>

Le jeudi 22 février 2007 20:53, removed\_email\_address@domain.invalid a écrit :

> [somewhere.com](https://somewhere.com)
> 
> I just don’t want to reinvent the wheel.

This class from Facets may be helpful for you :

[http://facets.rubyforge.org/src/doc/rdoc/more/classes/BBCode.html](http://facets.rubyforge.org/src/doc/rdoc/more/classes/BBCode.html)

RubyFacets is definitely a great resource !
