I've recently been tasked with building a replacement for a commercial system run by two industry competitors who are gouging entrepeneurs and developers at 50% of their net sales revenue.
The system I will be building will allow developers to log in, check/update/maintain their software listings (as well as their own profile and preferences), and give them a spiffy page + screenshot for each of their applications.
This means I'll have to accept and process some minimal forms of markup. Herein lies my philosophical paradox...
I've been building portals, web-like CMS systems and other things for years, and for the most part have limtied the input accepted to plain text or a very small subset of acceptable markup. This system can't allow that level of inflexibility.
What is the best approach towards allowing specific tags through (<p>, <br />, <a ...>, <img..>, but disallowing the use of all the others (<iframe>, <script>, <style>, etc.).
I also have to take into consideration the dozens of ways to get xSS through, and protect against those.
Deny all, allow some? Filter all? Strip all and rewrap with allowed tags? Some other combination? I'd rather not have to run the HTML through a series of complicated subs to strip, massage, and de-fang the tags they're using, if possible.
I realize that PerlMonks and Slashdot and other large portal-like systems are doing this already. What approaches and techniques are best towards achieving this goal, while still retaining a good level of customization for the developer creating their own "listing" page?
In reply to Pondering Portals by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |