diff --git a/exlibris-primo.gemspec b/exlibris-primo.gemspec
index b39e07f..984f8d6 100644
--- a/exlibris-primo.gemspec
+++ b/exlibris-primo.gemspec
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.add_dependency 'require_all', '~> 1.3'
# Leverage ActiveSupport core extensions.
- s.add_dependency 'activesupport', '>= 3.2', '< 5'
+ s.add_dependency 'activesupport', '>= 3.2', '< 3.3'
s.add_dependency 'nokogiri', '< 2'
s.add_dependency 'json', '>= 1.8.0', '< 3'
s.add_dependency 'savon', '~> 2.11'
diff --git a/lib/exlibris/primo/pnx/openurl.rb b/lib/exlibris/primo/pnx/openurl.rb
index 3b194d4..2dc64a2 100644
--- a/lib/exlibris/primo/pnx/openurl.rb
+++ b/lib/exlibris/primo/pnx/openurl.rb
@@ -1,9 +1,9 @@
module Exlibris
module Primo
module Pnx
- #
+ #
# Handle OpenURL elements
- #
+ #
module Openurl
#
# Parse addata to provide an OpenURL query string
@@ -12,7 +12,7 @@ def openurl
@openurl ||= ""
if @openurl.blank?
xml.root.xpath("addata/*").each do |addata|
- @openurl << "rft.#{addata.name}=#{addata.inner_text}&" unless (addata.inner_text.nil? or addata.inner_text.strip.empty?)
+ @openurl << "rft.#{addata.name}=#{CGI.escape(addata.inner_text)}&" unless (addata.inner_text.nil? or addata.inner_text.strip.empty?)
end
@openurl << "rft.primo=#{@record_id}"
end
diff --git a/lib/exlibris/primo/version.rb b/lib/exlibris/primo/version.rb
index 6e5220c..dcc3829 100644
--- a/lib/exlibris/primo/version.rb
+++ b/lib/exlibris/primo/version.rb
@@ -1,5 +1,5 @@
module Exlibris
module Primo
- VERSION = '2.2.5'
+ VERSION = '2.2.6'
end
end
diff --git a/test/fixtures/results/result_with_ampersands.xml b/test/fixtures/results/result_with_ampersands.xml
new file mode 100644
index 0000000..98e505e
--- /dev/null
+++ b/test/fixtures/results/result_with_ampersands.xml
@@ -0,0 +1,208 @@
+
+
+ fulltext
+ Remote Search Resource
+ detailsGetit1
+
+ false
+
+
+ fulltext
+ false
+ fulltext
+ Remote Search Resource
+ activate
+ false
+
+
+
+ BKL
+ EGQ
+ Prell, Christina
+ Hubacek, Klaus
+ Reed, Mark
+ 2009
+ Prell, Christina
+ Hubacek, Klaus
+ Reed, Mark
+ Development Studies
+ Environmental Sciences & Ecology
+ Environmental Studies
+ Life Sciences & Biomedicine
+ Participatory resource management
+ Public Administration
+ Regional & Urban Planning
+ Science & Technology
+ Social network analysis
+ Social Sciences
+ Sociology
+ Stakeholder analysis
+ article
+ The increasing use of stakeholder analysis in natural resource management reflects a growing
+ recognition that stakeholders can and should influence environmental decision making. Stakeholder analysis can be
+ used to avoid inflaming conflicts, ensure that the marginalization of certain groups is not reinforced, and fairly
+ represent diverse interests. We present a case study from the Peak District National Park in the United Kingdom,
+ where we used social network analysis to inform stakeholder analysis. This information helped us identify which
+ individuals and categories of stakeholder played more central roles in the network and which were more peripheral.
+ This information guided our next steps for stakeholder selection. The article ends with a discussion on the
+ strengths and limitations of combining social network analysis with stakeholder analysis.
+
+ 20090604
+ Stakeholder Analysis and Social Network Analysis in Natural Resource Management
+ Society & natural resources
+ SOC NATUR RESOUR
+
+ eNqNkUlrHDEQRkVIIGPHP8An991pR0urpQZfzJDF4AW8nEW1llhxj2QkNc78-2gY4xxsk5yqoN4rVJ920B7M5c6G4jUUaxDaJ_iIYIm_YDl0ZKC1pWSolb5DC8IpabGg7D1abObtBviIdnL-hTFmsqMLdHld4N7excnY1JwEmNbZ5waCaa6j9jA1F7Y8xnT_d-ZDcwFlTnV2ZXOck7bNOQT4aVf1YZ_QBwdTtntPdRfdfvt6s_zRnl1-P12enLWEDV1pO0IMiE6bERxorkGYftSUEsmEwW7EgnedpG4cJQZtTc-5ddxyQ0CMmgDbRWS7V6eYc7JOPSS_grRWBKtNIupFItU53DqPdowua2-Dts9ejYT2kjIuaodJpeX_00tfoPgYlnEOpaoHWzXr-DDnZ4nxTg5MDkMlPr9KUJWpwqoXPce0opyp8nuzUGxxH1xMK6g_MhlVYD3F5BIE7fPLe5_M43-a7O3I_gBr7rkg
+
+ Taylor & Francis Group
+ TAYLOR & FRANCIS INC
+ 20090604
+ 0894-1920
+ 1521-0723
+ https://orcid.org/0000-0003-2561-6090
+ https://orcid.org/0000-0002-8958-8474
+ BKL
+ 17B
+ DVR
+ EGQ
+ JWLSN
+ AAYXX
+ CITATION
+ article
+ true
+
+
+ ISSN: 0894-1920
+ EISSN: 1521-0723
+ DOI: 10.1080/08941920802199202
+ Prell, Christina ; Hubacek, Klaus ; Reed, Mark
+ FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3
+ Development Studies ; Environmental Sciences & Ecology ; Environmental Studies ; Life Sciences &
+ Biomedicine ; Participatory resource management ; Public Administration ; Regional & Urban Planning ; Science
+ & Technology ; Social network analysis ; Social Sciences ; Sociology ; Stakeholder analysis
+
+ Society & natural resources, 2009-06-04, Vol.22 (6), p.501-518
+ The increasing use of stakeholder analysis in natural resource management reflects a growing
+ recognition that stakeholders can and should influence environmental decision making. Stakeholder analysis can be
+ used to avoid inflaming conflicts, ensure that the marginalization of certain groups is not reinforced, and fairly
+ represent diverse interests. We present a case study from the Peak District National Park in the United Kingdom,
+ where we used social network analysis to inform stakeholder analysis. This information helped us identify which
+ individuals and categories of stakeholder played more central roles in the network and which were more peripheral.
+ This information guided our next steps for stakeholder selection. The article ends with a discussion on the
+ strengths and limitations of combining social network analysis with stakeholder analysis.
+
+ eng
+
+
+
+ Stakeholder Analysis and Social Network Analysis in Natural Resource Management
+ article
+ scopus2-s2.0-67650293853
+ 446
+ 479
+ wos000268235700001
+ peer_reviewed
+ Copyright Taylor & Francis Group, LLC 2009
+ Copyright 2009 Elsevier B.V., All rights reserved.
+ FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3
+ PHILADELPHIA: Taylor & Francis Group
+
+
+ TN_cdi_webofscience_primary_000268235700001
+ webofscience_scopu
+ article
+ FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3
+
+ XML
+ Aggregation Database
+ 000268235700001
+ PC
+
+ eNqNkUlrHDEQRkVIIGPHP8An991pR0urpQZfzJDF4AW8nEW1llhxj2QkNc78-2gY4xxsk5yqoN4rVJ920B7M5c6G4jUUaxDaJ_iIYIm_YDl0ZKC1pWSolb5DC8IpabGg7D1abObtBviIdnL-hTFmsqMLdHld4N7excnY1JwEmNbZ5waCaa6j9jA1F7Y8xnT_d-ZDcwFlTnV2ZXOck7bNOQT4aVf1YZ_QBwdTtntPdRfdfvt6s_zRnl1-P12enLWEDV1pO0IMiE6bERxorkGYftSUEsmEwW7EgnedpG4cJQZtTc-5ddxyQ0CMmgDbRWS7V6eYc7JOPSS_grRWBKtNIupFItU53DqPdowua2-Dts9ejYT2kjIuaodJpeX_00tfoPgYlnEOpaoHWzXr-DDnZ4nxTg5MDkMlPr9KUJWpwqoXPce0opyp8nuzUGxxH1xMK6g_MhlVYD3F5BIE7fPLe5_M43-a7O3I_gBr7rkg
+
+
+
+ $$Topenurl_article
+ $$Uhttp://1.1.1.1?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2022-03-02T09%3A11%3A51IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-webofscience_scopu&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Stakeholder%20Analysis%20and%20Social%20Network%20Analysis%20in%20Natural%20Resource%20Management&rft.jtitle=Society%20%26%20natural%20resources&rft.au=Prell,%20Christina&rft.date=2009-06-04&rft.volume=22&rft.issue=6&rft.spage=501&rft.epage=518&rft.pages=501-518&rft.issn=0894-1920&rft.eissn=1521-0723&rft_id=info:doi/10.1080/08941920802199202&rft_dat=%3Cwebofscience_scopu%3E000268235700001%3C/webofscience_scopu%3E%3Cgrp_id%3Ecdi_FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_id=info:pmid/$$Dopenurl
+
+ $$Usyndetics_thumb_exl
+ $$Uhttp://syndetics_thumb_exl$$Dthumbnail
+ $$Topenurlfull_article
+ $$Uhttp://1.1.1.1?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2022-03-02T09%3A11%3A51IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-webofscience_scopu&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Stakeholder%20Analysis%20and%20Social%20Network%20Analysis%20in%20Natural%20Resource%20Management&rft.jtitle=Society%20%26%20natural%20resources&rft.au=Prell,%20Christina&rft.date=2009-06-04&rft.volume=22&rft.issue=6&rft.spage=501&rft.epage=518&rft.pages=501-518&rft.issn=0894-1920&rft.eissn=1521-0723&rft_id=info:doi/10.1080/08941920802199202&svc_val_fmt=info:ofi/fmt:kev:mtx:sch_svc&svc.fulltext=yes&rft_dat=%3Cwebofscience_scopu%3E000268235700001%3C/webofscience_scopu%3E%3Cgrp_id%3Ecdi_FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_id=info:pmid/$$Dopenurlfulltext
+
+
+
+ 20090604
+ Prell, Christina ; Hubacek, Klaus ; Reed, Mark
+ Stakeholder Analysis and Social Network Analysis in Natural Resource Management
+
+
+ 2009-06-04
+ 6
+ PHILADELPHIA
+ journal
+ JOUR
+ 1521-0723
+ 501
+ The increasing use of stakeholder analysis in natural resource management reflects a growing recognition
+ that stakeholders can and should influence environmental decision making. Stakeholder analysis can be used to
+ avoid inflaming conflicts, ensure that the marginalization of certain groups is not reinforced, and fairly
+ represent diverse interests. We present a case study from the Peak District National Park in the United Kingdom,
+ where we used social network analysis to inform stakeholder analysis. This information helped us identify which
+ individuals and categories of stakeholder played more central roles in the network and which were more peripheral.
+ This information guided our next steps for stakeholder selection. The article ends with a discussion on the
+ strengths and limitations of combining social network analysis with stakeholder analysis.
+
+ Stakeholder Analysis and Social Network Analysis in Natural Resource Management
+ 22
+ 501-518
+ Prell, Christina
+ Hubacek, Klaus
+ Reed, Mark
+ 0894-1920
+ SOC NATUR RESOUR
+ https://orcid.org/0000-0003-2561-6090
+ https://orcid.org/0000-0002-8958-8474
+ 518
+ article
+ 18
+ Society & natural resources
+ Taylor & Francis Group
+ 2009
+ 10.1080/08941920802199202
+
+
+ 5
+ Prell, Christina
+ Hubacek, Klaus
+ Reed, Mark
+ 2009
+ peer_reviewed
+ online_resources
+ cdi_FETCH-LOGICAL-1394t-411da74cdbafac5ca7d6bc221837d0fb0754482fbb80aced655ef5e5d1a7bc1a3
+ articles
+ Development Studies
+ Environmental Sciences & Ecology
+ Environmental Studies
+ Life Sciences & Biomedicine
+ Participatory resource management
+ Public Administration
+ Regional & Urban Planning
+ Science & Technology
+ Social network analysis
+ Social Sciences
+ Sociology
+ Stakeholder analysis
+ eng
+ Scopus
+ Web of Knowledge
+ Social Sciences Citation Index
+ Web of Science
+ Web of Science - Social Sciences Citation Index - 2009
+ CrossRef
+ Society & natural resources
+ articles
+
+ PC
+
\ No newline at end of file
diff --git a/test/pnx/openurl_test.rb b/test/pnx/openurl_test.rb
index 82c98c7..d005a49 100644
--- a/test/pnx/openurl_test.rb
+++ b/test/pnx/openurl_test.rb
@@ -6,5 +6,12 @@ def test_openurl
assert_not_nil record.openurl
assert((not record.openurl.blank?))
end
+
+ def test_openurl_encoding
+ record = Exlibris::Primo::Record.new(:raw_xml => record_with_ampersand_xml)
+ journal_title = record.send(:xml).root.xpath("addata/jtitle").text
+ assert_not_nil record.openurl
+ assert(record.openurl.include? CGI.escape(journal_title))
+ end
end
end
\ No newline at end of file
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 9a066ce..a2dbcf1 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -596,6 +596,10 @@ def record_other_source_xml
File.read(File.expand_path("../xml/record_other_sourcesystem.xml", __FILE__))
end
+ def record_with_ampersand_xml
+ File.read(File.expand_path("../fixtures/results/result_with_ampersands.xml", __FILE__))
+ end
+
def record_invalid_frbr_xml
"" +
"" +