Closed (cannot reproduce)
Project:
Views Bootstrap
Version:
7.x-3.x-dev
Component:
Accordion
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Sep 2015 at 10:16 UTC
Updated:
10 Sep 2020 at 22:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
trudog commentedin templates/accordion/theme.inc you have a hook for template.php. you can adjust the title if you like...
Comment #3
AliMartin commentedHi Pisicosu - could you prefer further instructions on the required changes in theme.inc please? My attempts so far continually break the code and functionality. It be great some basic markup to allow greater styling, or provide additional unique classes on each of the panels to allow CSS targeting. Many thanks in advance :) Ali
Comment #4
trudog commented1. DON'T modify theme.inc!
2. In /sites/all/modules/views_bootstrap/templates/accordion/theme.inc, there's a function called template_preprocess_views_bootstrap_accordion_plugin_style. Copy the whole function.
3. Paste the copied function to your theme folder in template.php.
4. Replace "template" word in function name with your theme name.
5. Inside this function, change the following line:
to
6. At this point, the title is no longer filtered.
7. IMPORTANT: I haven't studied the security implications since it is not necessary in my case.
8. Here's my code as a reference.
Comment #5
lazyD commentedThanks trudog,
This code worked for me.
Can we have a feature in views bootstrap module a checkbox which allow html in accordion panel-title?
Comment #6
lazyD commentedAttached a patch files, if someone can test and close this issue.
Comment #7
lazyD commentedMissed a declaration in views bootstrap accordion plugins style file.
Please refer updated patch file.
Comment #8
kbrinnerAs an alternative we could just switch from using the strip_tags() function to using filter_xss_admin() which I believe is standard for views in terms of sanitizing input. So, in the template override it would be:
I'm going to submit this as a patch to Views Bootstrap as well, as I think this would be an improvement. We'll see if they think it's secure enough.
Comment #9
chris matthews commentedThe 2 year old patch in #7 does not apply to the latest views_bootstrap 7.x-3.x-dev and needs a reroll.
Comment #10
shelaneActually, it is using the field based on the field setting. If you are using a field that is a plain text field, the html will be encoded. If it's a full text field, it will output the html as is and as filtered by the field type if you use the default field formatter.