Example quote.
[quote="[mycrazynic]"]I said something crazy[/quote]
the output looks like:

<div class="bb-quote"><b>[mycrazynic wrote:</b>
<blockquote class="bb-quote-body">"]I said something crazy</blockquote>
</div>

visible as:

[mycrazynic wrote:

    "]I said something crazy

Sounds like a complicated regex problem to me and I'm no where near good enough to provide a patch. Sorry :-/

Comments

naudefj’s picture

Can you change your quote tags to

[quote="mycrazynic"]I said something crazy[/quote]

or, even better...

[quote=mycrazynic]I said something crazy[/quote]

neclimdul’s picture

I could... but his drupal name is [mycrazynic] which is apparently allowed. (though I'm using mycrazynic instead of the actual name). He's an active user on the site I'm converting and it doesn't make sense to either have him change his name or have everyone modify their quotes. Not to mention all the fixes to previous quotes I'd have to make...

naudefj’s picture

Category: bug » support
Priority: Normal » Minor
Status: Active » Closed (works as designed)

I've tried to create a user like that, however Drupal does not allow it. Anyway, it would be easier to cleanup your users than to add support for this in BBCode.

STINGER_LP’s picture

guys, I have a problem: I installed bbcode_wysiwyg.module, enable it in drupal settings. bbcode formating bar appeared, everything looks good, but when i push preview button the tags do not modify the test, instead text it show [b]text[/b]

in "Input formats" menu BBcode doesn't exist

naudefj’s picture

So, why did you post your problem under this thread? Your problem is not even closely related to the topic? I would suggest opening new topics for new issues.

Besides, bbcode and bbcode_wysiwyg is not maintained by the same group. We cannot help you with bbcode_wysiwyg problems here.

Takafumi’s picture

Version: 5.x-1.0 » master
Status: Closed (works as designed) » Needs review
StatusFileSize
new931 bytes

I provide a patch for this issue. Please review this patch.
If patch is applied, it will be escaped to character entity when ']' is in single or double quotation marks.

e.g.
[quote="[foo]"]Hello, Drupal.[/quote] => [foo] wrote:
[quote='[foo]']Hello, Drupal.[/quote] => [foo] wrote:
[quote="bar]["]Hello, Drupal.[/quote] => bar][ wrote:
[quote="]]][b][a][r][[["]Hello, Drupal.[/quote] => ]]][b][a][r][[[ wrote:

Takafumi’s picture

Category: support » feature

category change ;)

naudefj’s picture

Status: Needs review » Needs work

This patch breaks the table [row] tags. For example, try this:

[quote="]]][b][a][r][[["]Hello, Drupal.[/quote]

[table]
[row]
  [col]row1col1[/col]
  [col]row1col2[/col]
[/row]
[/table]
Takafumi’s picture

I tried it. However, it seems to be outputted correctly.

outputted HTML as follows;

<div class="bb-quote"><b>&#93;&#93;&#93;[b&#93;[a&#93;[r&#93;[[[ wrote:</b><blockquote class="bb-quote-body">Hello, Drupal.</blockquote></div><br />
<br />
<table border>

<tr>
  <td valign="top">row1col1</td>
  <td valign="top">row1col2</td>
</tr>
</table>
Takafumi’s picture

StatusFileSize
new635 bytes

Even when it replaces to this patch, does break occur?

naudefj’s picture

Yes, it still breaks.

Not sure why - we may be using different PHP versions. I'm on 4.3.9.

Takafumi’s picture

StatusFileSize
new636 bytes

There was a bug in patch #10. Updated it.

naudefj’s picture

Still no luck. My output:

<p><div class="bb-quote"><b> wrote:</b><blockquote class="bb-quote-body">]][b][a]<tr>[[["]Hello, Drupal.</blockquote></div></p>

<table border>
[row]<br />
  <td valign="top">row1col1</td>
  <td valign="top">row1col2</td>
</tr>
</table></div>
Takafumi’s picture

Status: Needs work » Needs review
StatusFileSize
new651 bytes

It seems that quotation mark will be converted to &quot; before processing.
Try this patch.

naudefj’s picture

This patch is still giving me problems.

Anyone else who can test it as well?

naudefj’s picture

More testing is required.

If nobody else is interested we can as well close this ticket.

naudefj’s picture

Are you still interested in getting this patch fixed and submitted? If not, can we close this issue?

Takafumi’s picture

Status: Needs review » Closed (won't fix)

I'm not interested in this issue no longer.
Please close that.