I tried to add a jquery sample code in the sub_filter. (nginx-1.4.3), but I cannot. sub_filter </body '<script src="text/javascript">$(document)</script></body'; With \$ also fails. Is it a bug?