NOTE TO computerconsultantsforum.com and forums.techcareerfubar.com USERS: This is the same site. Your login will work here. Use the "forgot password" function if you need help recovering your password.

Obvious fact: You're not logged in.

Therefore, you're only seeing the tip of the iceberg of great discussion threads on this site.

Get rid of this big black message box by joining here: http://mature-it.pro/register/

Who We Are: A collection of IT, engineering and sciences professionals, in a variety of current circumstances with a variety of career backgrounds. Including System admins, Developers and programmers, Freelancers and "gig" entrepreneurs, Contract, job shopping and FTE-employed contract house IT workers, Web developers, Inventors, and artists and writers with tech backgrounds.

We're smarter than the hive mind you've experienced on large tech discussion forums and groups. So register on the board - your email is NEVER sold or provided to third parties. Then LOGIN FREQUENTLY to see new stuff daily.

Join by Registering here: http://mature-it.pro/register/

Author Topic: html [ and ] vs < and >  (Read 782 times)

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2731
html [ and ] vs < and >
« on: February 08, 2019, 09:28:50 pm »
I always thought HTML used < and > for delimiters, as in < b > and < /b > for boldface.

But trying to post something the other day, a website insisted I use [ b ] and [ /b ] instead.  (And it had a different format for creating a Link using those delimiters).

I notice posting on this forum allows using either standard.

So why are there 2 standards for HTML delimiters? Is one newer than the other? More universal? I always thought is was just < and >.  I must have missed a memo somewhere.

Thanks!


G0ddard B0lt

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 22672
  • Gorn Classic, user of Gornix
Re: html [ and ] vs < and >
« Reply #1 on: February 08, 2019, 10:21:45 pm »
< and > are for real HTML (web site code.) You'd never see [ and ] as tag delimiters in website code.

[ and ] are used in scripting languages such as "BBCode" (google it) which is a very simplified markup for forum users to accent their posts.

The idea is by disallowing angle bracket delimiters on tags (no "real" HTML) there is less of a risk of a forum user injecting harmful HTML such as Javascript into their post. BBCode has no equivalents for Javascript, CSS or other raw browser capabilities.
« Last Edit: February 09, 2019, 08:42:47 am by The Gorn »
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2731
Re: html [ and ] vs < and >
« Reply #2 on: February 10, 2019, 07:02:04 pm »
Thank you, Gorn.  Yes, web site forum entry is exactly where I've seen the [  ]  business.

Unfortunately it means you can't paste your html into a forum post. Nor can you easily translate from one form to another (more than just the brackets are different, for example, the link format is also quite a bit different).

Thanks again! I knew the Gorn would nail this!

G0ddard B0lt

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 22672
  • Gorn Classic, user of Gornix
Re: html [ and ] vs < and >
« Reply #3 on: February 10, 2019, 07:28:24 pm »
You're welcome and thanks.

I've always seen BBCode as partially a security measure (avoids backdoors by being a very small subset of functions) and partially to create a slightly simplified markup syntax for end users.

For instance, <script> introduces a Javascript. You don't want some forum user schmuck writing this in a post.

BBCode is a subset of HTML. It would be very easy to write a simple sed or awk script that translates BBcode into HTML. HTML to BBCode translation would amount to skipping anything in HTML that you can't do in BBCode. But otherwise trivial and easy also. You could probably google a canned  solution (prewritten script) for either problem, and sed exists for everything, Windows included.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.