maemo.org Bugzilla – Bug 1545
webforum: allow some HTML tags in the posts
Last modified: 2008-07-31 11:24:46 UTC
You need to
before you can comment on or make changes to this bug.
Let's have a whitelist of safe HTML tags that would be allowed in webforum
A possible starting point could be something similar that eg. wordpress.com is
considering safe: address, a, abbr, acronym, b, big, blockquote, br, caption,
cite, class, code, col, del, dd, div, dl, dt, em, font, h1…h6, i, img, ins,
kbd, li, p, pre, q, s, span, strike, strong, sub, sup, table, tbody, td, tfoot,
tr, tt, ul, ol, var
All the other tags should be rendered as plain text.
We can do content rewriting after the general case of formatting is done.
Sensible (there are some more available but they're not really usable for the
scenario) formatting options are:
- markdown (http://www.michelf.com/projects/php-markdown/extra/)
- pros: allows html
- cons: markdown treats certain characters commonly seen in unix shells as
special (especially issue for people using exclusively the mailing list)
- "plain text" (nl2br(htmlspecialchars('data'))
- pros: simplest way to preserve intention of mailing list posters
- cons: escapes all HTML
We can use different formatting for messages imported from the mailing list and
ones submitted via the web interface.
Mails sent out to the list from the web-interface are plaintext and do not go
trough the formatter used to make the posts more readable on the web.
New generic formatter to overcome the limitations of the two above can of
course be coded but it needs a proper specification.
Given these limitations and corner cases what exactly we want to do with
1. messages posted via the web interface
2. messages posted via the mailing list
Since this is an enhancement request I would like to see the general formatter.
I think that web posts and mailing list posts should be treated in the same
Anyway, this feature could be a future enhancement if it requres much work (as
it seems it does).
This issue will be addressed in couple of weeks.
We have another project where integration with HTML-cleaning library is needed:
I will update this bug when that other project moves forward.
Can I ask why you are not planning on using standard web forum software (eg.
vBulletin) for the Maemo web forum?
Because this is not just a web forum, but a full web read/write interface to
the mailing lists.
Regarding white/blacklisting HTML, the PHP HTMLPurifier class is very useful:
With it we could even allow full HTML entry on forums safely.
Webforum task belongs to Sprint2. Changing priority to HIGH.
Unsure who is responsible of the webforum nowadays, Henri or Oskari?
I'm working on this.
WONTFIXing this after all.
While technically easy to do, the problem is that:
* If we start posting HTML mails to the mailing lists a lot of users will hate
* If we allow HTML on web forum, but strip it away for the mailing list version
the two will be unequal (links or images may disappear etc)
If these problems are acceptable then please reopen and I will implement this.