I have a suggestion, for any existing app that consistently addresses existing XSS vulnerabilities (pre Vue).
For example, you (should?) have an existing "globally" used function, such as:
function htmlEscape($text) {
return htmlspecialchars(strval($text), ENT_QUOTES, 'UTF-8');
}
Could this be simply altered to include the escaping of Vue template interpolation, eg:
function htmlEscape($text) {
$text = str_replace("{", "{{ '{' }}", strval($text));
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}
A possible one line fix?
Note: Updated code fix as per suggestion below – thanks to @apreiml