Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript covert html characters to text

const decodeHTML = s => {
    var str, temp= document.createElement('p');
    temp.innerHTML= s;
    str= temp.textContent || temp.innerText;
    temp=null;
    return str;
}

console.log(decodeHTML('<'));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #covert #html #characters #text
ADD COMMENT
Topic
Name
1+7 =