- Timestamp:
- 2019-02-12T11:11:47+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js
r32718 r32767 24 24 * EXPANSION SCRIPTS * 25 25 ********************/ 26 27 function makeURLSafe(url) { 28 29 url = url.replace(/ /g, "%20").replace(/\//g, "%2F").replace(/\:/g, "%3A").replace(/=/g, "%3D").replace(/\[/g,"%5B").replace(/\]/g,"%5D"); 30 return url; 31 } 26 32 27 33 function getTextForSection(sectionID, callback) … … 40 46 template += '</text>'; 41 47 template += '</xsl:template>'; 42 48 49 template = makeURLSafe(template); 50 43 51 var hlCheckBox = document.getElementById("highlightOption"); 44 52 … … 56 64 } 57 65 58 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + sectionID + "?ed=1&hl=" + hl + "&ilt=" + template .replace(" ", "%20");66 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + sectionID + "?ed=1&hl=" + hl + "&ilt=" + template; 59 67 if (gs.cgiParams.p_s && gs.cgiParams.p_s.length > 0) { 60 68 url += "&p.s=" + gs.cgiParams.p_s; … … 109 117 template += '</xsl:template>'; 110 118 111 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + sectionID + "?ilt=" + template.replace(" ", "%20"); 119 template = makeURLSafe(template); 120 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + sectionID + "?ilt=" + template; 112 121 113 122 if(gs.documentMetadata.docType == "paged") … … 677 686 ilt += '</xsl:template>'; 678 687 679 var url = gs.xsltParams.library_name + "?a=d&ec=1&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&ilt=" + ilt.replace(/ /g, "%20"); 688 ilt = makeURLSafe(ilt); 689 690 691 var url = gs.xsltParams.library_name + "?a=d&ec=1&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&ilt=" + ilt; 680 692 681 693 $.ajax(url) … … 939 951 template += '</html>'; 940 952 template += '</xsl:template>'; 941 942 var url = href + "?noText=1&ilt=" + template.replace(" ", "%20"); 953 template = makeURLSafe(template); 954 var url = href + "?noText=1&ilt=" + template; 955 943 956 $.ajax(url) 944 957 .success(function(text) … … 1342 1355 template += ']</images>'; 1343 1356 template += '</xsl:template>'; 1344 1345 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + gs.cgiParams.d + "?ed=1&ilt=" + template .replace(" ", "%20");1357 template = makeURLSafe(template); 1358 var url = gs.xsltParams.library_name + "/collection/" + gs.cgiParams.c + "/document/" + gs.cgiParams.d + "?ed=1&ilt=" + template; 1346 1359 1347 1360 $.ajax(
Note:
See TracChangeset
for help on using the changeset viewer.