This cropped on a site I'm using GeSHi earlier. The user embedded some Java code using In several places throughout his code, span and div tags were added that showed up in the output. I'm using version 1.8 of the GeSHi library (I had 1.71 and upgraded to see if that fixed the problem). I also tried moving the order of the GeSHi filter all around but it didn't make a difference.

You can see the page here:
https://island.byu.edu/content/newsparser-creating-string-correctly-run-...

Some sample html code:

<div style="font-family: monospace; font-weight: normal; font-style: normal;">            <span style="color: rgb(102, 204, 102);"><</span>span <span style="color: rgb(0, 0, 0); font-weight: bold;">class</span>=<span style="color: rgb(255, 0, 0);">"caps"</span><span style="color: rgb(102, 204, 102);">></span>URL<span style="color: rgb(102, 204, 102);"><</span>/span<span style="color: rgb(102, 204, 102);">></span> techCrunchURL = <span style="color: rgb(0, 0, 0); font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AURL+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: rgb(170, 170, 221); font-weight: bold;">URL</span></a>;</div>
CommentFileSizeAuthor
#2 GeSHi.txt1.97 KBkyle_mathews

Comments

soxofaan’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Can you provide the complete input text for that node? (Attach it as a file, do not insert it in the comment to prevent additional messing up of the code)

Are there other filters active in the used input format? Which ones and in which order?

kyle_mathews’s picture

StatusFileSize
new1.97 KB

These are the filters in their current order. Attached is the input text text.
Textile
Encode email addresses
URL filter
HTML filter
HTML Corrector
Line break converter
freelinking filter
GeSHi filter

soxofaan’s picture

Title: GeSHi Filter is adding <span> and <div> tags » Filter conflict adds <span> and <div> tags
Status: Postponed (maintainer needs more info) » Active

I have no troubles with that content on my test site which uses the following input format pipeline:
URL filter
HTML filter
Line break converter
GeSHi filter
User name highlighter

I'm not familiar with the Textile and freelinking filters, so probably they conflicting with GeSHi.
My guess is that one of these messes with the source code before or after the GeSHi filtering.

Can you experiment a bit with reordering the filters?
e.g. put freelinking after GeSHi.

kyle_mathews’s picture

Textile was the problem. I moved it to the last position after GeSHi filter and that worked except textile scrambled some of the html which broke the

 container. Changing to using 
fixed that problem. Thanks for your help Soxofaan!
soxofaan’s picture

Title: Filter conflict adds <span> and <div> tags » Filter conflict with Textile filter adds <span> and <div> tags
Status: Active » Fixed

you're welcome

Anonymous’s picture

Status: Fixed » Closed (fixed)

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