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:

html render

enter image description here

this works fine in fiddle.

http://jsfiddle.net/hjcpp/

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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -