Skip to content

Commit

Permalink
2.0.3 - Closes #24 (HTML entities in inline source), thx @andrispraul…
Browse files Browse the repository at this point in the history
  • Loading branch information
taoeffect committed Jun 1, 2018
1 parent fd357d0 commit ae9873c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.0.3

- Fix inline-source containing HTML entities (via **[@andrispraulitis](https://github.com/andrispraulitis)**)

### 2.0.2

- IE Support (via **[@akhoury](https://github.com/akhoury)**)
Expand Down
8 changes: 5 additions & 3 deletions dist/vue-script2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-script2 v2.0.2
* vue-script2 v2.0.3
* (c) 2016-2018 Greg Slepak
* @license MIT License
*/
Expand All @@ -12,7 +12,7 @@
var Script2 = {
installed: false,
p: Promise.resolve(),
version: '2.0.2', // grunt will overwrite to match package.json
version: '2.0.3', // grunt will overwrite to match package.json
loaded: {}, // keys are the scripts that have been loaded
install: function install(Vue) {

Expand All @@ -38,8 +38,10 @@
if (!this.src) {
Script2.p = Script2.p.then(function () {
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
4 changes: 2 additions & 2 deletions dist/vue-script2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-script2",
"version": "2.0.2",
"version": "2.0.3",
"description": "Brings back <script> to your favorite Single Page App!",
"main": "dist/vue-script2.js",
"jsnext:main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var Script2 = {
installed: false,
p: Promise.resolve(),
version: '2.0.2', // grunt will overwrite to match package.json
version: '2.0.3', // grunt will overwrite to match package.json
loaded: {}, // keys are the scripts that have been loaded
install (Vue, options = {}) {
if (Script2.installed) return
Expand Down

0 comments on commit ae9873c

Please sign in to comment.