I need to determine the length of string which may contain html-entities.
For example \"&darr ;\" (↓) would return length 6, which is correct, but I want these
Since there's no solution using jQuery yet:
var str = 'lol&'; alert($('').html(str).text().length); // alerts 4
Uses the same approach like karim79, but it never adds the created element to the document.