'#\[\*(?::\w+)?\](.+)(?=\[\*(?::\w+)?\]|\[/list)#Usi' => '<li>\\1',
'#\[list(?::\w+)?\]#si' => '<ol class="bb-list" style="list-style-type:circle;">',
'#\[list=c(?::\w+)?\]#si' => '<ol class="bb-list" style="list-style-type:circle;">',
'#\[list=d(?::\w+)?\]#si' => '<ol class="bb-list" style="list-style-type:disc;">',
'#\[list=s(?::\w+)?\]#si' => '<ol class="bb-list" style="list-style-type:square;">',
In these four lines you see ordered lists being used as unordered lists. The HTML tags should be changed to
- .
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | bbcode_5_patch_5-3.txt | 4.67 KB | Takafumi |
| #12 | bbcode_5_patch_5-2.txt | 4.67 KB | Takafumi |
| #8 | bbcode_5_patch_5.txt | 3.24 KB | Takafumi |
Comments
Comment #1
xanoThe tags should be changed to <u>.
And again I forget HTML works on this forum and type the tags without encoding :P
Comment #2
naudefj commentedWhat? The
<u>tag is used for underlining text!Comment #3
xanoSorry, typo! I meant the <ul> tag of course :P
Comment #4
naudefj commentedI'm not going to change this. However, I will reconsider if a good working patch is provided.
Comment #5
xanoWhy not change it and why reconsider when somebody has spent loads of time on trying to figure out how to make patches? It's just changing four characters...
Comment #6
naudefj commentedReasons are:
1) You want it, not me.
2) There are more to it than just changing ol to ul. Try it and see what happens.
Comment #7
xano1) I want it, yes. I think Drupal (and its modules) should output semantically correct code. I think that partly is the reason why Drupal is so popular. It's very easy to make it output valid and semantic markup code.
2) Now I see. To be honest I haven't really paid much attention to the regexps until you mentioned it's more work than simply replace a few characters. I'll take a closer look at it to see if I can make some new regexps.
Comment #8
Takafumi commentedI think that should fix this issue, because those are not valid XHTML. Moreover, I found a different bug in the process of creating a patch. That bug doesn't discriminate between [list=a/i] and [list=A/I].
A attached patch will fix these issues. Please review and apply it.
Comment #9
naudefj commentedThanks Takafumi.
Xano can you please test it for us?
Comment #10
naudefj commentedNested tags don't render correctly after applying this patch. Example:
Please test all tags in file bbcode-test.txt.
Comment #11
Takafumi commentedoops, I will try it again :p
Comment #12
Takafumi commentedCoding was completed. Please test this patch thoroughly.
Various patterns which I tested are as follows.
Comment #13
Takafumi commentedforgot status change :p
Comment #14
Takafumi commentedA patch was updated because small bug was found.
Comment #15
naudefj commentedPatch works & doesn't break anything else. Thank you very much!
PS: I hope you won't mind if I remove your "Code by Takafumi (Drupal Japan)" comments. I will give you credit when committing the patch and when the new version is released.
Comment #16
Takafumi commentedThat's all right. You may remove my comments, if you want.
Comment #17
naudefj commentedPatch applied - http://drupal.org/cvs?commit=68595
Comment #18
(not verified) commented