I am using the Syntax Highlighter module as well as WYSIWYG filter in my text format, and finding that the classes that Syntax Highlighter interpret are being stripped because they contain a colon. For instance:

<pre class="brush: php">
<?php
 
print 'Hello world!';
?>

</pre>

After saving the node and then editing, the 'brush: php' class is being stripped because of the colon it contains. Is there any way around this? WYSIWYG Filter won't accept 'brush:*' as an allowed class since it contains a colon. Escaping the colon in the javascript adding the class led to it being stripped as well because the equivalent is %3A. Any way to stop this from happening? Thanks in advance.

Comments

Hi,
I guess you might have forget to keep the right order.
You need to follow the order of input format filters as described on syntax highlighter module.
As mentioned there, syntax highlighter comes after any and all filters that can modify content input.

Try this.

Actually, this is not the case. Syntax highlighter filter is always last - it's the WYSIWYG Filter stripping out the 'brush: php' class. Disabling the syntax highlighter filter shows the WYSIWYG Filter still removes the 'brush: php' class.

Version:7.x-1.6-rc2» 7.x-1.x-dev

Any luck with this?

Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new2.13 KB

Here is a patch to wysiwyg_filter.pages.inc which disables class name cleanup if brush: is found. This allows the Syntax Highlighter class to be applied correctly.