3 replies [Last post]
y2chuck
Offline
newbie
Last seen: 15 years 22 weeks ago
Timezone: GMT-4
Joined: 2006-08-02
Posts: 3
Points: 0

My code does not show up when I preview my posts. I've used code with the square brackets and tried using the html code element and neither work. It just renders as HTML and I do not see an option to disable html.

What gives?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 17 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

I'm not at all in the know

I'm not at all in the know regarding the mechanism; that'll be Tony's realm. I have found a work around that has solved the issue a time or two. I don't know whether it's actually working, or just serendipity.

I have started escaping the "<", thus &lt;, of the top level elements. Escaping the opening and closing of the div works.

Not escaped

<div>
  <p>no escape</p>
</div>
and

escaped

<div>
  <p>escaped</p>
</div>

Is there more to it? Probably, but that's all I've figured out. Smile

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 38 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

kk5st wrote:I have started

kk5st wrote:
I have started escaping the "<", thus &lt;, of the top level elements. Escaping the opening and closing of the div works.

That's good to know - I've been replacing all < and > with &lt; and &gt;. But it's not really a workable solution is it? Particularly for most of the users of this forum who wouldn't know how to, or think to do that. I think it's something that needs to be addressed because people are going to have problems posting their code. There's been a few times where I've edited people's posts and sometimes just gone to the edit window to see what they actually typed.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 10 weeks 17 hours ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

You only need to escape one

You only need to escape one brace, either the left ot the right. I always use the lt; code to escape the left one, it works!

You don't need to use it on paragraphs or lists, they'll show the code fine.

I PMed Tony a while back asking if there was a way to automatically change the braces (is that the right word?) to the equivalent, I guess it's on his list of things-to-do Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies