Remove attributes on the fly with Diazo

I want to remove a class attribute from a tag. What is the best way?

Example:

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

Thank's Vito

+5
source share
1 answer

according to the section of discarding documents [1] you can use "drop" + "attributes":

"If you want to drop attributes instead of whole tags, you can use the attribute attribute to provide a list of attributes, separated by spaces, that should be removed on the matching topic node (s). For example, with attributes =" class "the class attribute will be removed from the associated node (s). Using the attributes = "class id", the class and identifier attributes will be deleted. "

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

+8
source

All Articles