Bitcoin Forum

Other => Meta => Topic started by: tspacepilot on April 21, 2015, 09:40:40 PM



Title: how to escape bbcode in posts [solved]
Post by: tspacepilot on April 21, 2015, 09:40:40 PM
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\]?


Title: escape bbcode tags in messages
Post by: tspacepilot on April 22, 2015, 06:04:54 PM
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?


Title: Re: colors in [code] in outbox vs. inbox
Post by: theymos_away on April 22, 2015, 06:12:46 PM
Put it in either another code block or [nobbc][/nobbc] tags. Eg. [code]unparsed code[/code].


Title: Re: colors in [code] in outbox vs. inbox
Post by: tspacepilot on April 22, 2015, 06:24:38 PM
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. :)