Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Using code within articles?  (Read 4003 times)

michael kennedy

  • Full Member
  • ***
  • Karma: 3
  • Posts: 207
    • SpektreDesign
Using code within articles?
« on: May 28, 2008, 07:10:49 PM »

Sorry if I'm too much of a dimwit and have missed this, but on my site I've got code samples in my articles, and every time I use a HTML special character, it merely outputs the actual code, and not the rendered effect I want.  For example, "nbsp" comes out as "nbsp" instead of a white space character.

http://spektredesign.net/web-design/swfobject/

What do I do?

And...  what the heck? (This page passes W3C)

http://spektredesign.net/examples/
« Last Edit: May 28, 2008, 07:17:02 PM by michael kennedy »
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: Using code within articles?
« Reply #1 on: May 28, 2008, 07:43:04 PM »

I had a similar problem with articles created with sn16 and then published by sn17rc2
The problem comes from the following line :
file_include(str_replace('[break]', '',str_replace('&&', '&', $text)), $shorten);

I've changed this line with :
file_include(str_replace('[break]', '',$text), $shorten);

I haven't investigated this change any further though...
« Last Edit: May 28, 2008, 07:57:47 PM by skian »
Logged

michael kennedy

  • Full Member
  • ***
  • Karma: 3
  • Posts: 207
    • SpektreDesign
Re: Using code within articles?
« Reply #2 on: May 28, 2008, 08:18:44 PM »

Thanks dude,  8) that seems to fix it,  I'll see how that works out.