Python Replace Text With Javascript