1
votes

I don't see the issue in this template. Do you?...

<div class="wrap-photos">
    <% _.each(photos, function(photo) { %>
        <div class="wrap-photo">
            <span class="wrap-photo-img">
                <img src="<%= photo.get('urlImg') %>/<%= photo.get('photo_file_name') %>" id="<%= photo.get('id') %>" class="photo-img">
            </span>
            <span class="photo-caption"><%= photo.get('caption') %></span>
        </div>
    <% }); %>
</div>

Thanks for your help. I'm stuck on this.

1
Seems fine to me (jsfiddle.net/ambiguous/nkZeD). How are you using it? Does the error happen when you compile it or when you use it? What sort of container is the template wrapped in inside the page? - mu is too short
Syntax looks good - ensure all of those model properties exist on each model (urlImg, photo_file_name & name) - shane
This error make me think that there is an illegal character in your model's data. - Ingro
Yeah it looks Ok to me too, not much there really. Thanks for the ideas guys! I'll double-check the model properties and take a look at the data some. I suppose I should ask: What kind(s) of characters would be "illegal"? - Locohost
Sounds more like an invisible character. Try opening the file in some editor and switching between different encodings. - tsiki

1 Answers

1
votes

@tsiki: That's a good suggestion. I've seen issues with invisible characters before. You get them sometimes when you cut/paste code from an article. Nasty bugs.

However...

I replaced my underscore-min.js and my backbone-min.js with the full annotated development versions and the error stopped. I can't imagine why this helped, but it did.

Thank you very much for the replies. I greatly appreciate your suggestions :-)