Skip to content

Commit

Permalink
Decode html entities (#25)
Browse files Browse the repository at this point in the history
* Decode html entities

* Update index.js

* Update index.js

* Update index.js
  • Loading branch information
Andris Praulitis authored and taoeffect committed Jun 1, 2018
1 parent 7aa3174 commit fd357d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ var Script2 = {
if (!this.src) {
Script2.p = Script2.p.then(() => {
var s = document.createElement('script')
var h = this.$el.innerHTML
h = h.replace(/&lt;/gi, '<').replace(/&gt;/gi, '>').replace(/&amp;/gi, '&')
s.type = 'text/javascript'
s.appendChild(document.createTextNode(this.$el.innerHTML))
s.appendChild(document.createTextNode(h))
parent.appendChild(s)
})
} else {
Expand Down

0 comments on commit fd357d0

Please sign in to comment.