Why do you have two same $replace? You only need one, because you already have done that for var %t_text1