unserialized and decoded $data array in replace_tag function

I'd double check this first.