Decode HTML entities using Javascript | Decode HTML entities JS

preview_player
Показать описание
Learn how to decode HTML entities using Javascript. This method doesn't allow XSS Vulnerabilities in your code!
Decode HTML entities using Javascript | Decode HTML entities JS

Code used in this video:

If you have any questions or problems with this tutorial, pls comment below or contact me on discord(Coder Gautam#8305)
--
Music:
TheFatRat - Fly Away(Instrumental)
--
Text-to-speech:
SAPI5 TTSAPP- ScanSoft Daniel_Full_22kHz
(If you want downloads DM me on discord Coder Gautam#8305)
--
Want more Coder Gautam? Check these links!

If you guys enjoyed the video, make sure to like and subscribe to the Coder Gautam channel. Can we hit 610 subs?

Also, comment down below what my next video should be. Make sure it's related to tech or coding.

#CoderGautam #Javascript #decodehtmlentities
Рекомендации по теме
Комментарии
Автор

damn, , , I've been doing this like 5 hours, , , and you did it in 3 seconds!! I'm slapping myself, , , thanks a lot

tuyishime
Автор

If you would like to do it in 1 line:
const html_decode = (text) => new DOMParser().parseFromString(text,

I don't know why but for some reason when I passed a dictionary from django to the html template into a javascript variable it gave a weird html characters, this solved my problem thank you!

gamingllama
Автор

Just raelized it doesn't always work, but the solution is to install 'jsdom' package and put those 3 lines at the beggining of the function:

const jsdom = require('jsdom');
const { JSDOM } = jsdom
global.DOMParser = new JSDOM().window.DOMParser;

dzbanecznix
Автор

still dont believe that this can be used to hack my website database!!

ProfessionalBrokeMemer