Merge pull request #5 from umesh53/patch-1

Update article.md
This commit is contained in:
Ilya Kantor 2017-06-05 14:34:05 +03:00 committed by GitHub
commit bf3398baae

View file

@ -399,7 +399,7 @@ Compare the two:
``` ```
1. The first `<div>` gets the name "as HTML": all tags become tags, so we see the bold name. 1. The first `<div>` gets the name "as HTML": all tags become tags, so we see the bold name.
2. The second `<div>` gets the nams "as text", so we literally see `<b>Winnie-the-pooh!</b>`. 2. The second `<div>` gets the name "as text", so we literally see `<b>Winnie-the-pooh!</b>`.
In most cases, we expect the text from a user, and want to treat it as text. We don't want unexpected HTML in our site. An assignment to `textContent` does exactly that. In most cases, we expect the text from a user, and want to treat it as text. We don't want unexpected HTML in our site. An assignment to `textContent` does exactly that.