Closed (fixed)
Project:
Taxonomy Views Integrator
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2012 at 11:49 UTC
Updated:
28 Sep 2015 at 23:53 UTC
Jump to comment: Most recent
Comments
Comment #1
markhalliwellMarked #1535590: view -> get_title is rendering ampersand (&) as & as dup of this issue. This issues is going down more of the right path.
This was a very annoying bug and took a while to figure out this module was the culprit. Views already sanitizes the title, which converts
&to&.drupal_set_title()by default runs the text throughcheck_plain()if thePASS_THROUGHisn't used.This all being said, while the patch technically works, it's using
filter_xss_admin()when it should probably really be usingfilter_xss($title, array()). I don't think that any HTML tags should be allowed in the title and should be stripped, non-tag HTML entities will be left alone. I think this is a more acceptable approach when setting the page title.Comment #2
duaelfrI have many use case where HTML is actually needed in the view titles (for theming purpose in most cases).
Plus, Views is exactly using the code line I proposed and I think this module should be as close as possible to the defaut views behavior to avoid the site builders to search for hours why they do not get the same result in the view preview and in their page. I totally trust Views developpers so if they used filter_xss_admin to sanitize the frontend title, we can do it too.
Any other opinion ?
Comment #3
duaelfrAs Mark said it works and as it is currently working on a few of my productions, I turn it to RTBC.
If you think TVI might handle titles differently than Views itself to disallow all HTML, argue and turn this issue back to "Need work".
Comment #4
duaelfrThis has been pushed to the 7.x branch.
It will be available in the next dev release.
Comment #5
markhalliwellComment #7
capfive commentedI am having this issue and I can't find the code or apply the patch, my Ampersand ('&') is displaying as
&in the page title when TVI is turned on, anyone able to help? I am using the following version 7.x-1.0-beta5+1-devComment #8
capfive commentedFYI anyone looking to find the updated patch can look in https://www.drupal.org/node/2361065#comment-9936414