Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
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
Offline
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