strip_tags is just awful

strip_tags is possibly the worst of all the builtin PHP functions. It doesn’t even remotely do what it says. It is absolutely useless on user input because it strips everything from the first “<” it sees to the next “>” so if your input is

"<p>I <3 Monkeys</p>

its output is

I 

!!! And what else are you stripping tags from apart from user input? Avoid.

badmatch CRASH REPORT couch_file:init/1

I got this Couch DB crash running a view:

Error: EXIT

{{badmatch,[]},
 [{couch_query_servers,new_process,3,
                       [{file,"couch_query_servers.erl"},{line,472}]},
  {couch_query_servers,lang_proc,3,
                       [{file,"couch_query_servers.erl"},{line,462}]},
  {couch_query_servers,handle_call,3,
                       [{file,"couch_query_servers.erl"},{line,334}]},
  {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,578}]},
  {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}

This is caused by “language”: “JavaScript” in the view. It must be “javascript” (case sensitive) or omitted for javascript queries. Not sure where I copied that from.