summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-08-07 09:48:21 -0400
committerJames Walker <walkah@walkah.net>2010-08-07 09:48:21 -0400
commitc8a706081e45d67280dd6be2d68922236adc85f2 (patch)
treec2bb42e69e132d1f45c10327f7a8d84a66beac71 /plugins
parentfd2919be18c6045f948b77d4eba1a81212548d4a (diff)
strip whitespace from me:data and me:sig (per spec)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/lib/magicenvelope.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/OStatus/lib/magicenvelope.php b/plugins/OStatus/lib/magicenvelope.php
index 3bdf24b31..967e5f6d1 100644
--- a/plugins/OStatus/lib/magicenvelope.php
+++ b/plugins/OStatus/lib/magicenvelope.php
@@ -210,13 +210,13 @@ class MagicEnvelope
}
$data_element = $env_element->getElementsByTagNameNS(MagicEnvelope::NS, 'data')->item(0);
-
+ $sig_element = $env_element->getElementsByTagNameNS(MagicEnvelope::NS, 'sig')->item(0);
return array(
- 'data' => trim($data_element->nodeValue),
+ 'data' => preg_replace('/\s/', '', $data_element->nodeValue),
'data_type' => $data_element->getAttribute('type'),
'encoding' => $env_element->getElementsByTagNameNS(MagicEnvelope::NS, 'encoding')->item(0)->nodeValue,
'alg' => $env_element->getElementsByTagNameNS(MagicEnvelope::NS, 'alg')->item(0)->nodeValue,
- 'sig' => $env_element->getElementsByTagNameNS(MagicEnvelope::NS, 'sig')->item(0)->nodeValue,
+ 'sig' => preg_replace('/\s/', '', $sig_element->nodeValue),
);
}