milesj / decoda

A lightweight lexical string parser for BBCode styled markup.
MIT License
196 stars 52 forks source link

Blacklist option #21

Closed Spuds closed 12 years ago

Spuds commented 12 years ago

I'd like to see a blacklist option to supplement the current whitelist option. There are times when its easier to set what tags are not allowed vs which ones are allowed.

milesj commented 12 years ago

This can be achieved with filters alone.

Spuds commented 12 years ago

Sorry, bad terminology on my part ... forgot how whitelist was being used

What I meant was and option to disallow certain tags within other tags ... a disallow children option to prevent the nesting of for example a url inside of an email tag or things like that ... there are a few examples of nesting that should be prevented in some instances.

milesj commented 12 years ago

Ah gotcha, that makes more sense. That might be do-able in v4.

milesj commented 12 years ago

Added a new childrenBlacklist in v4.

https://github.com/milesj/php-decoda/blob/master/filters/FilterAbstract.php#L108