I added the <pre> tag to the list of allowed tag in Filtered HtML configuration and have markup like this:

<pre class="brush: bash;">

the Filtered HTML change it into:

<pre class=" bash;">

This is the class attribute format used by the Syntax Highlighter Javascript library: http://alexgorbatchev.com/wiki/SyntaxHighlighter. It's basically patterned after css properties format.

Can the Filtered HTML filter be change to allow this inside attribute value?

Comments

mr.baileys’s picture

There is a solution in the works for D7 (#374441: Refactor Drupal HTML corrector (PHP5)).

Unfortunately, due to the dependency on PHP 5, this solution can not be backported to D6 so this bug still stands...

scor’s picture

Version: 6.9 » 7.x-dev
Component: base system » filter.module
Status: Active » Postponed

let's make sure this gets fixed in D7 then. postponing until #374441: Refactor Drupal HTML corrector (PHP5) is fixed

sun’s picture

Status: Postponed » Fixed

I don't think that this can be fixed in earlier versions than Drupal 7 and it should be fixed in D7 already.

scor’s picture

for the records, the initial bug with the colon in the html tag attribute still exists in D7. These are stripped by http://api.drupal.org/api/function/filter_xss/7 to prevent XSS. It's unlikely to get this fixed due to the security implications...

Status: Fixed » Closed (fixed)

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

ostami’s picture

Issue summary: View changes

Hello, I've installed the modules ckeditor_syntaxhighlighter and syntaxhighlighter 7.x-2.0. I'm using Drupal core 7.26. These seem to be working correctly when I an editing the body. But when I save the code changes the attribute to <pre> tags. Thus when a <pre class="brush:bash"> is in the original text the saved text contains just <pre class="bash">.

mattyoung’s picture

can you use full html format or disable the strip html filter? see original first post up top.

http://litospectrum.drupalgardens.com