Hi,

We've deployed Geshi Filter on ledgersmb.org, but are having some trouble getting the filter to parse code blocks correctly. We have a Full HTML text format, with geshi filter enabled, and it's working fine using a <code class="bash"> or [bash] tags in the wysiwyg. However, in both cases, each line in a code block ends with <br />. See example here: https://ledgersmb.org/content/using-docker-develop-ledgersmb

If we remove the tags that invoke the Geshi filter, no break tags appear -- it seems to be Geshi filter that is somehow double-escaping these?

The only options I'm finding that seem relevant are:

- filter: Convert line breaks into HTML (i.e. <br> and <p>) (which is unchecked)
- Geshi Wrapping technique -- tried both GESHI_HEADER_PRE and GESHI_HEADER_DIV, both showed the same
tags.

I'm thinking it's an actual bug here -- if I'm overlooking something, please let me know!

Comments

freelock created an issue. See original summary.

yukare’s picture

This is because ckeditor. If you use code, it will add a <br /> at end of each line. Do not use code, use <pre> for code blocks and <code> only for inline code. The ckeditor will not add any <br /> inside a <pre> block.

freelock’s picture

Category: Bug report » Support request
Status: Active » Fixed

Thanks for the help! Changing the tag inserted by CKEditor from code to pre did indeed work...

Status: Fixed » Closed (fixed)

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