Closed (works as designed)
Project:
GeSHi Filter for syntax highlighting
Version:
6.x-1.1
Component:
Filtering
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2009 at 23:52 UTC
Updated:
22 Jun 2011 at 23:32 UTC
Comments
Comment #1
soxofaan commentedthis 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&Comment #2
soxofaan commentedfor 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&Comment #3
buzz05 commentedOk 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.Comment #4
soxofaan commentedcan 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?
Comment #5
yyudhistira commentedI 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?Comment #6
notanumber6789 commentedHi, has anyone gotten the "&" character to display correctly using GeSHi?
I am using TinyMCE, and codefilter. I enter in text inside
Comment #7
soxofaan commentedGeSHi 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.
Comment #8
aren cambre commentedTrying to solve this for D6 with the WYSIWYG - GeSHi bridge module.
Comment #9
tlarkin commentedI 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
Comment #10
boombatower commentedSounds 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.