Incorrect rendering html with hyperlink data with spaces in Underscorejs Template.
When I use hyperlink with spaces in json date on underscore template. It renders the html wrongly
Eg: template:
<a href=<%-doclink%> target="_blank">,
data(json):
"doclink":"pdf/Consumerism SGO_Monthly Mailer_Apr 2015_v4.pdf",
Rendered html:
<a href="pdf/Consumerism" sgo_monthly="" mailer_apr="" 2015_v4.pdf="" target="_blank">
Please help to fix this issue
Change your template to use quotes around the
href
attribute value: