Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 07:30 am EST
Geeklog Forums
html quoting problem???
Status: offline
robinbowes
Forum User
Junior
Registered: 08/06/02
Posts: 23
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>
9
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
Text Formatted Code
...
6
10
Quote
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
11
9
Quote
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
Text Formatted Code
sub myfunc {
my ($self, $args) = @_;
# do my stuff here
return 1;
}
10
9
Quote
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
10
9
Quote
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
Text Formatted Code
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 );
11
9
Quote
All times are EST. The time is now 07:30 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content