Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Avoid parsing inside a <pre> tag  (Read 1801 times)

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Avoid parsing inside a <pre> tag
« on: October 27, 2009, 06:45:19 PM »

Yeap,
me again.
In my new brand Carnet, I have my < parsed when I want to post code using pre tag.
Does anyone found how to avoid that?
« Last Edit: October 27, 2009, 08:06:14 PM by philmoz »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Avoid parsing inside a <pre> tag
« Reply #1 on: October 27, 2009, 08:13:04 PM »

how do you mean?
ah
Code: [Select]
<pre><!-- hello --></pre>produces nothing on the page...
but this works
Code: [Select]
<pre>&lt;!-- hello --&gt;</pre>
Logged
Of all the things I have lost, it is my mind that I miss the most.

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: Avoid parsing inside a <pre> tag
« Reply #2 on: October 28, 2009, 07:49:00 AM »

(...)
produces nothing on the page...
but this works
Code: [Select]
<pre>&lt;!-- hello --&gt;</pre>
Hi Phil.
Yeap it should as it works on on my 1.6 website.
But there your <pre> tag prints
Quote
&lt;!-- hello --&gt;
Don't get it: With <pre> source code is recognized as HTML. ???

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Avoid parsing inside a <pre> tag
« Reply #3 on: October 28, 2009, 01:59:03 PM »

Don't get it: With <pre> source code is recognized as HTML. ???

All content is saved into the database tables as HTML... and it is served (delivered) by the server... to your browser... as pure HTML.

I could be wrong... but my understanding is that the content itself is not being parsed, per-se; it is being served exactly as it is from the articles table.
When the PHP function is being parsed... the query to the articles table pulls the content from there and includes it in the page delivered to your browser as pure HTML. Comment-out tags work when you are in a code file because the code-file is being parsed...but they have no effect when they are in data stored in the database because the data itself is not being parsed as code.
« Last Edit: October 28, 2009, 02:00:49 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web
Re: Avoid parsing inside a <pre> tag
« Reply #4 on: October 29, 2009, 12:44:34 PM »

It might be due to my local settings... or something in the .htaccess. ???
I'll check it when on line and tell.