Remove attributes-on-fly with Diazo

832 views Asked by At

I want to strip the "class attribute" from a tag. What's the best way?

Example:

 <div id="portlets-footer" class="row"> ... </div>

Thank's Vito

1

There are 1 answers

1
simahawk On BEST ANSWER

according to the drop's section of the docs [1] you can use "drop" + "attributes":

"If you want to drop attributes instead of whole tags, you can use the attributes attribute to provide a space-separated list of attributes that should be dropped on the matched theme node(s). For example, with attributes="class" the class attribute will be dropped from the matched node(s). Using attributes="class id", the class and id attributes will both be dropped."

[1] http://diazo.org/basic.html