I can't seem to find any way to style the TOC because it's not wrapped in anything. Please give it a id.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 353298_toc_angle_brackets_5.x.patch | 2.23 KB | deviantintegral |
| #8 | 353298_toc_angle_brackets_6.x.patch | 2.3 KB | deviantintegral |
Comments
Comment #1
Flying Drupalist commentedOh, I apologize I see what's going on. There is a div but the HTML filter rips it out. Is there a way to use TOC with HTML filter? It rips out the comment if it put it before, and rips out the div if I put it after... :(
Comment #2
deviantintegral commentedIt's actually a core bug (mentioned in the README as well). I reported it nearly a year ago, and it turns out it affects quite a few modules: http://drupal.org/node/222926
If you have the time, your best bet is to work on creating tests for the filter module so that a patch can be hammered out and rolled into core.
Comment #3
deviantintegral commentedComment #4
Flying Drupalist commentedI understand, I didn't realize that HTML Filter and HTML Corrector were the same thing. Thanks.
Comment #5
deviantintegral commentedActually, they aren't the same thing. There is a bug with HTML Corrector (contrib module for D5, in core for D6).
The expected order is that the HTML filter comes first. On the site that I'm using this for, with an earlier version, it works as expected, but something looks to have broken in the -dev versions when the HTML filter is enabled. I'll investigate this further.
Comment #6
deviantintegral commentedOk, I found what happened. In Drupal 5.6, there was a security fix due to an issue in IE6: http://drupal.org/node/208564
I missed the note that this would affect input filters :). Also, on my test site, it turned out I had a module enabled which was escaping brackets for me.
Now that I know what's going on, a fix should be soon. I imagine this effects just about every user of this module.
Comment #7
Flying Drupalist commentedTerrific, thank you. Would be happy to use this. :)
Comment #8
deviantintegral commentedHere are patches for both versions. Could you please test this and let me know if it works for you?
I used http://drupal.org/node/209715 as my guide for this patch.
Comment #9
deviantintegral commentedMarking as critical as it means that most users likely have disabled the HTML filter if they're using this module.
Comment #10
Flying Drupalist commentedWorks like a charm. Thank you.
Comment #11
AlexisWilke commenteddeviantintegral,
Would you mind to actually add the code that changes the square brackets in the 2nd part? (in the handling of the teaser)
Where you say:
That way, using the [tableofcontents-toc] tag would work perfectly! At this time, that part is broken for the tag.
I would propose:
(And yes, I'm suggesting that you set $new_teaser outside of the if() which is cleaner code)
Also in the replace, you probably want to use * instead of ?.
Thank you.
Alexis Wilke
Comment #12
lvl1 commentedIs the patch by deviantintegral mentioned in #8 been applied to 6.x-2.3?
Comment #13
AlexisWilke commentedlvl1,
No. I will put it in 3.x-dev for now.
And I will change the name of the tag to just 'toc'.
[toc <em>params</em>]to be more in line with most of the other tags in Drupal.
There will be backward support, of course.
Thank you.
Alexis
Comment #14
AlexisWilke commentedI implemented a partial fix in 3.x-dev (to be posted soon).
It includes support for [toc ...] instead of <-- tableofcontents ... -->, although the comment is still supported, the 'prepare' action will transform it to the toc tag.
What is not yet fixed is the implementation of the teaser. That will be required!
Feel free to report problems in link with the PEAR wiki thingy you mention here. (outside of the teaser problem)
Thank you.
Alexis Wilke
Comment #15
AlexisWilke commentedThis is done in 3.x-dev, Jul 5, 2009.
Note that I did not fix version 5.x... and I don't think the previous author did apply the fix yet, which is why this is still open.
Thank you.
Alexis Wilke