Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-07-22 06:17:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

html entities do not display properly in search

As the title says: html entities do not display properly in search as seen here. Using txp v. 4.5.4.

>Edited to add that without the + in the url, the results appear just fine

Last edited by colak (2013-07-22 06:24:52)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2013-07-22 17:51:30

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: html entities do not display properly in search

If you look at the page source, they are not html entities anymore, but a bunch of <strong></strong>&<strong></strong>#<strong></strong>8<strong></strong>.... That happens because spaces in the search query string are replaced by regexp pipe (|) in search_result_excerpt function, so your +Spyros becomes /|Spyros/ pattern, that matches just any empty inter-letter “character”. You’ll get the same result with Spyros+, but Spyros+art will be fine.

Offline

#3 2013-07-23 08:20:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: html entities do not display properly in search

Hi Oleg,

That kind of makes sense. So I guess that this is not a bug.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2013-07-23 13:04:56

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: html entities do not display properly in search

Hi Yiannis,

I would classify it as a minor bug unrelated to html entities. It can be annoying, if one accidentally types a space at the start|end of a search query. Trimming $q in search_result_excerpt function should fix it.

Offline

#5 2013-08-23 17:41:52

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: html entities do not display properly in search

I was wondering if the devs read this topic and implemented the change – if it doesn’t break anything else.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2013-08-24 11:37:49

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: html entities do not display properly in search

colak wrote:

I was wondering if the devs read this topic and implemented the change – if it doesn’t break anything else.

Yiannis, from my experience, filling a bug report is more reliable.

Offline

#7 2013-08-24 14:04:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: html entities do not display properly in search

Thanks Oleg,

Indeed this is the right procedure. I just did:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2013-08-24 14:48:16

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: html entities do not display properly in search

Thanks Oleg. This been resolved in r5560.

Offline

#9 2013-08-24 14:58:45

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,172
Website GitHub Mastodon Twitter

Re: html entities do not display properly in search

Thanks Jukka – and Oleg of course for providing the fix


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB