Thread Starter
mkdes
(@mkdes)
This is because this code replace short dash “-” and long dash “–” to the same entitie: –
Solution is NOT USE dash into title.
$attached = filter_input( INPUT_GET, 'maf_attached', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
There is the area to improve plugin when user use short dash “-” and long dash “–” into post title.
-
This reply was modified 1 year, 1 month ago by
mkdes.
Hello,
Thank you for your interest in this little plugin. I will take a look at your suggestions when I get a chance and get back to you.
Thread Starter
mkdes
(@mkdes)
I write this coda as temporary solution.
But this is only temporary, because dash is also change from short to long into media library filter fileld.
$attached = strip_tags( $_GET[‘maf_attached’] );
$attached = htmlspecialchars( $attached, ENT_QUOTES, ‘UTF-8’ );
$attached = str_replace( ‘–’, ‘-‘, $attached ); // this is because probably search field change dash
Check out the new version 1.2.0 🙂
Thread Starter
mkdes
(@mkdes)
Thank You for fast update.
But it need more improve.
When user start typing part of post title, the dropdownl list contains many titles with different dash length.
Maybe this are the revisions.
No matter what user chose, plugin not find post attachments.
See this image https://imgur.com/a/8nVfVXs
Check out the latest update to 1.2.1. Among other things, revisions are excluded. There is now also a hook that can be used to filter the permitted post types, if necessary.
Thread Starter
mkdes
(@mkdes)
Now works great. Thank You 🙂