Skip to content

Commit 49e4a55

Browse files
authored
Merge pull request #66 from dartiss/develop
Develop
2 parents 8acabeb + 125aafe commit 49e4a55

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

includes/add-embeds.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,15 @@ function ce_quick_replace( $content = '', $options = '', $search = '' ) {
133133

134134
$start_pos = strpos( $content, $options['opening_ident'] . $search, 0 );
135135

136+
$open_len = strlen( $options['opening_ident'] );
137+
$close_len = strlen( $options['closing_ident'] );
138+
136139
while ( false !== $start_pos ) {
137140

138141
$end_pos = strpos( $content, $options['closing_ident'], $start_pos + 1 );
139142

140143
if ( false !== $end_pos ) {
141-
$url = substr( $content, $start_pos + 2, $end_pos - $start_pos - 2 );
144+
$url = substr( $content, $start_pos + $open_len, $end_pos - $start_pos - $close_len );
142145
$file = ce_get_file( $url );
143146
if ( false !== $file ) {
144147
$content = str_replace( $options['opening_ident'] . $url . $options['closing_ident'], $file, $content );

readme.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: code, embed, html, css, javascript, script
55
Requires at least: 4.6
66
Tested up to: 6.4
77
Requires PHP: 7.4
8-
Stable tag: 2.3.7
8+
Stable tag: 2.3.8
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -195,6 +195,9 @@ It is, in that it doesn't save any data that could be odds with GDPR compliance
195195

196196
I use semantic versioning, with the first release being 1.0.
197197

198+
= 2.3.8 =
199+
* Bug: You know that vulnerability I fixed in 2.3.7? It fixed that but broke something else. That should now resolved. Apologies for that.
200+
198201
= 2.3.7 =
199202
* Bug: Fixed a bug which created a potentual vulnerabilty
200203
* Enhancement: Improved code quality, using the latest version of PHPCS and WordPress sniffs
@@ -324,5 +327,5 @@ versions of this plugin
324327

325328
== Upgrade Notice ==
326329

327-
= 2.3.7 =
328-
* Important vulnerability fix
330+
= 2.3.8 =
331+
* Critical bug fix

simple-code-embed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Plugin Name: Code Embed
1010
* Plugin URI: https://wordpress.org/plugins/simple-embed-code/
1111
* Description: 🧩 Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
12-
* Version: 2.3.7
12+
* Version: 2.3.8
1313
* Requires at least: 4.6
1414
* Requires PHP: 7.4
1515
* Author: David Artiss
@@ -26,7 +26,7 @@
2626
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2727
*/
2828

29-
define( 'CODE_EMBED_VERSION', '2.3.7' );
29+
define( 'CODE_EMBED_VERSION', '2.3.8' );
3030

3131
// Include all the various functions.
3232

0 commit comments

Comments
 (0)