I have found that the character ‘
is not being correctly escaped and is producing the character �
,
//ajax the next page
var sendRequest = function(href, direct){
pushState(href);
jQuery.ajax({
url: href,
dataType: "html",
cache: false,
contentType: "text/html; charset=utf-8",
success: function(data) {
pushNewData(data, direct);
}
});
}
For example, the text ‘electric brain‘
within the element port_quote
, is incorrect.
<div id="port_quote">
<p>"Toi is the Maori word for art and the literal translation of rorohiko, the Maori word for computer, is �electric brain�. Rorohiko is morphed into Rerehiko and Toi Rerehiko is a moving image art form immersed in Maori tradition, tikanga (custom) and values which uses digital and electronic media."</p>
</div>
The request
headers are as follows...
Accept text/html, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Content-Type text/html; charset=utf-8
What can be done the fix the issue with some characters not being correctly escaped? I've thought about maybe looping through the data
variable and just replacing each ‘
with its ascii equivalent (but I'd prefer much more generic approach).