Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
mr.baileysThere 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...
Comment #2
scor CreditAttribution: scor commentedlet's make sure this gets fixed in D7 then. postponing until #374441: Refactor Drupal HTML corrector (PHP5) is fixed
Comment #3
sunI don't think that this can be fixed in earlier versions than Drupal 7 and it should be fixed in D7 already.
Comment #4
scor CreditAttribution: scor commentedfor 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...
Comment #6
ostami CreditAttribution: ostami commentedHello, 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">
.Comment #7
mattyoung CreditAttribution: mattyoung commentedcan you use full html format or disable the strip html filter? see original first post up top.
http://litospectrum.drupalgardens.com