I try to explain my problem with GeSHi Syntax highlighter and Drupal. Sorry, my english grammar is poor :)
I use "GeSHi Filter"-HEAD, available here : http://drupal.org/node/65961 and Drupal 4.7.
In "Administer" -> "Input formats" I have an Input format which use GeSHi filter and BBCODE. A screenshot: http://img70.imageshack.us/img70/1397/geshiinputcf2.jpg
Now I create content, for example a page:
<blockcode type="php">
<?php
// Connecting, selecting database
$link = ingres_connect('database', 'user', 'password')
or die('Could not connect: ' . ingres_error($link));
echo 'Connected successfully';
// Select from a table that exists in all Ingres databases
$query = 'SELECT * FROM iirelation';
$rs = ingres_query($query,$link) or die('Query failed: ' .
ingres_error($link));
// Print results in HTML
// relid - table name
// relowner - table owner
echo "<table>\n";
while ($iirelation = ingres_fetch_object($rs)) {
echo "\t<tr>\n";
echo "\t\t<td>" . $iirelation->relid . "</td>\n";
echo "\t\t<td>" . $iirelation->relowner . "</td>\n";
echo "\t</tr>\n";
}
echo "</table>\n";
</blockcode>
The code is highlighted, thanks for GeSHi. But exist a big big problem. The "preview" break the whole page.
The problem illustrated: http://img149.imageshack.us/img149/4056/geshi2oo4.jpg
This problem appear only if BBCODE is activated. Ok, I set smaller weight for GeSHi Filter In Input Formats, thanks for Vince Filby (GeSHi Filter author) suggestion, but the same problem exist...
I appreciate if someone try to simulate this issue with my code. Please help me ! Drupal forum is my last way to get an answer.
Thank you very much !
Zoltan
Comments
Please help....
I think the problem appear because BBCODE show the "trimmed version" using < br / > and < p > tags.
I know....
Ok now I know why the problem appear.
The trimmed version (Preview) not convert < > tags to entities. For example < table > is not converted to:
< table >Exist a way to tell "geshifilter" to convert all HTML tags to entities in trimmed version (preview) ?