How to escape left/right square brackets?
#1
Senior Member
Thread Starter
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,096
Bikes: many
Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1446 Post(s)
Liked 1,395 Times
in
762 Posts
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
Join Date: Jan 2005
Location: Baltimore, MD
Posts: 5,380
Mentioned: 15 Post(s)
Tagged: 0 Thread(s)
Quoted: 2487 Post(s)
Liked 2,956 Times
in
1,679 Posts
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
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,096
Bikes: many
Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1446 Post(s)
Liked 1,395 Times
in
762 Posts
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
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,096
Bikes: many
Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1446 Post(s)
Liked 1,395 Times
in
762 Posts
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: 14,992
Bikes: Tarmac Disc Comp Di2 - 2020
Mentioned: 51 Post(s)
Tagged: 0 Thread(s)
Quoted: 6196 Post(s)
Liked 4,811 Times
in
3,319 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.
#8
Senior Member
Thread Starter
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,096
Bikes: many
Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1446 Post(s)
Liked 1,395 Times
in
762 Posts
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,399
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 4 Post(s)
Liked 3,699 Times
in
2,519 Posts
Have you ever looked at the source for an entire subforum? It's amazing vb works at all.