Posted on: 01/24/03 04:02am
By: robinbowes
Hi,I've just posted a comment over on the "Help" section in which I tried to do HTML-formatted using the <code> tag to quote my code. However, it wouldn't display correctly because of some quote characters in the code fragment.Here's the article - see my comment in response to sardu's second comment.Here's the php code I was trying to quote:$display .= '</td><td><img src=' . $_CONF['site_url'] . '/images/speck.gif" height="1" width="10"></td>' . LB. '<td valign="top" width="180">' . LB . COM_showBlocks('right',$topic). '<br><img src="' . $_CONF['site_url'] . '/images/speck.gif" width="180" height="1">' . LB;Is this a bug in geeklog's handling of html, or more specifically, a failure to deal with embedded quote characters?R>
html quoting problem???
Posted on: 01/24/03 10:43am
By: Dirk
Sorry, I don't understand what the problem is, but if you want to reproduce pieces of code (HTML or PHP) verbatim, you should use Geeklog's
...
tags, not the HTML <code> tag.
bye, Dirk
html quoting problem???
Posted on: 01/25/03 12:07am
By: Anonymous (Anonymous)
Is this supposed to work also when quoting Perl snippets? I couldn't see why not, but when I tried, it doesn't. It's displaying the code in monospaced font and seem to strip off the linefeeds.
Thanks,
selk
html quoting problem???
Posted on: 01/26/03 12:09pm
By: Dirk
It should work for anything, actually. Can you give an example?
bye, Dirk
html quoting problem???
Posted on: 01/26/03 11:04pm
By: Anonymous (Anonymous)
OK, I think I just got it. Just this simple code:
sub myfunc {
my ($self, $args) = @_;
# do my stuff here
return 1;
}
works OK if entered in comments, but not if it's the original story, i.e., introtext or bodytext.
Thanks,
selk
html quoting problem???
Posted on: 01/27/03 10:58am
By: Dirk
Hmm, works for me ...
bye, Dirk
html quoting problem???
Posted on: 01/27/03 12:26pm
By: rv8
Perhaps the behaviour is different depending on whether you are in "Plain Old Text" mode vs "HTML Formatted" mode.---Kevin
html quoting problem???
Posted on: 01/27/03 01:00pm
By: Anonymous (Anonymous)
OK I give up. I verified and it does work here. The only difference is that I am on 1.3.7 while this site is 1.3.7sr1, although I diff submit.php and there is no difference between the two versions.
I'll try upgrading to 1.3.7sr1 tonight and see what happens. Thanks for your time, Dirk.
BTW, I have to turn on HTML mode for this, right? Because otherwise [code ] will not be rendered as it should be.
selk
html quoting problem???
Posted on: 01/28/03 12:42am
By: Anonymous (Anonymous)
Hi Dirk,
OK, I got it!
In lib-common.php, I have to comment out the line:
function COM_checkHTML( $str )
{
global $_CONF;
$str = stripslashes($str);
// Get rid of any newline characters
//********** I have to comment out the line below **********
// $str = preg_replace( "/n/", '', $str );
I don't know what are the other consequences for doing this.
This is now on 1.3.7sr1. It seems like what you have here has this line already commented out, perhaps(?) Why is it different than the released version then?
Thanks,
selk