Look at this

There are two wrong things:
1) Shown <span> tags
2) Quotes are not decoded

Yes, I hacked geshi.php
Yes, I added <span> to allowed tags list

What I missed?

CommentFileSizeAuthor
php_geshi.jpg78.58 KBvolocuga

Comments

Slovak’s picture

Status: Active » Closed (works as designed)

You shouldn't need to add <span> to allowed tags. Check your steps based on http://peterpetrik.com/blog/ckeditor-and-geshi-filter

volocuga’s picture

Wait. In the mentioned article written the following:

This approach does not involve the WYSIWYG module. It relies on the installation of CKEditor (module and editor) without a middleman management module

Installation
Download / install / enable / configure:

* CKEditor module
* CKEditor
* GeSHi Filter for syntax highlighting
* GeSHi

In other words I don't need this module AT ALL, right? It's funny, because I removed previously installed Ckeditor to install WYSIWYG module, which is required for WYSIWYG - GeSHi bridge module.

aaron stanush’s picture

Title: Incorrect output » Code output includes span tags
Status: Closed (works as designed) » Active

I am also having this issue. I am using the method suggested on the project page (WYSIWYG + CKEditor library), same as volocuga.

In the WYSIWYG, I've pasted the following code:

<?php
function getext($filename) {
    $pos = strrpos($filename,'.');
    $str = substr($filename, $pos);
    return $str;
}
if(!isset($_POST['submit'])){
?> 

But it gets output like this:

<span _fck_bookmark="1" style="display: none;"> </span>
 
<?php
function getext($filename) {
    $pos = strrpos($filename,'.');
    $str = substr($filename, $pos);
    return $str;
}
if(!isset($_POST['submit'])){
?><span _fck_bookmark="1" style="display: none;"> </span>

So you can see, the <span> tags are not being filtered out, despite adding the <span> tag to my list of allowed HTML tags in the input filter.

Jan Brinkmann’s picture

I had the same strange behaviour. After hours of research I finally solved it by downgrading CKeditor from 3.4 to 3.1 . Probably a more recent version works too, but I tried to use the version which was the lastest release at the time "Peter Petrik" wrote the article. It works fine.

aren cambre’s picture

Peter Petrik is slovak on drupal.org.

Jan Brinkmann’s picture

Ok, sorry. Didn't knew that. Sadly, I have to revert my statement. Downgrading to 3.1 doesn't completely resolve this issue. Sorry :/.

Slovak’s picture

Using the WYSIWYG module may be the problem. The approach I outlined involves only CKeditor and GeSHi.

Jan Brinkmann’s picture

Yes, I followed your tutorial step by step and the WYSIWYG API module is not installed. I also didn't removed it or something, I never installed it. The main problem is, since I downgraded to 3.1, it doesn't happen all the time. I'm currently trying to find a way to reproduce this behavior. I have a feeling it is somehow related to newlines or special characters. I don't really know in what cases the ckeditor produces such tags. Any hint is therefor appreciated :-) However, thank you for the tutorial anyway. It works really well beside the span-tag thing.

aren cambre’s picture

Status: Active » Fixed

Marking as fixed since this doesn't really relate to the WYSIWYG - GeSHi bridgemodule.

Slovak’s picture

Jan,

feel free to contact me directly and we can take a look at what may be causing this issue for you.

Peter...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Slovak’s picture

For anyone that pulls this up searching for a solution - this seems to be an issue with the recent versions of CKEditor (3.4). If you downgrade to version 3.1 the span tags will not show up.

<span _fck_bookmark="1" style="display: none;"> </span>

I've even asked on the CKEditor forums, but no response thus far.

Slovak’s picture

No response from the CKEditor forums so far. The newest version 3.4.1 changes the above mentioned tags to

<span style="display: none;"> </span>

As I posted in my update, the working solution is to stay with version 3.1 for now. The newer versions also break the ckeditor module features such as inserting the Drupal teaser break.