Bitcoin Forum
December 15, 2024, 05:07:11 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to escape bbcode in posts [solved]  (Read 653 times)
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1081


I may write code in exchange for bitcoins.


View Profile
April 21, 2015, 09:40:40 PM
Last edit: April 22, 2015, 06:25:06 PM by tspacepilot
 #1

I noticed that [code\] blocks in my PMs in my inbox have no syntax highilighting, while the same messages in my outbox have syntax highlighting.  Has anyone else noticed this?  I guess I can generate screenshots but if it's already known the I don't want to waste the time.[/code\]

And btw, what's the more elegant way to escape [code\]?
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1081


I may write code in exchange for bitcoins.


View Profile
April 22, 2015, 06:04:54 PM
 #2

Actually I figured out what was up with this.  The colors appeared in the one message because there was a <?php somewhere in it whereas the other example had just some javascript.  So apparantly the syntax highlighting in \[code\] tags has some heuristics for identifying a language or whatever.

However, my second question stands, how can we write bbcode tags in the body of a message, how can we escape them like when you want to write write < in html you need to write &lt; so that the html parser ignores it?
theymos_away
Member
**
Offline Offline

Activity: 82
Merit: 26


View Profile
April 22, 2015, 06:12:46 PM
 #3

Put it in either another code block or [nobbc][/nobbc] tags. Eg. [code]unparsed code[/code].
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1081


I may write code in exchange for bitcoins.


View Profile
April 22, 2015, 06:24:38 PM
 #4

Put it in either another code block or [nobbc][/nobbc] tags. Eg. [code]unparsed code[/code].
Thanks theymos_away!  That's my education for the day. Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!