I\'m setting document.title
with JavaScript, and I can\'t find a way to supply » (»
) without it appearing as literal text.
Here\
document.title
takes the string as it is, so you can do this:
document.title = 'Home » site.com';
If you need to provide it as the entity name, you can set the innerHTML attribute. Here are two examples of how you can do it.
document.getElementsByTagName('title')[0].innerHTML = '»';
// or
document.querySelector('title').innerHTML = "»";