Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 171
- Log:
Initial import of Beast 0.9 from downloaded Tarball. Beast is a Ruby
On Rails based forum application. The original tarball came from the
following location:http://s3.amazonaws.com/beast-forum/beast-0.9.tar.gz
The forum post which announced this version's availability was at:
http://beast.caboo.se/forums/1/topics/446
- Author:
- rool
- Date:
- Fri Mar 02 15:51:55 +0000 2007
- Size:
- 995 Bytes
1 | WhiteList |
2 | ========= |
3 | |
4 | This White Listing helper will html encode all tags and strip all attributes that aren't specifically allowed. |
5 | It also strips href/src tags with invalid protocols, like javascript: especially. It does its best to counter any |
6 | tricks that hackers may use, like throwing in unicode/ascii/hex values to get past the javascript: filters. Check out |
7 | the extensive test suite. |
8 | |
9 | <%= white_list @article.body %> |
10 | |
11 | You can add or remove tags/attributes if you want to customize it a bit. |
12 | |
13 | add table tags |
14 | |
15 | WhiteListHelper.tags += %w(table td th) |
16 | |
17 | remove tags |
18 | |
19 | WhiteListHelper.tags -= %w(div span) |
20 | |
21 | clear any attributes that are allowed for <a> tags |
22 | |
23 | WhiteListHelper.attributes['a'] = [] |
24 | |
25 | allow a new attribute for the <img> tag |
26 | |
27 | WhiteListHelper.attributes['img'] += %w(style) |
28 | |
29 | add new tag with attributes |
30 | |
31 | WhiteListHelper.attributes['table'] = %w(cellpadding cellspacing) |
32 | |
33 | change allowed attributes for all tags |
34 | |
35 | WhiteListHelper.attributes[nil] = %w(id class style) |