Skip to content

Commit e58d84c

Browse files
committed
V2.7.7
1 parent 75e3612 commit e58d84c

File tree

9 files changed

+53
-37
lines changed

9 files changed

+53
-37
lines changed

dist/easycoder-min.js

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/easycoder.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5272,8 +5272,6 @@ const EasyCoder_Browser = {
52725272
switch (targetRecord.keyword) {
52735273
case `text`:
52745274
case `textarea`:
5275-
target.value = value;
5276-
break;
52775275
case `input`:
52785276
target.value = value;
52795277
break;
@@ -7475,7 +7473,7 @@ const EasyCoder_Value = {
74757473

74767474
compile: compiler => {
74777475
const token = compiler.getToken();
7478-
const item = EasyCoder_Value.getItem(compiler);
7476+
let item = EasyCoder_Value.getItem(compiler);
74797477
if (!item) {
74807478
throw new Error(`Undefined value: '${token}'`);
74817479
}
@@ -7488,7 +7486,11 @@ const EasyCoder_Value = {
74887486
};
74897487
while (compiler.tokenIs(`cat`)) {
74907488
compiler.next();
7491-
value.parts.push(compiler.value.getItem(compiler));
7489+
item = EasyCoder_Value.getItem(compiler);
7490+
if (!item) {
7491+
throw new Error(`Undefined value: '${token}'`);
7492+
}
7493+
value.parts.push(item);
74927494
}
74937495
return value;
74947496
}
@@ -7585,6 +7587,8 @@ const EasyCoder_Value = {
75857587
.replace(/\\/g, `~bs~`);
75867588
case `url`:
75877589
return encodeURIComponent(value.replace(/\s/g, `+`));
7590+
case `base64`:
7591+
return btoa(value);
75887592
case `sanitize`:
75897593
return value.normalize(`NFD`).replace(/[\u0300-\u036f]/g, ``);
75907594
default:
@@ -7606,6 +7610,8 @@ const EasyCoder_Value = {
76067610
case `url`:
76077611
const decoded = decodeURIComponent(value);
76087612
return decoded.replace(/\+/g, ` `);
7613+
case `base64`:
7614+
return atob(value);
76097615
default:
76107616
return value;
76117617
}
@@ -8511,7 +8517,7 @@ const EasyCoder = {
85118517
}
85128518
},
85138519
};
8514-
EasyCoder.version = `2.7.6`;
8520+
EasyCoder.version = `2.7.7`;
85158521
EasyCoder.timestamp = Date.now();
85168522
console.log(`EasyCoder loaded; waiting for page`);
85178523

dist/easycoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: EasyCoder
44
* Plugin URI: https://easycoder.software
55
* Description: Control the appearance and behavior of your posts and pages by embedding simple English-like scripts, without the need to learn JavaScript.
6-
* Version: 2.7.6
6+
* Version: 2.7.7
77
* Author: EasyCoder Software
88
* Author URI: https://easycoder.software
99
*/
@@ -16,7 +16,7 @@
1616
add_action('wp_enqueue_scripts', 'easycoder_enqueue_script', 2);
1717
function easycoder_enqueue_script() {
1818
wp_enqueue_script('easycoder_script',
19-
'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.6');
19+
'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.7');
2020
}
2121

2222
// Set up default plugin and REST scripts

dist/plugins/showdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const EasyCoder_Showdown = {
2121
run: program => {
2222
const command = program[program.pc];
2323
if (typeof showdown === `undefined`) {
24-
program.require(`js`, `https://cdn.rawgit.com/showdownjs/showdown/1.9.1/dist/showdown.min.js`,
24+
program.require(`js`, `https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js`,
2525
() => {
2626
EasyCoder_Showdown.setupExtension();
2727
program.run(command.pc + 1);

dist/readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ For tutorials and a programmers' reference see our [EasyCoder Software Codex](ht
5454

5555
== Changelog ==
5656

57+
= 2.7.7 20-aug 2021 =
58+
* Add encode/decode for Base64
59+
5760
= 2.7.6 23-feb 2021 =
5861
* Fix security vulnerability. Thanks to Brett Caldwell, buckshotbrett@gmail.com
5962

js/easycoder/EasyCoder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
EasyCoder.version = `2.7.6`;
1+
EasyCoder.version = `2.7.7`;
22
EasyCoder.timestamp = Date.now();
33
console.log(`EasyCoder loaded; waiting for page`);
44

js/easycoder/Value.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ const EasyCoder_Value = {
181181
.replace(/\\/g, `~bs~`);
182182
case `url`:
183183
return encodeURIComponent(value.replace(/\s/g, `+`));
184+
case `base64`:
185+
return btoa(value);
184186
case `sanitize`:
185187
return value.normalize(`NFD`).replace(/[\u0300-\u036f]/g, ``);
186188
default:
@@ -202,6 +204,8 @@ const EasyCoder_Value = {
202204
case `url`:
203205
const decoded = decodeURIComponent(value);
204206
return decoded.replace(/\+/g, ` `);
207+
case `base64`:
208+
return atob(value);
205209
default:
206210
return value;
207211
}

server/easycoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: EasyCoder
44
* Plugin URI: https://easycoder.software
55
* Description: Control the appearance and behavior of your posts and pages by embedding simple English-like scripts, without the need to learn JavaScript.
6-
* Version: 2.7.6
6+
* Version: 2.7.7
77
* Author: EasyCoder Software
88
* Author URI: https://easycoder.software
99
*/
@@ -16,7 +16,7 @@
1616
add_action('wp_enqueue_scripts', 'easycoder_enqueue_script', 2);
1717
function easycoder_enqueue_script() {
1818
wp_enqueue_script('easycoder_script',
19-
'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.6');
19+
'https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js', array(), '2.7.7');
2020
}
2121

2222
// Set up default plugin and REST scripts

server/readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ For tutorials and a programmers' reference see our [EasyCoder Software Codex](ht
5454

5555
== Changelog ==
5656

57+
= 2.7.7 20-aug 2021 =
58+
* Add encode/decode for Base64
59+
5760
= 2.7.6 23-feb 2021 =
5861
* Fix security vulnerability. Thanks to Brett Caldwell, buckshotbrett@gmail.com
5962

0 commit comments

Comments
 (0)