[wp-trac] [WordPress Trac] #39691: wpLink autocomplete search improvement
WordPress Trac
noreply at wordpress.org
Wed Jun 28 15:41:06 UTC 2017
#39691: wpLink autocomplete search improvement
-------------------------------+------------------------------
Reporter: enrico.sorcinelli | Owner: adamsilverstein
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.8
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by enrico.sorcinelli):
@adamsilverstein The line above is the default value for `options.lower`
that lowercases the string in the `normalizeQuery` function.
So if the database is case insensitive, typing `Foo` or `foo` from client,
the search will return same results: the patch simply prevents to send to
the server both requests if the user types subsequently two or more
queries differing only by spaces and/or case sensitive.
I was thinking that exposing `dbCollate` as a global JavaScript variable
could be useful in other client situations, even if on the server side we
can lowercase the keys based on `$wpdb->collate`.
Anyway, currently, the core
[[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
editor.php?marks=1586-1587#L1586|does not]] by default, so we can improve
also that code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39691#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list