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&q=allinurl%3AURL+java.sun.com&btnI=I%27m%20Feeling%20Lucky"><span style="color: rgb(170, 170, 221); font-weight: bold;">URL</span></a>;</div>
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | GeSHi.txt | 1.97 KB | kyle_mathews |
Comments
Comment #1
soxofaan commentedCan 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?
Comment #2
kyle_mathews commentedThese 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
Comment #3
soxofaan commentedI 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.
Comment #4
kyle_mathews commentedTextile 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
Comment #5
soxofaan commentedyou're welcome
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.