Jump to content

A couple of issues with the bbCode conversion feature


Recommended Posts

I have encountered these issues when using the bbCode converter on both Firefox 121.0 (64-bit, Windows 11) and Safari (iPadOS 17.2).

  1. Tags related to text formatting such as [B][/B], [I][/I], or [U][/U] add a superfluous space character around the text in question (i.e. immediately preceding the opening tag and following the closing tag). The [COLOR] tag is affected by this as well, though for some reason it will add the extra space only after the closing tag.
    To the software's credit, actual double spaces seem to appear only in the editing window (screenshot) and not in the submitted post or when previewing. However, you are still left with unsightly extra spaces if the affected text is adjoined by any punctuation.

    A block of converted bbCode follows:
    This%20is%20an%20%5BB%5Dexample%5B%2FB%5D%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20an%20%5BB%5Dexample%5B%2FB%5D%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%5B%2FNOPARSE%5D)%0AThis%20is%20a%20so-called%20%22%5BB%5Dexample%5B%2FB%5D%22%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20a%20so-called%20%22%5BB%5Dexample%5B%2FB%5D%22%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%5B%2FNOPARSE%5D)%0A%0AThis%20is%20an%20%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20an%20%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%5B%2FNOPARSE%5D)%0AThis%20is%20a%20so-called%20%22%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%22%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20a%20so-called%20%22%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%22%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%5B%2FNOPARSE%5D)
    This is an example of the issue . (Code used: This is an [B]example[/B] of the [B]issue[/B].)
    This is a so-called " example " of the issue . (Code used: This is a so-called "[B]example[/B]" of the [B]issue[/B].)

    This is an example of the issue . (Code used: This is an [COLOR=Red]example[/COLOR] of the [COLOR=Red]issue[/COLOR].)
    This is a so-called "example " of the issue . (Code used: This is a so-called "[COLOR=Red]example[/COLOR]" of the [COLOR=Red]issue[/COLOR].)
  2. Unlike on OGMW the [COLOR] tag does not accept hex codes as colour values, only the originally available hard-coded values, and will simply ignore the former.

Link to comment
Share on other sites

1. Added to the tracker.

2. I will probably fix this for backward compatibility, as well as enable use of the MW palette named colors. Do note that using specific/highly precise color values can lead to readability issues depending on theme.

 

Link to comment
Share on other sites

  • 1 month later...

I believe these issues are resolved as demonstrated below.

This%20is%20an%20%5BB%5Dexample%5B%2FB%5D%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20an%20%5BB%5Dexample%5B%2FB%5D%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%5B%2FNOPARSE%5D)%0AThis%20is%20a%20so-called%20%22%5BB%5Dexample%5B%2FB%5D%22%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20a%20so-called%20%22%5BB%5Dexample%5B%2FB%5D%22%20of%20the%20%5BB%5Dissue%5B%2FB%5D.%5B%2FNOPARSE%5D)%0A%0AThis%20is%20an%20%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20an%20%5BCOLOR%3DRed%5Dexample%5B%2FCOLOR%5D%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%5B%2FNOPARSE%5D)%0AThis%20is%20a%20so-called%20%22%5BCOLOR%3D%2300ffff%5Dexample%5B%2FCOLOR%5D%22%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%20(Code%20used%3A%20%5BNOPARSE%5DThis%20is%20a%20so-called%20%22%5BCOLOR%3D%2300ffff%5Dexample%5B%2FCOLOR%5D%22%20of%20the%20%5BCOLOR%3DRed%5Dissue%5B%2FCOLOR%5D.%5B%2FNOPARSE%5D)
This is an example of the issue. (Code used: This is an [B]example[/B] of the [B]issue[/B].)
This is a so-called "example" of the issue. (Code used: This is a so-called "[B]example[/B]" of the [B]issue[/B].)

This is an example of the issue. (Code used: This is an [COLOR=Red]example[/COLOR] of the [COLOR=Red]issue[/COLOR].)
This is a so-called "example" of the issue. (Code used: This is a so-called "[COLOR=#00ffff]example[/COLOR]" of the [COLOR=Red]issue[/COLOR].)
Link to comment
Share on other sites

×
×
  • Create New...