пришлось писать свое
function convertSpecSymbols (str, toText) {
var
symbols = [
['&', '&'],
['<', '<'],
['>', '>'],
['∧', '^'],
['∼', '~']
],
pos = -1;
if (typeof toText == 'undefined' || toText) {
for (var i = 0, n = symbols.length; i < n; i++) {
while ((pos = str.indexOf(symbols[i][0], pos + 1)) != -1) {
str = str.substring(0, pos) + symbols[i][1] + str.substring(pos + symbols[i][0].length);
}
}
} else {
for (var i = 0, n = symbols.length; i < n; i++) {
while ((pos = str.indexOf(symbols[i][1], pos + 1)) != -1) {
str = str.substring(0, pos) + symbols[i][0] + str.substring(pos + symbols[i][1].length);
}
}
}
return str;
}