Issue 491 - Validate custom filters

--HG--
extra : rebase_source : 8740b8a510e87fa618eec6cd57e272d7bc2ee6fc
Issue 1587 - Escape curly brackets for elemhide filters

--HG--
extra : rebase_source : b901b6dd6f678e8d3813d6ae837eebe136fbfbba