Use search box to find keyword in title
Original title from content
Lowercase word in title, if it is highlighted
Joomla 3.7.3
It's this line in /components/com_search/views/view.html.php
$result->title = StringHelper::str_ireplace($needle, $hl1 . $needle . $hl2, htmlspecialchars($result->title, ENT_COMPAT, 'UTF-8'));
You don't have to use str_ireplace
here.
Labels |
Added:
?
|
Category | ⇒ | com_search |
Status | New | ⇒ | Confirmed |
Personally I don't see it as an issue since I wouldn't know if a word was or was not capitalised when searching I would want all results.
I suppose given the usuage case, another option could be added for case sensitive searching.
For me this is a bug that should be fixed. its not about the search but the search results
For me it's a bug.
In german, it's often that you have many uppercase words. It's a spelling mistake, it doesn't look good for the user and it's wrong.
I think, you have to search for lower and uppercase, but don't print out the highlighted words in lowercase. It should be the original.
I agree and i would fix it if i could
Ok I have a partial fix, but the problem is the whole search has been coded to force lower, it lowers the title and result. So now the highlighting is messed up. In turn it looks like StringHelper::substr_replace isn't actually working either! since it should be able to replace StringHelper::str_ireplace without any changes, yet it fails as it never finds a match.
@tonypartridge There seems to be a misunderstanding about the issue. Searching for e.g. joomla and finding joomla, Joomla or JOOMLA is good but searching for joomla and having all title results highlighted as joomla when they originally were Joomla or JOOMLA is the bug.
@INOSIM not according to @brianteeman and @Vmadmax there issue is it's finding all cases. Which is right in different languages.
I'm fixing the replacement to soon, we use ireplace but this doesn't support case sensitive so I'll have to move it to preg_replace.
No I am happy that the search is insensitive. The bug is that when the term
is highlighted then it is transformed to be displayed as lowercase
On 27 Jul 2017 12:53 p.m., "Tony Partridge" notifications@github.com
wrote:
@INOSIM https://github.com/inosim not according to @brianteeman
https://github.com/brianteeman and @Vmadmax https://github.com/vmadmax
there issue is it's finding all cases. Which is right in different
languages.I'm fixing the replacement to soon, we use ireplace but this doesn't
support case sensitive so I'll have to move it to preg_replace.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17241 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ZrknP-lDnSPWB_iB0-Ys_1iNlF8ks5sSHpNgaJpZM4Oigmz
.
Ahhh!
On 27 Jul 2017, 13:02 +0100, Brian Teeman notifications@github.com, wrote:
No I am happy that the search is insensitive. The bug is that when the term
is highlighted then it is transformed to be displayed as lowercaseOn 27 Jul 2017 12:53 p.m., "Tony Partridge" notifications@github.com
wrote:@INOSIM https://github.com/inosim not according to @brianteeman
https://github.com/brianteeman and @Vmadmax https://github.com/vmadmax
there issue is it's finding all cases. Which is right in different
languages.I'm fixing the replacement to soon, we use ireplace but this doesn't
support case sensitive so I'll have to move it to preg_replace.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17241 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ZrknP-lDnSPWB_iB0-Ys_1iNlF8ks5sSHpNgaJpZM4Oigmz
.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@tonypartridge First off, thanks for working on the replacement issue. But on the case-sensitive search issue, @brianteeman said "its not about the search but the search results" and @Vmadmax "I think, you have to search for lower and uppercase, but don't print out the highlighted words in lowercase. As a german, it's not strange to be lazy and search for a word all lowercase but it looks like a typo when the result is lowercase when it normally would be written Uppercase.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-27 13:46:14 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17241
closed as having PR #17303
Issue confirmed.
Searched for "Sample Sites", got:
System information
3.7.4-dev (latest nightly build)
Multilanguage Site
macOS Sierra, 10.12.5
Firefox 54 (64-bit)
MAMP 4.1.1
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17241.