Recent

Author Topic: [solved] writing the text "[code]" in a post  (Read 1187 times)

speter

  • Sr. Member
  • ****
  • Posts: 349
[solved] writing the text "[code]" in a post
« on: February 13, 2021, 08:56:37 am »
Is it possible to "escape" special characters in a forum post?

For example, if I were to include "[ code]" (without the space after the [), then that text would not appear...

Interestingly, entering [ pre]foo[/pre] seems to give something like the html PRE tag; but having "[ code]" instead of "foo" doesn't work. [xmp] does not work either. ;)
foo

[xmp]foo[/xmp]
<xmp>foo</xmp>

I also tried "&#188;", which in html gives "1/4"; but no joy there...
[&#188;] &#188;

cheers
S.
« Last Edit: February 14, 2021, 12:05:01 am by speter »
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: writing the text "[code]" in a post
« Reply #1 on: February 13, 2021, 09:07:52 am »
I thought you could disable bbc-tags with a ceckmark per post but I can't find it anymore.
(Or maybe it's the "Don't use smileys" under "other options" below your editor)

You can use the nobbc tag to disable the tags around specific text.

(If you press quote you can see how I did that here)

[Code]here you can use tags without translating them[/code]

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: writing the text "[code]" in a post
« Reply #2 on: February 13, 2021, 09:10:16 am »
There's a special code for that: [nobbc] which stops parsing bbcode until closed: [code]

As for entity expansion, I don't know, sorry :-[
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

speter

  • Sr. Member
  • ****
  • Posts: 349
Re: writing the text "[code]" in a post
« Reply #3 on: February 13, 2021, 09:41:41 am »
Thanks folks. :)

I am not fussed about the &#188; - I was just thinking of writing the [ by using its ascii code.

cheers
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

 

TinyPortal © 2005-2018