Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion includes/add-embeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,15 @@ function ce_quick_replace( $content = '', $options = '', $search = '' ) {

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

$open_len = strlen( $options['opening_ident'] );
$close_len = strlen( $options['closing_ident'] );

while ( false !== $start_pos ) {

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

if ( false !== $end_pos ) {
$url = substr( $content, $start_pos + 2, $end_pos - $start_pos - 2 );
$url = substr( $content, $start_pos + $open_len, $end_pos - $start_pos - $close_len );
$file = ce_get_file( $url );
if ( false !== $file ) {
$content = str_replace( $options['opening_ident'] . $url . $options['closing_ident'], $file, $content );
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: code, embed, html, css, javascript, script
Requires at least: 4.6
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 2.3.7
Stable tag: 2.3.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

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

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

= 2.3.8 =
* 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.

= 2.3.7 =
* Bug: Fixed a bug which created a potentual vulnerabilty
* Enhancement: Improved code quality, using the latest version of PHPCS and WordPress sniffs
Expand Down Expand Up @@ -324,5 +327,5 @@ versions of this plugin

== Upgrade Notice ==

= 2.3.7 =
* Important vulnerability fix
= 2.3.8 =
* Critical bug fix
4 changes: 2 additions & 2 deletions simple-code-embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Code Embed
* Plugin URI: https://wordpress.org/plugins/simple-embed-code/
* Description: 🧩 Code Embed provides a very easy and efficient way to embed code (JavaScript and HTML) in your posts and pages.
* Version: 2.3.7
* Version: 2.3.8
* Requires at least: 4.6
* Requires PHP: 7.4
* Author: David Artiss
Expand All @@ -26,7 +26,7 @@
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

define( 'CODE_EMBED_VERSION', '2.3.7' );
define( 'CODE_EMBED_VERSION', '2.3.8' );

// Include all the various functions.

Expand Down