I created a view to display upcoming events [custom cck] for 1 week from today [default argument]. The view works fine and outputs the correct nodes. I created a page that will display the output using quicktabs style. I created a custom date format that only displays the Day name and the date number (example: Thu 26). I then tell the quicktab style to use that custom date format as the tab label and the grouping field.
The tabs are created correctly but I get the div tags in the actual tab label. This happens with any date format I throw at it, but the tabs are rendered correctly if I change the grouping to some other field in the node [example: Location:City].
Comment | File | Size | Author |
---|---|---|---|
#33 | 894746-quicktabs-html-tab-title-33.patch | 439 bytes | radimklaska |
#27 | 894746-quicktabs-html-tab-title-27.patch | 1.55 KB | ezra-g |
#21 | quicktabs-sanitization-894746-21.patch | 1.29 KB | rickmanelius |
#12 | Schermata 2011-05-17 a 01.56.12.jpg | 37.67 KB | Rhodungeon |
#4 | quicktabs_tab_titles.patch | 817 bytes | Taran2L |
Comments
Comment #1
BeaPower CreditAttribution: BeaPower commentedHow were you able to get the quicktabs style in views, I don't see it...
Comment #2
chowdah CreditAttribution: chowdah commentedFor now, the solution to the problem is to click the field that you are outputting in Views and check the 'Strip HTML tags' checkbox, then reformat with css.
Comment #3
chowdah CreditAttribution: chowdah commented@BeaPower - are you using 6.x.2.x-dev? I'm not sure if the stable release has the Views Style in it. Try using the dev version, run updates, flush all caches and then see if it shows up in the list of views styles in the Views edit area fro any view you may have.
Comment #4
Taran2LHey Guys,
The source of the issue is theme_quicktabs_tabs function (file quicktabs.module line 341).
All tab title text content goes through check_plain function = all html tags are being encoded in a plain-text string for display as HTML.
To fix we need make 2 changes: add flag into quicktab array and check it on rendering. Views module filters out fields content by itself. So we can do this (file includes/quicktabs.views.inc line 46):
Next we should tell l function not to filter text (file quicktabs.module insert on line 380):
Problem is solved.
Best,
- Roman
Comment #5
ficklecatTested patch in #4 and works fine for me thanks Roman. Hoping someone else can review this too.
Comment #6
jantoine CreditAttribution: jantoine commentedPatch in #4 works and allows the use of images as tab titles.
@Taran2l
In the future, please follow Drupal coding standards when naming patches (http://drupal.org/patch/submit). Specifically, adding the issue # and comment # makes it much easier to determine if a patch is still necessary.
Cheers,
Antoine
Comment #7
nachiket-1 CreditAttribution: nachiket-1 commentedBy given patch issue resolved for me but one more problem arise with it that tabs are not proper. as i click on one tab it shows another tabs value while when i click last tab it doesn't shows any value.. when i click on blank space b4 first tab it shows value of first tab...
plz plz help me fast
Comment #8
PasqualleComment #9
marktheshark CreditAttribution: marktheshark commentedAny progress on committing this?
I get an apostrophe escaped as
'
in a quicktabs view.Comment #10
stams24 CreditAttribution: stams24 commentedPatch worked perfect. Thank you
Comment #11
marktheshark CreditAttribution: marktheshark commentedConfirming that #4 works, as well.
Comment #12
Rhodungeon CreditAttribution: Rhodungeon commentedI'm having some problem with the patch guys: I followed all the steps to configure git, but everytime I type
git apply -v quicktabs_tab_titles.patch
I got this error (see the attachment)... patch corrupted at line 19
I'm using the 6.x-3.x-dev version.
Thanks
Rob
Comment #13
Rhodungeon CreditAttribution: Rhodungeon commentedI saw the patch was made for 2.x dev version... I tested on 2-x but I got the same error :(
Is someone experiencing the same problem?
Comment #14
Roze-1 CreditAttribution: Roze-1 commented#4 Patch Works fine for me too..
Comment #15
rickmanelius CreditAttribution: rickmanelius commentedSubscribe. Working on a D7 port.
Comment #16
rickmanelius CreditAttribution: rickmanelius commentedI'm sure it's a hack, but I did get this working in D7
It's essentially a very small adjustment of #4. I took out the conditional if statement as there because the settings $quicktabs variable is not within scope here. I'm sure there is some other way to check, but I'm on a deadline. cheers.
Comment #17
jmornar CreditAttribution: jmornar commentedHi, this problem still exist in version 7.x-3.0. Is there any patch available?
Regards
Comment #18
amfriedman CreditAttribution: amfriedman commentedFor D7, Quicktabs 3.4, I applied a crude hack that seemed to have fixed the problem:
In file quicktabs.module, starting at line 211:
Comment #19
JThan CreditAttribution: JThan commentedI am using 3.4 and the ui_tabs renderer. Good way to do this probably would have been to write my own renderer.
Bad way to do this: go to "/modules/quicktabs/plugins" open "QuickUITabs.inc", Line 67 remove the check_plain() so the line reads
'#markup' => '<a href="'. $href .'">'. $this->quickset->translateString($tab->getTitle(), 'tab', $i) .'</a>',
This introduces potential security risks, so be sure you know what you do. For the other renderers there probably is an analogical way. But: Write your own! :) There is information on that in the Readme.
Comment #20
druvision CreditAttribution: druvision commented#18 works! +1 for including it in the base module functionality.
Comment #21
rickmanelius CreditAttribution: rickmanelius commentedHere is #16 in patch format.
Comment #22
rickmanelius CreditAttribution: rickmanelius commentedBTW, patch #21 is for the 7.x-3.4. Previous patches/suggestions applied to earlier versions.
Comment #23
ellen.davis CreditAttribution: ellen.davis commentedPatch from #21 worked for me for QuickTabs 7.x-3.4. Thanks.
Comment #24
rickmanelius CreditAttribution: rickmanelius commentedComment #25
iwhy CreditAttribution: iwhy commenteddoes this work for views with 'quicktabs' formatter?
Comment #26
jeeba CreditAttribution: jeeba commentedPatch of #19 worked on my image quicktab. Hopefully the project doesnt allow to put new content if it's not the user-1 who put the new content, so i dont have to wonder too much about security
Comment #27
ezra-g CreditAttribution: ezra-g commented#21 contains commented out conditional logic and sets a value in _quicktabs_convert_form_to_quicktabs() irrespective of what the user enters, and which will never be saved. However, I don't see a need to enable this ability through the UI.
This patch changes the Quicktabs property to 'html' to match the parameter used in $link_options, and reads the property using the this->quickset->getSettings() method.
It also contains some whitespace fixes that my editor does by default.
Comment #28
ezra-g CreditAttribution: ezra-g commentedWith an RTBC from katbailey in IRC, #27 is committed.
Thanks!
http://drupalcode.org/project/quicktabs.git/blobdiff/be287733b355ff08df5...
Comment #29
DanielJohnston CreditAttribution: DanielJohnston commentedQuick confirmation on this - it only applies to quicktabs created by views, right? I'm using Quicktabs to create a block, and there's no functionality added by this patch whatsoever that I can see. I'm guessing the best way forward is to create a view and display it as a block?
Comment #30
DanielJohnston CreditAttribution: DanielJohnston commentedActually, scratch my suggested solution. I'm using Quicktabs to switch between a newsletter signup block, a view with latest tweets, and a custom HTML block showing a Facebook like box. I strongly suspect it's impossible to create a view that returns these three items to Quicktabs, which presumably means this patch won't work for me.
Comment #32
jramby CreditAttribution: jramby commentedIs this patch commited in 7.x-3.x-dev ?
Does it include images as tab title for 7.x-3.x-dev ?
Or is there configuration to achieve HTML in tab titles?... what did I missed ?
Thanks
Comment #33
radimklaska@jantoine: Yes, it's commited: http://drupalcode.org/project/quicktabs.git/commit/21d66fb9d88234440fa9a...
I just tested the 7.x-3.x version and it still doesn't work as intended. (I have exactly same problem as in original post http://drupal.org/files/issues/quicktabs%20SS.jpg)
@ezra-g mentions
and I think there is an error in patch #27. Imho this
isset($settings['html']) ? $settings['html'] : FALSE
is just leftover and shouldn't be there. - Please correrect me if my assumption is wrong.Since this was already commited, my patch against 7.x-3.x just edits it to
TRUE
.PS: If you don't need HTML in quick tabs (like on sceenshot with just some spans around dates) and you're using views to generate tabs, you can actualy edit the field with date and under "rewrite results" check "Strip HTML tags". ;-)
EDIT: Don't use attached patch, it's not secure, see #34.
Comment #34
iamEAP CreditAttribution: iamEAP commentedWhat's proposed in #33 would introduce a security vulnerability, albiet not particularly severe.
@radimklaska, believe that assumption you're making is not correct. The patch in #27 appears to have aimed to make the HTML attribute toggleable. However, near as I can tell, there's no way to do this.
@ezra-g Any clarifications on "I don't see a need to enable this ability through the UI"? Or how did you intend this setting to be changed (through the GUi or code)?
Comment #35
radimklaska@iamEAP: Thanks for clarification. I edited my post and added warning...
Comment #36
AaronELBorg CreditAttribution: AaronELBorg commentedIs there a 6.x-3.1 version of the patch for apostrophes getting output as ' somewhere?
If so, I couldn't find it.
Comment #37
ezra-g CreditAttribution: ezra-g commentedI'm proposing that it's more appropriate as an API level attribute rather than something that's configurable through the UI.
Comment #38
manueler CreditAttribution: manueler commentedHi guys!
Worked for me #27 and then I applied the #33 patch.
This is a issue? To add the HTML option in module settings? It would be helpful to be added.
Comment #39
subhojit777Applied patch #27 then #33 and it is working. It would be better if we add html settings. I guess we should go for a global setting, rather than individual settings for every quicktabs.
Comment #40
seehive CreditAttribution: seehive commented#18 it works for me perfectly
Comment #41
iamEAP CreditAttribution: iamEAP commentedReturning to this... I see that this can now technically be overridden (as of 7.x-3.6):
However, the only way to set anything in the settings property of the QuickSet class is when it's initially instantiated. I'm not sure we, outside of QuickTabs, have any way of affecting that, at least I am unable to do so in a Features export, for example. I especially have no control over this in a Quick Tabs style Views display.
Comment #42
dooug CreditAttribution: dooug commentedMost of these solutions seem to require hacking or patching the module. I don't see why that is necessary. The module provides theme functions to override the tab titles. I was able to override this theme function: theme_qt_quicktabs_tabset() and enable HTML for the tab links.
I posted my example of this on this duplicate issue: #1533410: Html Entities in Programmatically Created Quicktabs #11. If using the JqueryUI tab style, you'd use this function: theme_qt_ui_tabs_tabset().
Marking this as fixed because it seems like some patches have been committed, and the solution I just suggested should suffice otherwise.