Stable feb14 backports

Several fixes to RegistrationType handling in Two-Phase Student Reg

Fixes QSD saving rendered versions of HTML special characters