civicrm 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/civicrm/version.rb +1 -1
- data/lib/civicrm/xml.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbe6f59cb6fc11c4e85ca5073ef1c6ef1e66abb0
|
4
|
+
data.tar.gz: 14a8dde7bd765bb9c7d98275b9fc6313ffb52867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b35e8244019544a13e2f78b9815ac5cdf631e708f8cfa4ddd2c5053a37fa435b7eef42f9d545ebcf873b22a55b6072502b3a5e09ebabccd7b07739b0ec684205
|
7
|
+
data.tar.gz: a52d8f160cf41f3b6f49d4581d825d63a56de7b9153bf42921b77e039f41ef4b12349733cf41c84e10a49fa0eb3ae44518d5454c797ac61aad9ae51b6d490bdf
|
data/Gemfile.lock
CHANGED
data/lib/civicrm/version.rb
CHANGED
data/lib/civicrm/xml.rb
CHANGED
@@ -2,9 +2,13 @@ module CiviCrm
|
|
2
2
|
class XML
|
3
3
|
class << self
|
4
4
|
def parse(text)
|
5
|
+
# CiviCRM <Result>s sometimes contain weird elements
|
6
|
+
# like <preferred_communication_method><0></0></ ...
|
7
|
+
# that Nokogiri::XML can't hang with. Get rid of them before
|
8
|
+
# parsing.
|
5
9
|
fixed_text = text.to_s.
|
6
10
|
gsub("\n", "").
|
7
|
-
gsub(
|
11
|
+
gsub(/<(\w|_)+>\s*<\d+><\/\d+>\s*<\/(\w|_)+>/, "")
|
8
12
|
|
9
13
|
doc = Nokogiri::XML.parse(fixed_text)
|
10
14
|
|