Tell parser not to decode HTML entities, so that they're not mangled
when they get crossposted.
Patch by allen.
diffs (20 lines):
diff -r 27f1a0767ecd -r 302e01ef42a1
cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--- a/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Thu Jun 17 18:28:26
2010 +0800
+++ b/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Thu Jun 17 19:30:26
2010 +0800
@@ -452,6 +452,7 @@ sub clean_lj_tags {
sub clean_lj_tags {
my ($self, $entry_text_ref, $extacct) = @_;
my $p = HTML::TokeParser->new($entry_text_ref);
+ $p->attr_encoded( 1 );
my $newdata = "";
my %update_tags = (
@@ -488,7 +489,7 @@ sub clean_lj_tags {
$newdata .= "<$tag";
# output attributes in original order
foreach (@$attrs) {
- $newdata .= " $_=\"" . HTML::Entities::encode( $hash->{$_}
) . "\""
+ $newdata .= " $_=\"" . $hash->{$_} . "\""
if exists $hash->{$_};
}
$newdata .= " /" if $slashclose;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog