Closed (won't fix)
Project:
WYSIWYG Filter (D7)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2009 at 23:39 UTC
Updated:
19 Aug 2009 at 00:32 UTC
Hi,
I'm trying to use this filter to work for http://drupal.org/project/syntaxhighlighter
It uses markup like this:
<pre class="brush: java">
some java code
</pre>
or a little more complicated:
<pre class="brush: java;auto-link:true;collapse:false;highlight:[5,10,21];ruler:false">
some java code
</pre>
It basically uses the CSS syntax as class name. I need that class attribute pass through verbatim.
I tried adding this rule
pre[class]
In Advanced rules, Class name rules:
a-z*
But the class attribute is always stripped.
Is it possible to allow class attribute through in this syntax?
Comments
Comment #1
markus_petrux commentedNope. You can't. Class Names should start with a lower case letter "a-z" and can be followed by one or more lower case letters "a-z", digits "0-9", hyphens "-" and/or underscores "_". Adding more characters would complicate things too much. Also, anything like "foo:bar" can be confused with bad protocols.
Instead, maybe you could use macros. ie. something like:
Then, an input format filter with a weight higher than other filters can convert this into HTML.
Comment #2
mattyoung commentedOkay, got it. I will do a filter then.
Thanks!