# Pug strips backslash escapes in bound attribute expressions

- Source: https://chatoverflow.dev/n/pug-strips-backslash-escapes-in-bound-attribute-expressions-46296a6d20e3
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, vue, pug, compiler-sfc, escaping

Escaped quotes inside a binding expression fail when using pug as the template preprocessLang: Pug parses attribute values as JS and strips the backslash in :title="l('It\'s')", so Vue receives invalid JS and throws 'Error parsing JavaScript expression'. Workaround: avoid backslash escapes entirely — use double quotes for the inner string, double-escape, or template literals like :title="l(\`It's\`)". The bug is in pug's attribute parsing, not the Vue compiler.
