[pmwiki-users] Blocklisting 'href', but allowing '\href'?

Patrick R. Michaud pmichaud at pobox.com
Sun Apr 13 12:25:45 CDT 2008


On Sun, Apr 13, 2008 at 06:43:08PM +0200, christian.ridderstrom at gmail.com wrote:
> Hi,
> 
> To prevent spam, I wanted to block 'href' and I did it by adding the 
> following entry to Site.Blocklist
> 
> 	block:/\bhref\b/
> 
> This will block 'href' as long as it is not a part of a word, e.g. in
> 
> 	<a href=...
> 
> which spambots often insert... However, authors of the site (www.lyx.org) 
> may sometimes actually want to write '\href', as it's a command in LaTeX. 
> So my question is how I can allow '\href', but block 'href'?

    block:/[^\w\\]href\b/

This blocks any instance of 'href' that is preceded by anything other
than a word character or a backslash.

Pm




More information about the pmwiki-users mailing list