Minor fixes with php not being escaped properly