How to escape left/right square brackets?
#1
Senior Member
Thread Starter
How to escape left/right square brackets?
Every now and then, someone wants to display some literal forum tags, generally to help out another user. As far as I've ever been able to determine, there is no way to escape either the leading left square bracket or the trailing right square bracket. As a result, helpers are forced to wing it, generally by adding a space after the left or before the right. Is there no better way to do that?
#2
Administrator
Every now and then, someone wants to display some literal forum tags, generally to help out another user. As far as I've ever been able to determine, there is no way to escape either the leading left square bracket or the trailing right square bracket. As a result, helpers are forced to wing it, generally by adding a space after the left or before the right. Is there no better way to do that?
#3
Senior Member
Every now and then, someone wants to display some literal forum tags, generally to help out another user. As far as I've ever been able to determine, there is no way to escape either the leading left square bracket or the trailing right square bracket. As a result, helpers are forced to wing it, generally by adding a space after the left or before the right. Is there no better way to do that?
#4
Senior Member
Thread Starter
Here's an example I posted today. I wanted to include examples of what the quote tags looked like, but as far as I know you have to "break" the tag as I did.
https://www.bikeforums.net/23195958-post83004.html
Does BBcode have something like an HTML entity I can use in place of the literal square brackets?
https://www.bikeforums.net/23195958-post83004.html
Does BBcode have something like an HTML entity I can use in place of the literal square brackets?
#5
Senior Member
Thread Starter
This seems to be a pervasive problem with BBCode. I saw suggestions to use a code block:
but that doesn't work (the quote tags are still interpreted).
Another suggestion was to surround the brackets with something which doesn't add whitespace, like a bold tag.
[IMG] [/IMG]
That seems to work, modulo the somewhat extraneous bolding.
Code:
literal BBcode likeheregoes
Another suggestion was to surround the brackets with something which doesn't add whitespace, like a bold tag.
[IMG] [/IMG]
That seems to work, modulo the somewhat extraneous bolding.
#6
I'm good to go!
Join Date: Jul 2017
Location: Mississippi
Posts: 16,185
Bikes: Tarmac Disc Comp Di2 - 2020
Liked 5,418 Times
in
3,740 Posts
[asdf]
[ asdf ]
I'm not sure what you are saying you can't do either. I just typed the above without doing anything special.
Or I guess maybe you are wanting to be able to show them the actual BB code. That is problematic.
[ asdf ]
I'm not sure what you are saying you can't do either. I just typed the above without doing anything special.
Or I guess maybe you are wanting to be able to show them the actual BB code. That is problematic.
Last edited by Iride01; 03-27-24 at 09:51 AM.
#7
Administrator
So you just want the ability to display BBcode?
What is the actual problem with just including the space in the brackets?
What is the actual problem with just including the space in the brackets?
#8
Senior Member
Thread Starter
It's mostly just annoying that you can't simply create straightforward examples people can use. How long has BBCode been around? And the various forum tools which use it? And there's still no way to escape a square bracket (or any other character as far as I know).
#9
Randomhead
Join Date: Aug 2008
Location: Happy Valley, Pennsylvania
Posts: 24,893
Liked 4,052 Times
in
2,758 Posts
Have you ever looked at the source for an entire subforum? It's amazing vb works at all.