javascript - appended html to the dom doesn't respect the charset -
i have html rendered ajax, works fine using char-set utf-8
nevertheless content it's appended dom javascript function using jquery. problem is, html rendered doesn't have correct char-set.
here's example of content added javascript
var html = '<div class="right-item-container"><a href="#"><span style="font-size:24px;" class="item-friend-name">mamá</span></a><br/><a href="#"><span class="clubname-container">school</span></a></div>'; $('.profile-container').empty().css({ 'padding-top' : '0'}).html(html);
it renders this:
this works fine in fiddle.
var html = '<div class="right-item-container"><a href="#"><span style="font-size:24px;" class="item-friend-name">mamá</span></a><br/><a href="#"><span class="clubname-container">school</span></a></div>'; $('#test').html(html);
so must way original content encoded.
Comments
Post a Comment