Go Back  Bike Forums > News & Suggestions > Forum Suggestions & User Assistance
Reload this Page >

How to escape left/right square brackets?

Search
Notices
Forum Suggestions & User Assistance Have a suggestion for the forums? Need help with the Forums? Post here.

How to escape left/right square brackets?

Thread Tools
 
Search this Thread
 
Old 03-26-24, 03:30 PM
  #1  
smontanaro 
Senior Member
Thread Starter
 
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,095

Bikes: many

Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1445 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?
__________________
Monti Special
smontanaro is online now  
Old 03-26-24, 03:54 PM
  #2  
IBkatherine
Administrator
 
Join Date: Mar 2023
Posts: 70
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 56 Post(s)
Liked 44 Times in 29 Posts
Originally Posted by smontanaro
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?
Can you link to what you are talking about? I'm not sure if i'm aware of what you're referring to
IBkatherine is offline  
Old 03-26-24, 03:59 PM
  #3  
Trakhak
Senior Member
 
Trakhak's Avatar
 
Join Date: Jan 2005
Location: Baltimore, MD
Posts: 5,375
Mentioned: 15 Post(s)
Tagged: 0 Thread(s)
Quoted: 2483 Post(s)
Liked 2,955 Times in 1,678 Posts
Originally Posted by smontanaro
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?
If you're referring to quotes of previous posts: when people are sloppy about quoting, they lop off part of a tag, with the result that the mangled tag appears along with the quoted material and the other tag.
Trakhak is offline  
Old 03-26-24, 04:59 PM
  #4  
smontanaro 
Senior Member
Thread Starter
 
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,095

Bikes: many

Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1445 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?
smontanaro is online now  
Old 03-27-24, 06:25 AM
  #5  
smontanaro 
Senior Member
Thread Starter
 
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,095

Bikes: many

Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1445 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:
Code:
literal BBcode like 
goes
here
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.
__________________
Monti Special
smontanaro is online now  
Old 03-27-24, 09:42 AM
  #6  
Iride01 
I'm good to go!
 
Iride01's Avatar
 
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,810 Times in 3,318 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.

Last edited by Iride01; 03-27-24 at 09:51 AM.
Iride01 is offline  
Old 03-27-24, 09:44 AM
  #7  
IBJoel
Administrator
 
Join Date: Sep 2015
Posts: 437
Mentioned: 29 Post(s)
Tagged: 0 Thread(s)
Quoted: 223 Post(s)
Liked 224 Times in 146 Posts
So you just want the ability to display BBcode?
What is the actual problem with just including the space in the brackets?
IBJoel is offline  
Old 03-27-24, 01:05 PM
  #8  
smontanaro 
Senior Member
Thread Starter
 
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,095

Bikes: many

Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1445 Post(s)
Liked 1,395 Times in 762 Posts
Originally Posted by IBJoel
What is the actual problem with just including the space in the brackets?
As pointed out on the (I think) linked post outside BF, if what you are trying to do is show someone an example how to do something, they will naively cut-n-paste your example, then complain that it doesn't work, because, of course, they are no longer valid BBCode tags. In this day and age, even pasting my bolded example will trip some people up because it will paste the bold attributes on some (many?) platforms. People will have to remember to "paste as plain text."

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).
__________________
Monti Special
smontanaro is online now  
Old 03-27-24, 06:14 PM
  #9  
unterhausen
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.
unterhausen is offline  
Old 03-27-24, 06:16 PM
  #10  
smontanaro 
Senior Member
Thread Starter
 
Join Date: Aug 2007
Location: Evanston, IL
Posts: 5,095

Bikes: many

Mentioned: 63 Post(s)
Tagged: 0 Thread(s)
Quoted: 1445 Post(s)
Liked 1,395 Times in 762 Posts
Originally Posted by unterhausen
Have you ever looked at the source for an entire subforum? It's amazing vb works at all.
I have not. Managed to not mess with PHP my entire career.
__________________
Monti Special
smontanaro is online now  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.