Search
 
SCRIPT & CODE EXAMPLE
 

HTML

decode html entities

function htmlDecode(input) {
  const doc = new DOMParser().parseFromString(input, "text/html");
  return doc.documentElement.textContent;
}

console.log(  htmlDecode("<img src='myimage.jpg'>")  )    
// "<img src='myimage.jpg'>"
Comment

PREVIOUS NEXT
Code Example
Html :: crawler get text, not get html 
Html :: disable pdf download to not logged in users wordpress 
Html :: html franc symbol 
Html :: change text color exactly one word inside text html 
Html :: html prime number program 
Html :: bootstrap navabar 
Html :: Reformat a python table in a html file 
Html :: how to remove line breaks in html 
Html :: Text with colour bold 
Html :: email reply link html 
Html :: HTML5 Meter 
Html :: what is paragraph tag 
Html :: HTML <ins 
Html :: html input date format 
Html :: Adding multiple class using ng-class 
Html :: slideshow in html 
Html :: ionic footer not appearing 
Html :: tailwind flex grow 1 
Html :: bootstrap boiler-plate 
Html :: html to pdf npm 
Html :: prevent form submission on enter key 
Html :: space in html 
Html :: input groups 
Html :: image carousel output 
Html :: form action delete 
Html :: meta tag 
Html :: twig html to markdow 
Html :: build a fed ex tracking html css 
Html :: jokes 
Html :: how to set image in input type=file by jquery 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =