aboutsummaryrefslogtreecommitdiff
path: root/www/amphetadesk/files/patch-lib::XML::Simple.pm
diff options
context:
space:
mode:
Diffstat (limited to 'www/amphetadesk/files/patch-lib::XML::Simple.pm')
-rw-r--r--www/amphetadesk/files/patch-lib::XML::Simple.pm36
1 files changed, 36 insertions, 0 deletions
diff --git a/www/amphetadesk/files/patch-lib::XML::Simple.pm b/www/amphetadesk/files/patch-lib::XML::Simple.pm
new file mode 100644
index 000000000000..16b92d8f0192
--- /dev/null
+++ b/www/amphetadesk/files/patch-lib::XML::Simple.pm
@@ -0,0 +1,36 @@
+--- lib/XML/Simple.pm.orig Sun Oct 9 20:08:35 2005
++++ lib/XML/Simple.pm Sun Oct 9 20:22:07 2005
+@@ -880,7 +880,7 @@
+ $encoded->{$ref} = $ref;
+ }
+ else {
+- if($named) {
++ if(($named) && ($ref) && ($self) && ($self->escape_value($ref))) {
+ return(join('',
+ $indent, '<', $name, '>',
+ ($self->{opt}->{noescape} ? $ref : $self->escape_value($ref)),
+@@ -888,7 +888,11 @@
+ ));
+ }
+ else {
++ if ($ref) {
+ return("$ref$nl");
++ } else {
++ return("$nl");
++ }
+ }
+ }
+
+@@ -1013,10 +1017,12 @@
+
+ my($data) = @_;
+
++ if (defined($data)) {
+ $data =~ s/&/&amp;/sg;
+ $data =~ s/</&lt;/sg;
+ $data =~ s/>/&gt;/sg;
+ $data =~ s/"/&quot;/sg;
++ }
+
+ return($data);
+ }