Changeset 32773 for main/trunk/greenstone3/web/interfaces/default
- Timestamp:
- 2019-02-13T17:48:56+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js
r32772 r32773 42 42 */ 43 43 /* URL encode RESERVED characters in a non-URL context of a URL, such as the inline template (ilt) parameter value of a URL */ 44 function makeSafeForURL(url_part ) {44 function makeSafeForURL(url_part, encode_percentages) { 45 45 // https://stackoverflow.com/questions/7368407/javascript-replace-a-set-of-characters-with-another-one 46 46 var reserved_mappings = { … … 53 53 '&': '%26' 54 54 }; 55 56 encode_percentages = 1; // to force the URL-encoding of any % in url_part,do this for inline-templates that haven't ever been encoded55 // https://stackoverflow.com/questions/12797118/how-can-i-declare-optional-function-parameters-in-javascript 56 encode_percentages = encode_percentages || 1; // this method forces the URL-encoding of any % in url_part, e.g. do this for inline-templates that haven't ever been encoded 57 57 url_part = makeURLSafe(url_part, encode_percentages); 58 58
Note:
See TracChangeset
for help on using the changeset viewer.