From: "Mauricio Fernández" Date: 2004-10-14T23:53:54+09:00 Subject: Re: HTML filtering in weblog/BBS software On Thu, Oct 14, 2004 at 11:19:47PM +0900, Florian Gross wrote: > >I am writing some sort of BBS in Ruby (on Rails). I downloaded and > >included RedCloth for template rendering (in 5 lines of code and 15 > >lines of test - wow!). It's cool, but allows to include any HTML. > > There's two options for not allowing user-specified HTML and style > sheets. (Even style sheets can contain JavaScript.) Just use RedCloth > like this: > > RedCloth.new("h1. A bold man", [:filter_html, :filter_styles]) > # => "

A <b>bold</b> man

" > > BlueCloth and RDoc have similar options AFAIK. IIRC RDoc doesn't allow raw HTML by design. -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com