/ Published in: PHP
A simple script to run with [drush](http://drupal.org/project/drush) to clean all Drupal nodes containing style tags.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $results = db_query("SELECT DISTINCT nid from node_revisions WHERE body REGEXP '<style>.*</style>' OR body REGEXP '<style>.*</style>'"); while($nid = db_result($results)) { $node = node_load($nid); node_save($node); } ?>