Re: Replacing with f*ck and f*cking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 26 October 2008 5:06:09 am Ashley Sheridan wrote:

> Obviously, this list could get pretty comprehensive, so like Andrew
> said, maybe you should look to see how some of the open source projects
> do it.
>
>
> Ash
> www.ashleysheridan.co.uk

The way Drupal handles such filtering is simple caching.  As a policy we never 
filter general content on save, because we may want to change the filter 
format later and destroying user-submitted data is *not cool*.  However, we 
do apply a number of possible filters on display (add line breaks, convert 
URLs to clickable, do "bad word" filtering, or any number of other things) 
and then just cache the result.  The cache lookup (based on a hash of the 
string being filtered and the ID of the filter set to apply) is far faster 
than reapplying the filters every time.  We've found this mechanism to scale 
very well.

-- 
Larry Garfield
larry@xxxxxxxxxxxxxxxx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux