image_filter_attr_value deletes hyphens

nonzero - July 1, 2009 - 01:16
Project:Image filter
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

css classes can use hyphens, e.g. "inline-image-right". Image Filter deletes the hyphens and renders a class attribute incorrectly. I changed the IMAGE_FILTER_WORD regex from:
return preg_replace("/\D/", '', $text);
to
return preg_replace("/[^\w-]/", '', $text);
This fixes the problem for me.

 
 

Drupal is a registered trademark of Dries Buytaert.