Bug #77901

HTML tags in default indexed_search Fluid output get escaped

Added by Felix Rauch over 2 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2016-09-09
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

Description

In the default Extbase & Fluid indexed_search template, there is a ViewHelper outputting information about the number of search results, and which ones are being displayed on the current page. The counts get wrapped in <strong> tags, but since the output string gets escaped, they end up as &lt;strong&gt; in the page source.

Since the parameters that get put in the generated string are generated by TYPO3 internally, and cannot be changed from the outside, I think it would be safe to return the output of the ViewHelper in raw form.

How to reproduce:
  1. Create a basic template to output content, and make the content indexable by indexed_search
  2. Index some pages with indexed_search
  3. On the search page, with no further setup of the Extbase & Fluid plugin, search for any term that would return results
  4. As you can see, the text (i.e. Displaying results <strong>1 to 1</strong> out of <strong>1</strong> ) is shown with escaped tags.

Associated revisions

Revision 62b3c79f (diff)
Added by Felix Rauch over 2 years ago

[BUGFIX] Don't escape output of ViewHelper in indexed_search

The PageBrowsingResultsViewHelper in the Extbase and Fluid based plugin
of indexed_search generates HTML output which gets escaped, thus leading
to wrong output in the FE.

This fix sets the property "escapeOutput" of the ViewHelper to false, so
that Fluid does not further escape the generated HTML.

Resolves: #77901
Releases: master
Change-Id: I511dded5d92f60194af96b081ccbdab4986cf1ee
Reviewed-on: https://review.typo3.org/49897
Tested-by: TYPO3com <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

History

#1 Updated by Felix Rauch over 2 years ago

  • Description updated (diff)

#2 Updated by Gerrit Code Review over 2 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/49897

#3 Updated by Gerrit Code Review over 2 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/49897

#4 Updated by Felix Rauch over 2 years ago

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

#5 Updated by Benni Mack 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF