URL link in search broken if URL is wrapped (?)
(Also some weird artifacts when searching)
Click Search
Search for expression
See URL
Click
URL like this:
http://eurospas1.com/covers-eurospas.php
Becomes this when clicked. See images below.
http://eurospas1.com/<mark>cover</mark>s-eurospas.php
Click link and go to the correct site
Note here it finds 'cover', but does NOT find 'face' - either in the Emoji, or in the URL. It does find facemask.


Also affects other searches - note how it mangles things here:

If I search for facemask (and it has to be exact - just 'face' will not find the URL but does find the emoji above) note the URL when clicked does this:
https://www.uk-personalprotectionequipment.co.uk/en14683-type1-<mark>facemask</mark>
N/A
see #18696 and #18456 :sweat_smile:
commit adding this #16166
Damn - I did search too :-(
So this is in part a dupe of those.
However, there is a separate issue regarding search itself - I am not sure whether that gets resolved by fixing the issue.
I've been able to reproduce the issue.
I'm trying to fix this, especially using better RegEx rules. I managed to find one to exclude emojis, but handling HTML and/or URLs is a bit more complex... I'll make a pull request referencing all these issues once I'll have something interesting to test/review ;)

@rocket.cat: mentions break too.
maybe you can just move https://github.com/RocketChat/Rocket.Chat/pull/16166/files#diff-137696e1986a33ce14c42062296a4484R45 up directly under the definitions? Before the msg gets rendered?
I created a PR draft, after being able to fix URLs and emojis. Still some points are needing more work or investigation
@rocket.cat: mentions break too.maybe you can just move https://github.com/RocketChat/Rocket.Chat/pull/16166/files#diff-137696e1986a33ce14c42062296a4484R45 up directly under the definitions? Before the
msggets rendered?
I didn't manage to understand or reproduce any issue with mentions, can you explain better ?
send a message with a mention @rocket.cat.
search for a letter in the name, like r. It won't show the mention as a message, but what the screenshot shows

Do you have the latest RocketChat version ? I tried with @all before, and now with @rocket.cat and I get no search result with a or r... Strange, maybe they modified so mentions are not searched ?
version 3.5.2 and @all doesn't seem to trigger it. I think having _no_ search result is not ideal.
Code seems unchanged.
If you can't reproduce, forget it :wink:
Alright. If I find something I'll tell you. Anyway, considering what I see on your screenshot, adding a bit (rname to href|title) in my regex could be sufficient, we'll see.
Do you have any clue about the fact that some search result don't show up ?
I mean, if I search face, I will find messages with face-book.com but not with facebook.com, or face-mask but not facemask
It's not related to the highlighting regex, it's something that is handled before, but I can't really locate where...
Do you have any clue about the fact that some search result don't show up ?
sorry, I am not familiar with this code base.
Maybe ask @ashwaniYDV who implemented this feature. As a member he should be able to help you even more :)
sorry, I am not familiar with this code base.
Maybe ask @ashwaniYDV who implemented this feature. As a member he should be able to help you even more :)
From what I understand, he implemented the highlighting feature, and the issue here is more related to the search feature itself (highlighting code part isn't even called, it's like these results are not found at all)... But yeah, maybe someone knowing the code base could help, thanks 馃槃
Still waiting on answer (about missing results) on #18913 and then I'll be able to finish the pull request and put it to review, it'll fix issues we discussed here
Rocket.chat is so buggy, this one bug does not change much. They don't even want to help you fixing problems