Item8888: LinkOptionsPlugin generates style=""
Priority: Normal
Current State: New
Released In:
Target Release: n/a
The
LinkOptionsPlugin generates style="" (e.g null style values) when no CSS is included in the option. This is ugly - actually, I'm not sure it's legal HTML.
Anyway, here is a patch (it's against TWiki, but the code in the foswiki SVN is identical).
--- /var/www/servers/twiki/lib/TWiki/Plugins/LinkOptionsPlugin.pm~ 2008-12-12 05:26:15.000000000 -0500
+++ /var/www/servers/twiki/lib/TWiki/Plugins/LinkOptionsPlugin.pm 2010-04-11 14:02:06.000000000 -0400
@@ -213,8 +213,11 @@
}
}
-
- $html =~ s/<a (.+)/<a $extraAtt style="$style" $1/;
+if( length $style ) {
+ $html =~ s/<a (.+)/<a $extraAtt style="$style" $1/;
+} else {
+ $html =~ s/<a (.+)/<a $extraAtt $1/;
+}
return $html;
}
--
TimotheLitt - 11 Apr 2010