Ideally you shouldn't construct html in the tcl code in the first place. If you follow this advice, the issue becomes less important because you have to build much fewer strings with quotes in them.
tcl:
set list_url "file-list?[export_vars path]"
adp:
<a href="@list_url@">test</a>