Im using this code:
$(document).ready(function () {
var breadCrumps = $('.breadcrumb');
breadCrumps.find('span').text("<%= ArticleSectionData.title %>");
});
title is a property which has values encoded in unicode (I think). These are Greek letters. On the local IIS developer server (embedded in visual studio), the characters are displayed in correct way but, on the test server they appear as:
Σ
Do You know any solution for this problem ?
Thanks for help
EDIT:
I have changed the code a little bit:
breadCrumps.find('span').text(<%= ArticleSectionData.title %>);
And now it works correctly, encoding is frustrating …
If you are working off of a different database in test than in dev, then I suspect the issue is with the data. If you are storing HTML entities (eg,
Σ) in your database, then you need to use.html(). If you are storing actual unicode characters (eg,Σ) in the database, then you need to use.text(). The way to representΣin html is withΣ. But if you set the text of an element toΣ, it displays that literally – the innerHTML of that element would contain&#931;.