Project

General

Profile

Actions

Bug #56262

closed

Indexed search makes search result Title wrong - htmlspecialchars

Added by Dragan Tomic almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Indexed Search
Target version:
Start date:
2014-02-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Indexed search has error during creation item_title field.

There is an error in SearchController:

in method 'compileSingleResultRow' (line 349) is called 'htmlspecialchars' function ($title field) and then again in 'linkPage' method (line 1186) when returning a tag with the title performing same function again, what makes mess.

Example:
First time performing 'htmlspecialchars' makes from this string Preisverleihung und Preisträger & "2"013 -> Preisverleihung und Preisträger & "2"013 and second performing same method makes this -> Preisverleihung und Preisträger & "2"013 what can't be returned in normal string in FE.

My patch was just to remove line 349 from 'compileSingleResultRow' method:
$title = htmlspecialchars($title);

and it's gonna make nice special character in Title field.

P.S. I attached 2 picture showing search results before and after patch.


Files

Actions #1

Updated by Dragan Tomic almost 10 years ago

Just to format with 'pre' tag (forgot to preview :) ):

Original string *Preisverleihung und Preisträger & "2"013* -> *Preisverleihung und Preisträger & "2"013* (after first performing htmlspecialchars) 
and wrong one *Preisverleihung und Preisträger & "2"013* (after second performing htmlspecialchars on Title field).

Actions #2

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27849

Actions #3

Updated by Gerrit Code Review almost 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27849

Actions #4

Updated by Gerrit Code Review almost 10 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27998

Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 1 for branch TYPO3_6-0 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27999

Actions #6

Updated by Markus Klein almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF