Bitcoin Forum
May 09, 2024, 07:09:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to escape bbcode in posts [solved]  (Read 632 times)
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


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\]?
1715238576
Hero Member
*
Offline Offline

Posts: 1715238576

View Profile Personal Message (Offline)

Ignore
1715238576
Reply with quote  #2

1715238576
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1078


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: 1078


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!