@vshankur, would it be possible for you to apply following replacement of special characters before you set token $error_message$ and then before you try to apply the search filter using the same token?
| eval message=replace(replace(replace(message,"\|",""),"\<",""),">","")
... View more