From 12a1a3e835fa66508ae855911421beea6fdfbf68 Mon Sep 17 00:00:00 2001
From: Sami Ahmed Siddiqui
- 5-star rating with a nice message to me :)', - 'custom-permalinks' - ),'https://wordpress.org/support/plugin/custom-permalinks/reviews/?rate=5#new-post',__('Custom Permalinks Rating', 'custom-permalinks')); + 5-star rating with a nice message to me :)', + 'custom-permalinks' + ), + array( + 'a' => array( + 'href' => array(), + 'title' => array(), + 'target' => array(), + ), + ) + ); ?>
diff --git a/includes/class-custom-permalinks-form.php b/includes/class-custom-permalinks-form.php index 29fcb22..c3d68d9 100644 --- a/includes/class-custom-permalinks-form.php +++ b/includes/class-custom-permalinks-form.php @@ -754,12 +754,15 @@ private function get_permalink_form( $original = $this->check_conflicts( $original ); } - if ( $permalink ) { - $post_slug = htmlspecialchars( urldecode( $permalink ) ); + $original_encoded_url = ''; + if ( $original ) { $original_encoded_url = htmlspecialchars( urldecode( $original ) ); + } + + if ( $permalink ) { + $post_slug = htmlspecialchars( urldecode( $permalink ) ); } else { - $post_slug = htmlspecialchars( urldecode( $original ) ); - $original_encoded_url = $post_slug; + $post_slug = $original_encoded_url; } wp_enqueue_script(