H
H
habrdima2016-05-02 16:40:20
JavaScript
habrdima, 2016-05-02 16:40:20

Appears & after &, what is it? why?

I write the link in innerHTML, before writing the link is correct, the page shows everything correctly, when I read in the console iner the link is different with these amp; why is this happening? if that code in chrome extension

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2016-05-02
@habrdima

The ampersand is a special character in HTML. Check out w3schools for a lot of great stuff. Any normal validator will tell you that a pure ampersand in HTML is not good: if it is followed by something that looks like a character code, your link may suddenly break.
When fetching the link back, you can do something like this:
and get back clean &

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question