?
avatar murilodbva
murilodbva
28 Jul 2017

Steps to reproduce the issue

Do some search. Example at university where I work:

http://ww2.uft.edu.br/index.phpbusca?searchword=Programa%20de%20P%C3%B3s-Gradua%C3%A7%C3%A3o%20em%20Engenharia%20Ambiental&ordering=oldest&searchphrase=all&limit=20

Expected result

Titles of somes articles

Actual result

Titles with tag SPAN

System information (as much as possible)

Nginx 1.6.2-5+deb8u5.
Joomla version is 3.7.4 and Last commit (fffdce9).

Behavior observed in Firefox and Chrome.

Additional comments

It started in Joomla 3.7.3 and continues in the last change (fffdce9). The bug is in this file:

components/com_search/views/search/view.html.php

Line 268:
$result->title = preg_replace("/\b($needle)\b/ui", $hl1 . "$1" . $hl2, htmlspecialchars($result->title, ENT_COMPAT, 'UTF-8'));

avatar murilodbva murilodbva - open - 28 Jul 2017
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jul 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 29 Jul 2017
Category com_search
avatar tonypartridge
tonypartridge - comment - 29 Jul 2017

Hello,

There is a very valid reason for this. It's to highlight the keyword which was searched.

The problem is actually your template is doing some crazy things. See:

http://ww2.uft.edu.br/index.phpbusca?searchword=Programa%20de%20Pós-Graduação%20em%20Engenharia%20Ambiental&ordering=oldest&searchphrase=all&limit=20&template=protostar

When using the default Joomla! Template.

avatar tonypartridge
tonypartridge - comment - 29 Jul 2017

Looks like it's caused by Joomla and related to issue #17324 since your template has an override in place.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Jul 2017

@tonypartridge can you please correct related Issue (you are on #17325)?

avatar brianteeman
brianteeman - comment - 29 Jul 2017

I can confirm what @tonypartridge has said. The problem is in the code of your template override for the search component and not in joomla.

Closing as not joomla core

avatar brianteeman brianteeman - change - 29 Jul 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-07-29 08:22:24
Closed_By brianteeman
avatar brianteeman brianteeman - close - 29 Jul 2017
avatar tonypartridge
tonypartridge - comment - 29 Jul 2017

@murilodbva can I get a copy of your template to see what it's doing g to cause this, I've seen a few people with the same issue.

avatar murilodbva
murilodbva - comment - 29 Jul 2017

Yes sure, I believe there is no problem (I'll confirm with my team).
Can I send to your email "ton__im"?

avatar tonypartridge
tonypartridge - comment - 29 Jul 2017

yep that would be good thanks.

On 29 Jul 2017, 23:41 +0100, Murilo Valadares notifications@github.com, wrote:

Yes sure, I believe there is no problem (I'll confirm with my team).
Can I send to your email "ton__im"?

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar murilodbva
murilodbva - comment - 31 Jul 2017

@tonypartridge I just sent my template to your e-mail, for checking what was happening with my project and can be the same with anothers. Please, check if your received. We already found the solution and I'll already post here.

avatar murilodbva
murilodbva - comment - 31 Jul 2017

In our template, I don't know why, we were using "$this->escape($result->title);" before print the title. It was enough remove "$this->escape" and it works now.

Add a Comment

Login with GitHub to post a comment