I have a page that is part of a backend CRM admin panel. On that page the HTML output comes from some PHP functions that I can\'t access. And that HTML automatically changes
Please try this
.replace(/</g, '<').replace(/>/g, '>')
to replace these characters globally. I tried this and works like a charm :)
if use underscore.js exist _.unescape(string)
<?php
$a =
'<div style="font-size: 11px; width: 90%; font-family: Tahoma;" id="cotiz"><strong>Valuación</strong> de InfoAuto: 35.500,00<br />
Cotización Seleccionada: Ninguna<br />
Allianz, Responsabilidad Civil: $205,25<br />
Allianz, Terceros Completos: $278,85 </div>';
$b = html_entity_decode($a);
echo $b;
?>
The simplest thing to do would be
$('#test').each(function(){
var $this = $(this);
var t = $this.text();
$this.html(t.replace('<','<').replace('>', '>'));
});
working edit/jsfiddle by Jared Farrish