Doesn't work with HTML text / rich text entry

TomChiverton - October 1, 2007 - 21:33
Project:Attached Node
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

This is because
$meta_tag_params_regexp = '/,\s*([\w_-]+)\s*=\s*"([^"]+)"\s*/';
doesn't match URL encoded text.

I've hacked a fix:
Add
$meta_tag_params_regexp2 = '/,\s*([\w_-]+)\s*=\s*"([^,]+)"\s*/';
just after the line in question.
Then alter the name=value parser :
// iterate over all name=value pairs and override $node values with them
+ if ( preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match) == 0 ){
+ $meta_tag_params_regexp=$meta_tag_params_regexp2 ;
+ }
if (preg_match_all($meta_tag_params_regexp, $match[2][$key], $parm_match)) {

This is all in the version with the Drupal 5.x patch from the other bug applied.

 
 

Drupal is a registered trademark of Dries Buytaert.