Project:GeSHi Filter for syntax highlighting
Version:6.x-1.1
Component:Filtering
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

I'm using the Geshi Filter to apply source formatting to some xml code.

Problem is when an & is encountered it isn't converted to an & symbol (see attached).

Running the latest version of Geshi & Drupal 6.5.

Is this a bug or is there somewhere in the admin were I need to set this up?

Thanks.

AttachmentSizeStatusTest resultOperations
example-a.gif585 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:active» closed (works as designed)

this not a bug but a feature.
GeSHi filter just renders the given source code as is,
it does not interpret/process/encodes/decodes it or something

so if you give it &, it renders &
if you give it &, it renders &

#2

for clarity: GeSHi filter does encode everything in the markup

what I mean is: you submit a & through the input text field and a & will show up in the browser, the underlying markup however will contain a & of course.

the same if you input &, but the markup will then contain & which renders as &

#3

Ok that's good to know.

To follow up on the initial problem when I replace the & with an & it breaks the color formatting and all code appearing after the & looses its color formatting and renders in plain yellow.

#4

Status:closed (works as designed)» postponed (maintainer needs more info)

can you give an example of the code (both what you input, and re markup that is returned), the used language and a screenshot of the result?

#5

I use tinymce module with wysiwyg api module. I used the preformatted paragraph, which renders it as 'pre' instead of 'p'. I suppose everything inside 'pre' is not converted to html format, i.e. & is changed into &

So now I have & converted twice into &

Do you have any idea how to fix this? Is this tinymce problem or maybe geshi filter can intellegently convert back any html format within 'pre' tag to it's original, i.e. convert & back into & before doing the rest?

#6

Hi, has anyone gotten the "&" character to display correctly using GeSHi?

I am using TinyMCE, and codefilter. I enter in text inside tags, for example "apt-get update && apt-get upgrade". The "&" are saved as "&" in the underlying HTML, but rendered inside TinyMCE and published correctly as "&" when codefilter is enabled. So far so good, but when GeSHi is also enabled it displays the characters as "&" again. Everything else seems to work well.

This also happens when I use double quotation marks, or when using FCKeditor instead of TinyMCE.

Is there any way to fix this? GeSHi looks great, but it is useless if I can't use ampersands or double quotation marks.

If this is a 'feature' and not about to change, can someone maybe suggest a different plugin? All I want is a nice text box for bits of code like I get in MediaWiki, seems simple but I have been trying to get this functionality in Drupal for days now ...

#7

GeSHi looks great, but it is useless if I can't use ampersands

GeSHi filter supports ampersands and other weird characters, but the problems lies with the Rich Text Editors (FCKeditor and TinyMCE) you are using. They change the ampersands client side to & amp;, before GeSHi filter kicks in. When GeSHi filter (server side) receives the & amp;, it does not know that this was intended as &, and it encodes & amp; as & amp; amp;, which renders as & amp; in your browser.

To solve this issue in a clean way, Drupal's rich text editor support has to be standardized, which is on the table for Drupal 7.

#8

Trying to solve this for D6 with the WYSIWYG - GeSHi bridge module.

#9

I have this same problem. I am trying to display a > sign in a shell script on my site. I have tried to use *gt; and the > itself with tags. What is weird is that in my WYSWYG (tiny MCE) when editing it, it looks like it should. However, when I publish it, it does not work.

http://tlarkin.com/tech/2-shell-scripts-maintain-standard-naming-convent...

First script, last line I am using the > to output the results to a file, but it keeps displaying it as > no matter what I put in. Help?

I am running Drupal 6.16, and the most up-to-date modules updated via drush

#10

Status:postponed (maintainer needs more info)» closed (works as designed)

Sounds like this was purely a misunderstanding and the WYSWYG has been noted in other issues and there is work at http://drupal.org/project/wysiwyg-geshi.

nobody click here