[m1480] FIX EXception if target_version contains a quote

Note: there are certainly more queries to fix...