PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow / 2.6.6
WDesignKit – AI Templates, Widget Builder & MCP Workflow v2.6.6
2.6.6 2.6.5 2.6.4 2.6.3 2.6.2 2.6.1 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5.0 2.4.0 2.3.3 2.3.2 2.3.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 All 128 releases
← All changes | includes/admin/api/class-wdkit-code-snippet.php +8 -1 2.5.32.6.6 View file →
@@ -667,8 +667,15 @@
667 667 }
668 668
669 669 $snippet = $json['snippets'][0];
670 670
671 + // Decode HTML entities in the snippet name so imported titles show
672 + // "&" instead of the raw entity "&". The cloud content stores the
673 + // name HTML-encoded, and Nexter's file-based import uses it as-is.
674 + if ( isset( $snippet['name'] ) ) {
675 + $snippet['name'] = html_entity_decode( (string) $snippet['name'], ENT_QUOTES, 'UTF-8' );
676 + }
677 +
671 678 if ( empty( $snippet['post_type'] ) || 'nxt-code-snippet' !== $snippet['post_type'] ) {
672 679 $data = array(
673 680 'success' => false,
674 681 'data' => array(
@@ -719,9 +726,9 @@
719 726 } else {
720 727 // Fallback to old post-based method if file-based failed.
721 728 $post_id = wp_insert_post(
722 729 array(
723 - 'post_title' => sanitize_text_field( html_entity_decode( wp_unslash( $snippet['name'] ) ) ),
730 + 'post_title' => sanitize_text_field( $snippet['name'] ),
724 731 'post_type' => 'nxt-code-snippet',
725 732 'post_status' => 'publish',
726 733 )
727 734 );